@charset "UTF-8";

:root {
    --gold: #d4af57;
    --gold-soft: #ead18a;
    --gold-dark: #a98536;

    --ink: #111111;
    --ink-2: #171717;
    --ink-3: #202020;
    --ink-4: #2a2a2a;

    --paper: #f5f4f0;
    --white: #ffffff;
    --muted: #a9a9a9;
    --muted-2: #777777;

    --success: #2baa6e;
    --danger: #d9534f;

    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;

    --shadow-lg: 0 30px 70px rgba(0, 0, 0, .28);
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, .12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family:
        Tahoma,
        Arial,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

/* LOGIN */

.login-body {
    background:
        radial-gradient(circle at 10% 10%, rgba(212,175,87,.10), transparent 30%),
        #111;
    color: var(--white);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 1.05fr) minmax(460px, .95fr);
}

.login-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 70px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.02), rgba(255,255,255,0)),
        #171717;
    border-left: 1px solid rgba(255,255,255,.06);
}

.login-brand-panel::after {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    left: -160px;
    bottom: -160px;
    border: 1px solid rgba(212,175,87,.18);
    border-radius: 50%;
    box-shadow:
        0 0 0 70px rgba(212,175,87,.025),
        0 0 0 140px rgba(212,175,87,.018);
}

.brand-content {
    width: 100%;
    max-width: 660px;
    position: relative;
    z-index: 2;
}

.login-logo {
    display: block;
    width: min(100%, 520px);
    max-height: 170px;
    object-fit: contain;
    object-position: right center;
    margin-bottom: 42px;
}

.brand-eyebrow {
    color: var(--gold);
    font-size: 12px;
    letter-spacing: 3px;
    margin: 0 0 13px;
}

.brand-content h1 {
    font-size: clamp(35px, 4vw, 58px);
    line-height: 1.25;
    margin: 0 0 20px;
    max-width: 580px;
}

.brand-description {
    max-width: 560px;
    color: #bdbdbd;
    line-height: 2;
    font-size: 17px;
    margin: 0;
}

.brand-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.brand-points span {
    border: 1px solid rgba(212,175,87,.26);
    background: rgba(212,175,87,.07);
    color: var(--gold-soft);
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13px;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #111;
}

.login-card {
    width: 100%;
    max-width: 470px;
}

.mobile-logo-wrap {
    display: none;
}

.login-heading {
    margin-bottom: 30px;
}

.section-kicker,
.page-kicker {
    color: var(--gold);
    font-size: 11px;
    letter-spacing: 2.2px;
    font-weight: 700;
}

.login-heading h2 {
    margin: 9px 0 8px;
    font-size: 36px;
}

.login-heading p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.alert {
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 18px;
    line-height: 1.7;
    font-size: 14px;
}

.alert-error {
    color: #ffd2d0;
    background: rgba(217,83,79,.13);
    border: 1px solid rgba(217,83,79,.28);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    color: #e7e7e7;
    font-size: 14px;
    font-weight: 700;
}

.form-group input {
    width: 100%;
    height: 54px;
    border-radius: var(--radius-md);
    border: 1px solid #343434;
    background: #191919;
    color: var(--white);
    padding: 0 16px;
    outline: none;
    transition: .18s ease;
}

.form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,87,.11);
}

.password-field {
    position: relative;
}

.password-field input {
    padding-left: 78px;
}

.password-toggle {
    position: absolute;
    left: 7px;
    top: 7px;
    bottom: 7px;
    border: 0;
    color: var(--gold-soft);
    background: #252525;
    padding: 0 14px;
    border-radius: 9px;
    cursor: pointer;
}

.primary-button {
    width: 100%;
    height: 56px;
    border: 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-top: 8px;
    color: #151515;
    background:
        linear-gradient(135deg, var(--gold-soft), var(--gold));
    font-weight: 800;
    transition: transform .15s ease, box-shadow .15s ease;
}

.primary-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(212,175,87,.16);
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 25px;
    color: #686868;
    font-size: 12px;
}

/* DASHBOARD */

.dashboard-body {
    background: #f2f1ed;
    color: #222;
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #151515;
    color: #fff;
    padding: 25px 18px;
}

.sidebar-brand {
    padding: 5px 11px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo {
    display: block;
    width: 100%;
    max-height: 88px;
    object-fit: contain;
    object-position: right center;
}

.sidebar-nav {
    padding-top: 20px;
    overflow-y: auto;
}

.nav-section-title {
    color: #676767;
    font-size: 11px;
    letter-spacing: 1px;
    margin: 24px 13px 9px;
}

.nav-item {
    min-height: 47px;
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: #c7c7c7;
    border-radius: 11px;
    padding: 0 13px;
    margin: 4px 0;
    transition: .16s ease;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255,255,255,.05);
}

