﻿.dash-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #c8966e;
    background-image: linear-gradient(rgba(240,180,130,0.45),rgba(240,180,130,0.45)), url('/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: Arial, Helvetica, sans-serif;
}

/* Header */
.dash-header {
    background: rgba(255,255,255,0.90);
    padding: 8px 20px;
    display: grid;
    grid-template-columns: 200px 1fr 220px;
    align-items: center;
    min-height: 90px;
}

.dash-logo img {
    height: 68px;
    object-fit: contain;
}

.dash-title {
    text-align: center;
}

    .dash-title h1 {
        font-size: 2rem;
        font-weight: 900;
        color: #1a1a1a;
        margin: 0;
    }

    .dash-title h2 {
        font-size: 1.05rem;
        font-weight: 700;
        color: #1a1a1a;
        margin: 2px 0 0;
    }

.dash-status {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.status-val {
    font-size: 1.1rem;
    font-weight: 900;
}

.status-on {
    color: #2A8C2A;
}

.status-off {
    color: #D42828;
}

.status-sub {
    font-size: 0.8rem;
    font-weight: 700;
    color: #555;
}

.status-conn {
    font-size: 0.75rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
}

.conn-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2A8C2A;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%,100% {
        opacity: 1
    }

    50% {
        opacity: 0.3
    }
}

/* Nav */
.dash-nav {
    background: rgba(255,255,255,0.88);
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.nav-username {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-left: 4px;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex: 1;
    justify-content: space-around;
    flex-wrap: wrap;
}

/* Orange bar */
.orange-bar {
    height: 5px;
    background: #F47320;
    flex-shrink: 0;
}

/* Home content */
.dash-content {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    padding: 16px 20px;
    align-items: start;
}

.field-select {
    padding: 8px 12px;
    border: 1.5px solid #999;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(255,255,255,0.92);
    width: 100%;
    margin-bottom: 14px;
}

.light-btns {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Table */
.table-col {
    background: rgba(255,255,255,0.93);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: rgba(244,115,32,0.08);
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9rem;
    font-weight: 700;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

    .schedule-table thead th {
        background: #f7f7f7;
        padding: 8px 10px;
        text-align: left;
        font-weight: 700;
        font-size: 0.78rem;
        text-transform: uppercase;
        color: #555;
        border-bottom: 1.5px solid #ddd;
    }

    .schedule-table tbody tr {
        border-bottom: 1px solid #eee;
    }

        .schedule-table tbody tr:hover {
            background: #fdf4ed;
        }

    .schedule-table tbody td {
        padding: 9px 10px;
        color: #1a1a1a;
        vertical-align: middle;
    }

.no-records {
    text-align: center;
    color: #888;
    padding: 20px !important;
    font-style: italic;
}

.badge-on {
    display: inline-block;
    background: #e6f4e6;
    color: #1a6b1a;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-off {
    display: inline-block;
    background: #fdecea;
    color: #a01010;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.78rem;
    font-weight: 700;
}

/* Other tabs */
.tab-body {
    flex: 1;
    padding: 16px 20px;
}

.panel {
    background: rgba(255,255,255,0.93);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

    .panel h3 {
        font-size: 1rem;
        font-weight: 900;
        margin: 0 0 16px;
        color: #1a1a1a;
    }

.scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px,1fr));
    gap: 10px;
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.settings-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
}

.settings-sub {
    font-size: 0.78rem;
    color: #777;
    margin-top: 2px;
}

.settings-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .settings-control span {
        font-size: 0.85rem;
        font-weight: 700;
        min-width: 36px;
    }

.settings-input {
    width: 80px;
    padding: 5px 8px;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
    text-align: center;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 28px 32px;
    max-width: 440px;
    width: 95%;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

    .modal-box h3 {
        font-size: 1.1rem;
        font-weight: 900;
        margin: 0 0 18px;
    }

    .modal-box p {
        color: #555;
        font-size: 0.9rem;
        margin: 0 0 22px;
    }

.modal-field {
    margin-bottom: 14px;
}

    .modal-field label {
        display: block;
        font-size: 0.82rem;
        font-weight: 700;
        color: #444;
        margin-bottom: 5px;
        text-transform: uppercase;
    }

.modal-input {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #ccc;
    border-radius: 5px;
    font-size: 0.9rem;
    outline: none;
    box-sizing: border-box;
}

    .modal-input:focus {
        border-color: #F47320;
    }

.modal-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.modal-btns {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
}

.error-banner {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    color: #c0392b;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    text-align: center;
}

/* Footer */
.dash-footer {
    background: rgba(240,240,240,0.95);
    border-top: 1px solid #ddd;
    padding: 10px 20px;
    text-align: center;
    font-size: 0.80rem;
    font-weight: 700;
    color: #555;
    line-height: 1.7;
}

    .dash-footer a {
        color: #F47320;
        text-decoration: none;
    }

@media (max-width: 768px) {
    .dash-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dash-logo {
        display: none;
    }

    .dash-content {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        justify-content: center;
    }
}

/* Button label — inline style always wins over Radzen */
.btn-label {
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
}

.dash-status-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 20px;
    background: rgba(255,255,255,0.7);
    border-bottom: 1px solid #e0e0e0;
}
