/* =========================================================
   SHARED LODGE INTERFACE — FULL UPDATED STYLES
   ========================================================= */

/* Keep the newer pages visually consistent with the original lodge interface. */

body {
    font-family: "Times New Roman", Times, serif;
    font-size: 13px;
}

.portal-header h1,
.panel h2,
.brand b,
.room-card h3 {
    font-family: "Times New Roman", Times, serif;
}

.portal-sidebar {
    background: #fff;
    border-right: 1px solid #ece8df;
}

.portal-nav a {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.portal-nav a i {
    flex-shrink: 0;
}

.portal-header {
    min-height: 88px;
}

.portal-content {
    padding-top: 24px;
}

.metric {
    min-height: 125px;
}

.metric strong {
    font-size: 26px;
}

.panel {
    border-radius: 11px;
    box-shadow: 0 7px 22px rgba(76, 59, 28, 0.035);
}

.button {
    font-family: "Times New Roman", Times, serif;
    font-size: 13px;
}

.data-table th {
    font-size: 11px;
}

.data-table td {
    font-size: 13px;
}


/* =========================================================
   PROFILE FORM
   ========================================================= */

.profile-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.profile-form .full {
    grid-column: 1 / -1;
}

.profile-form label,
.staff-form label {
    display: block;
    margin-bottom: 6px;
    color: #495057;
    font-weight: 700;
}

.profile-form input,
.profile-form select,
.profile-form textarea,
.staff-form input,
.staff-form select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #dedfd9;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    box-sizing: border-box;
}

.profile-form textarea {
    min-height: 92px;
    resize: vertical;
}

.profile-form .errorlist,
.staff-form .errorlist {
    margin: 4px 0;
    color: #c83f5f;
}


/* =========================================================
   FORM ACTIONS
   ========================================================= */

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 20px;
}


/* =========================================================
   STAFF MANAGEMENT
   ========================================================= */

.staff-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.staff-directory {
    overflow: hidden;
}

.staff-table td {
    padding-top: 17px;
    padding-bottom: 17px;
}

.staff-table tr:hover {
    background: #fcfaf4;
}

.staff-member-name {
    display: grid;
    gap: 3px;
}

.staff-member-name small {
    color: #9b751f;
    font-size: 11px;
    font-weight: 700;
}

.staff-form-card {
    position: sticky;
    top: 20px;
}

.staff-form {
    display: grid;
    gap: 13px;
}

.staff-form p {
    margin: 0;
}

.staff-form .helptext {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 4px;
}

.staff-form .button {
    margin-top: 5px;
}

.staff-form .button.secondary {
    margin-left: 7px;
}

.staff-note {
    padding: 12px;
    border-radius: 8px;
    background: var(--gold-soft);
    color: #775a1a;
    font-size: 12px;
}


/* =========================================================
   BRAND
   ========================================================= */

.brand b {
    display: inline;
    font-size: 14px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 200px;
    white-space: normal;
}

.brand {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

.portal-sidebar {
    width: 280px;
    min-width: 260px;
    max-width: 320px;
    overflow-x: hidden;
    overflow-y: auto;
}

.portal-main {
    margin-left: 280px;
}

/* Handle high DPI displays (150% scaling) */
@media (min-resolution: 1.5dppx) and (min-width: 1024px), 
       (-webkit-min-device-pixel-ratio: 1.5) and (min-width: 1024px) {
    .portal-sidebar {
        width: 300px;
        min-width: 280px;
        max-width: 340px;
    }
    
    .portal-main {
        margin-left: 300px;
    }
    
    .brand b {
        max-width: 220px;
        font-size: 15px;
    }
    
    .portal-nav a {
        font-size: 14px;
        padding: 12px 16px;
    }
}

/* Handle even higher DPI displays (200% scaling) */
@media (min-resolution: 2dppx) and (min-width: 1024px), 
       (-webkit-min-device-pixel-ratio: 2) and (min-width: 1024px) {
    .portal-sidebar {
        width: 320px;
        min-width: 300px;
        max-width: 360px;
    }
    
    .portal-main {
        margin-left: 320px;
    }
    
    .brand b {
        max-width: 240px;
        font-size: 16px;
    }
    
    .portal-nav a {
        font-size: 15px;
        padding: 14px 18px;
    }
}


/* =========================================================
   SHARED NAVY SIDEBAR
   ========================================================= */

/* Retain the shared navy sidebar and blue accents on tuned dashboard pages. */

.portal-sidebar {
    background: linear-gradient(
        180deg,
        #0d1b2a 0%,
        #132b3d 100%
    );
    border-right: 0;
}


/* =========================================================
   BLUE ACCENTS
   ========================================================= */

.staff-member-name small {
    color: #278fc3;
}

.staff-note {
    background: var(--blue-soft);
    color: #246a8c;
}


/* =========================================================
   STAFF FORM PAGE
   ========================================================= */

.staff-layout {
    grid-template-columns: 1fr;
}

.staff-form-card {
    max-width: 760px;
    position: static;
}

.staff-form-page {
    max-width: 760px;
}


/* =========================================================
   COMPANY LOGO
   ========================================================= */

.company-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: contain;
    background: linear-gradient(
        135deg,
        #4bb0dd,
        #2c9fd6
    );
    flex-shrink: 0;
}

.brand {
    align-items: center;
}


/* =========================================================
   DASHBOARD CHART
   ========================================================= */

/* Improved chart column spacing for better day visibility */

.chart {
    gap: 20px;
    padding: 20px 15px 0;
}

.chart-column {
    gap: 10px;
    min-width: 40px;
}

.chart-column small {
    font-size: 12px;
    font-weight: 600;
    color: #20262c;
}

.chart-column b {
    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .staff-layout {
        grid-template-columns: 1fr;
    }

    .staff-form-card {
        position: static;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .profile-form {
        grid-template-columns: 1fr;
    }

    .profile-form .full {
        grid-column: auto;
    }

    .portal-header {
        min-height: 75px;
    }

    .portal-content {
        padding-top: 18px;
    }

    .metric {
        min-height: 110px;
    }

    .metric strong {
        font-size: 23px;
    }

    .chart {
        gap: 12px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .chart-column {
        min-width: 32px;
        gap: 7px;
    }

    .chart-column small {
        font-size: 10px;
    }

    .chart-column b {
        font-size: 12px;
    }

    .company-logo {
        width: 36px;
        height: 36px;
        border-radius: 6px;
    }

    .form-actions {
        flex-wrap: wrap;
    }

    .staff-form-page {
        max-width: 100%;
    }

    .portal-sidebar {
        width: 260px;
        min-width: 240px;
        max-width: 280px;
    }

    .portal-main {
        margin-left: 260px;
    }

    .brand b {
        max-width: 160px;
        font-size: 13px;
    }
    
    /* Override high DPI on mobile */
    @media (min-resolution: 1.5dppx), (-webkit-min-device-pixel-ratio: 1.5) {
        .portal-sidebar {
            width: 260px;
            min-width: 240px;
            max-width: 280px;
        }
        
        .portal-main {
            margin-left: 260px;
        }
        
        .brand b {
            max-width: 160px;
            font-size: 13px;
        }
    }
}