.nav-item.active {
    color: #171717;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    font-weight: 800;
}

.nav-icon {
    width: 20px;
    text-align: center;
}

.coming-soon {
    margin-right: auto;
    color: #696969;
    font-size: 10px;
}

.nav-item.active .coming-soon {
    color: rgba(0,0,0,.45);
}

.sidebar-bottom {
    margin-top: auto;
    padding: 16px 10px 4px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8f8f8f;
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(43,170,110,.12);
}

.main-area {
    min-width: 0;
    padding: 28px 34px 48px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    margin-bottom: 26px;
}

.topbar h1 {
    margin: 5px 0 0;
    font-size: 31px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-button,
.logout-button {
    border: 1px solid #deddd8;
    background: #fff;
    color: #333;
    border-radius: 11px;
    min-height: 43px;
    cursor: pointer;
}

.icon-button {
    width: 43px;
}

.logout-button {
    padding: 0 14px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #deddd8;
    border-radius: 13px;
    padding: 6px 9px 6px 13px;
}

.avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #171717;
    background: var(--gold);
    font-weight: 800;
}

.user-chip-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.user-chip-text strong {
    font-size: 13px;
}

.user-chip-text span {
    color: #818181;
    font-size: 11px;
    margin-top: 3px;
}

.welcome-panel {
    display: flex;
    justify-content: space-between;
    gap: 25px;
    align-items: flex-end;
    background: #181818;
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 30px 32px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}

.welcome-label {
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
}

.welcome-panel h2 {
    font-size: 29px;
    margin: 8px 0 10px;
}

.welcome-panel p {
    margin: 0;
    color: #a9a9a9;
    line-height: 1.7;
    max-width: 700px;
}

.branch-switcher {
    display: flex;
    background: #232323;
    border-radius: 12px;
    padding: 4px;
    flex-shrink: 0;
}

.branch-button {
    min-width: 82px;
    height: 38px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8c8c8c;
    cursor: pointer;
}

.branch-button.active {
    background: var(--gold);
    color: #141414;
    font-weight: 800;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.stat-card {
    background: #fff;
    border: 1px solid #e4e2dd;
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: 0 8px 22px rgba(0,0,0,.035);
}

.stat-label {
    color: #727272;
    font-size: 13px;
}

.stat-card strong {
    display: block;
    font-size: 34px;
    color: #222;
    margin: 8px 0 1px;
}

.stat-card small {
    color: #aaa;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: 16px;
}

.content-card {
    background: #fff;
    border: 1px solid #e4e2dd;
    border-radius: var(--radius-lg);
    padding: 23px;
}

.card-heading span {
    color: var(--gold-dark);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.card-heading h3 {
    margin: 4px 0 20px;
    font-size: 20px;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.quick-action {
    min-height: 105px;
    border: 1px solid #e6e4de;
    background: #faf9f6;
    border-radius: 14px;
    cursor: pointer;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.quick-action:hover {
    border-color: rgba(169,133,54,.45);
    background: #fffdf7;
}

.quick-action b {
    color: var(--gold-dark);
    font-size: 24px;
}

.health-list {
    display: grid;
    gap: 2px;
}

.health-list > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid #eeece7;
    color: #656565;
}

.health-list > div:last-child {
    border-bottom: 0;
}

.health-list strong {
    color: #272727;
}

.health-ok {
    color: #218a59 !important;
}

@media (max-width: 1100px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
    }

    .mobile-logo-wrap {
        display: block;
        margin-bottom: 35px;
    }

    .mobile-login-logo {
        display: block;
        width: 100%;
        max-width: 330px;
        max-height: 105px;
        margin: 0 auto;
        object-fit: contain;
    }

    .app-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .login-form-panel {
        padding: 25px 20px;
    }

    .login-footer {
        flex-direction: column;
        gap: 6px;
    }

    .app-layout {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .sidebar-nav,
    .sidebar-bottom {
        display: none;
    }

    .sidebar-brand {
        border: 0;
        padding-bottom: 5px;
    }

    .sidebar-logo {
        max-height: 60px;
    }

    .main-area {
        padding: 20px 15px 35px;
    }

    .topbar {
        align-items: flex-start;
    }

    .user-chip {
        display: none;
    }

    .welcome-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .branch-switcher {
        overflow-x: auto;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 460px) {
    .stats-grid,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .topbar-actions .icon-button {
        display: none;
    }
}
