/* ============================================================
   PINNACLE SQUARE — Lead Manage
   Design Language: Dark Luxury · Gold Accents · Modern Sans
   (matches the Pinnacle Square site + Nexus management portal)
   ============================================================ */

:root {
    /* Surfaces */
    --bg:            #0c1018;
    --surface:       #131b27;   /* cards / sidebar / topbar */
    --surface-alt:   #1a2535;   /* subtle fills, table head */
    --surface-hover: #1f2d42;
    --border:        #1d2838;
    --border-strong: #2a3a4f;

    /* Text */
    --text:          #f0e8de;
    --muted:         #8a7f74;
    --faint:         #5d6b7b;

    /* Gold accent (the "primary") */
    --primary:       #c9a87a;
    --primary-dark:  #dfc19e;   /* used as the lighter hover tint */
    --primary-light: rgba(201,168,122,0.10);
    --gold-border:   rgba(201,168,122,0.22);
    --on-primary:    #0c1018;

    /* Status */
    --success:       #4caf78;
    --success-light: rgba(76,175,120,0.12);
    --warning:       #e0a030;
    --warning-light: rgba(224,160,48,0.12);
    --danger:        #e05858;
    --danger-light:  rgba(224,88,88,0.12);
    --info:          #5aa9e6;
    --info-light:    rgba(90,169,230,0.12);

    /* Legacy aliases kept so no view breaks */
    --sidebar-bg:    #131b27;
    --sidebar-text:  #8a7f74;
    --sidebar-hover: #1a2535;

    --radius:    12px;
    --radius-sm: 8px;
    --shadow:    0 8px 30px rgba(0, 0, 0, .45);
    --shadow-lg: 0 16px 44px rgba(0, 0, 0, .55);
    --sidebar-w: 264px;
    --transition: .2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.serif { font-family: 'Cormorant Garamond', Georgia, serif; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-alt); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-border); }

/* ------------------------------------------------------------------ layout */

.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: var(--surface);
    color: var(--text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    overflow-y: auto;
    border-right: 1px solid var(--border);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--border);
}

.sidebar__logo {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--primary-light);
    border: 1px solid var(--gold-border);
    display: grid; place-items: center;
    flex-shrink: 0;
}
.sidebar__logo svg { display: block; }

.sidebar__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 15px; font-weight: 600;
    color: var(--primary);
    letter-spacing: .14em;
    text-transform: uppercase;
}
.sidebar__subtitle {
    font-size: 10px; color: var(--faint);
    letter-spacing: .15em; text-transform: uppercase;
    margin-top: 2px;
}

.sidebar__nav { padding: 12px 12px; flex: 1; }

.sidebar__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: var(--faint);
    font-weight: 600;
    padding: 18px 12px 8px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 500;
    font-size: 13.5px;
    margin-bottom: 2px;
    position: relative;
    transition: background var(--transition), color var(--transition);
}
.sidebar__link:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }
.sidebar__link.is-active { background: var(--primary-light); color: var(--primary); }
.sidebar__link.is-active::before {
    content: '';
    position: absolute;
    left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}
.sidebar__link svg { width: 17px; height: 17px; flex-shrink: 0; }

.sidebar__badge {
    margin-left: auto;
    background: var(--primary);
    color: var(--on-primary);
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}
.sidebar__link.is-active .sidebar__badge { background: var(--primary); color: var(--on-primary); }

.sidebar__footer { padding: 14px 14px 18px; border-top: 1px solid var(--border); }

.sidebar__user {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 10px;
    color: var(--muted);
}
.sidebar__user:hover { background: var(--surface-alt); text-decoration: none; }
.sidebar__user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sidebar__user-role { font-size: 11px; color: var(--muted); }

.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: rgba(12, 16, 24, .88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar__title { font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--text); }
.topbar__search { margin-left: auto; width: min(320px, 40vw); }
.topbar__actions { display: flex; align-items: center; gap: 10px; }

.menu-toggle {
    display: none;
    background: var(--surface-alt); border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 36px; height: 36px;
    cursor: pointer;
    color: var(--text);
}

.content { padding: 28px; flex: 1; max-width: 1500px; width: 100%; }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-head h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 30px; font-weight: 500; letter-spacing: 0;
    color: var(--text);
}
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.page-head__actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ cards */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: none;
    overflow: hidden;
}
.card + .card { margin-top: 18px; }

.card__head {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.card__title { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.card__subtitle { font-size: 12.5px; color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }
.card__foot {
    padding: 13px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface-alt);
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
}

/* ------------------------------------------------------------------ grid */

.grid { display: grid; gap: 16px; }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--sidebar { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }

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

/* ------------------------------------------------------------------ stats */

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    display: block;
    color: inherit;
    transition: border-color var(--transition), transform var(--transition);
}
.stat::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 60px; height: 60px;
    background: radial-gradient(circle, var(--primary-light), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.stat:hover { border-color: var(--gold-border); }
a.stat:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--gold-border); box-shadow: var(--shadow); }

.stat__label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 600;
    display: flex; align-items: center; gap: 7px;
}
.stat__value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 34px; font-weight: 600; letter-spacing: 0;
    margin-top: 6px; line-height: 1;
    color: var(--text);
}
.stat__meta { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.stat__icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: grid; place-items: center; margin-left: auto;
    background: var(--primary-light);
    border: 1px solid var(--gold-border);
    color: var(--primary);
}
.stat__head { display: flex; align-items: flex-start; gap: 10px; }

.stat--danger .stat__value { color: var(--danger); }
.stat--warning .stat__value { color: var(--warning); }
.stat--success .stat__value { color: var(--success); }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }

table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.table th {
    text-align: left;
    padding: 11px 14px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; color: var(--text); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-alt); }
.table td.nowrap, .table th.nowrap { white-space: nowrap; }
.table .col-check { width: 34px; }
.table .col-actions { width: 1%; white-space: nowrap; text-align: right; }

.table__primary { font-weight: 600; color: var(--text); }
.table__secondary { font-size: 12.5px; color: var(--muted); }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty__icon { font-size: 30px; margin-bottom: 8px; opacity: .4; }
.empty__title { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 15px; }

/* ------------------------------------------------------------------ badges */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.7;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge--new         { background: rgba(90,169,230,.12);  color: #7cb8ef;  border-color: rgba(90,169,230,.22); }
.badge--contacted   { background: rgba(90,200,230,.12);  color: #71ccec;  border-color: rgba(90,200,230,.22); }
.badge--qualified   { background: rgba(139,120,246,.14); color: #b3a4f6;  border-color: rgba(139,120,246,.24); }
.badge--proposal    { background: var(--primary-light);  color: var(--primary); border-color: var(--gold-border); }
.badge--negotiation { background: rgba(224,140,60,.14);  color: #eeb173;  border-color: rgba(224,140,60,.24); }
.badge--won         { background: var(--success-light);  color: var(--success); border-color: rgba(76,175,120,.24); }
.badge--lost        { background: var(--danger-light);   color: var(--danger);  border-color: rgba(224,88,88,.24); }
.badge--muted       { background: var(--surface-alt);    color: var(--muted);   border-color: var(--border); }

.badge--low     { background: var(--surface-alt);    color: var(--muted);   border-color: var(--border); }
.badge--medium  { background: rgba(90,169,230,.12);  color: #7cb8ef;  border-color: rgba(90,169,230,.22); }
.badge--high    { background: rgba(224,140,60,.14);  color: #eeb173;  border-color: rgba(224,140,60,.24); }
.badge--urgent  { background: var(--danger-light);   color: var(--danger);  border-color: rgba(224,88,88,.24); }

.badge--admin   { background: rgba(139,120,246,.14); color: #b3a4f6;  border-color: rgba(139,120,246,.24); }
.badge--manager { background: rgba(90,169,230,.12);  color: #7cb8ef;  border-color: rgba(90,169,230,.22); }
.badge--agent   { background: var(--surface-alt);    color: var(--muted);   border-color: var(--border); }

.badge--overdue { background: var(--danger-light);  color: var(--danger);  border-color: rgba(224,88,88,.24); }
.badge--today   { background: var(--warning-light); color: var(--warning); border-color: rgba(224,160,48,.24); }
.badge--ok      { background: var(--surface-alt);   color: var(--muted);   border-color: var(--border); }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }

/* ------------------------------------------------------------------ avatars */

.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--gold-border);
    display: grid; place-items: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}
.avatar--lg { width: 44px; height: 44px; font-size: 15px; }
.avatar--dark { background: var(--surface-alt); color: var(--primary); border-color: var(--gold-border); }
.user-cell { display: flex; align-items: center; gap: 9px; }

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: .02em;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover { text-decoration: none; }
.btn svg { width: 15px; height: 15px; }

.btn--primary { background: var(--primary); color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-dark); box-shadow: 0 4px 20px rgba(201,168,122,.28); transform: translateY(-1px); }
.btn--primary:active { transform: translateY(0); }

.btn--secondary { background: var(--surface-alt); color: var(--text); border-color: var(--border); }
.btn--secondary:hover { background: var(--surface-hover); border-color: var(--gold-border); }

.btn--danger { background: var(--danger-light); color: var(--danger); border-color: rgba(224,88,88,.25); }
.btn--danger:hover { background: rgba(224,88,88,.2); }

.btn--ghost { background: transparent; color: var(--muted); }
.btn--ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn--sm { padding: 6px 11px; font-size: 12.5px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-group { display: inline-flex; gap: 6px; }

/* ------------------------------------------------------------------ forms */

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.form-grid--full > .field--full { grid-column: 1 / -1; }
.field--full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    color: var(--muted);
}
.field__hint { font-size: 12px; color: var(--muted); }
.field__error { font-size: 12px; color: var(--danger); font-weight: 500; }
.required { color: var(--danger); }

.input, .select, .textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--text);
    background: var(--surface-alt);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--gold-border);
    box-shadow: 0 0 0 3px rgba(201, 168, 122, .1);
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.55; }

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a7f74' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}

.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; color: var(--text); }
.checkbox input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

.form-actions {
    display: flex;
    gap: 9px;
    justify-content: flex-end;
    padding-top: 18px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.fieldset-title {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--muted);
    font-weight: 600;
    margin: 24px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.fieldset-title:first-child { margin-top: 0; }

/* ------------------------------------------------------------------ filters */

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 140px; flex: 1 1 140px; }
.filters .field--search { flex: 2 1 230px; }
.filters__actions { display: flex; gap: 7px; }

.chip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
}
.chip:hover { background: var(--surface-hover); text-decoration: none; color: var(--text); }
.chip.is-active { background: var(--primary-light); border-color: var(--gold-border); color: var(--primary); }

/* ------------------------------------------------------------------ alerts */

.alert {
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-size: 13.5px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert--success { background: var(--success-light); border-color: rgba(76,175,120,.28);  color: #7fd6a6; }
.alert--error   { background: var(--danger-light);  border-color: rgba(224,88,88,.28);   color: #f0a0a0; }
.alert--warning { background: var(--warning-light); border-color: rgba(224,160,48,.28);  color: #eec27a; }
.alert--info    { background: var(--info-light);    border-color: rgba(90,169,230,.28);  color: #9ccbf0; }

.alert__list { margin: 4px 0 0 16px; font-size: 13px; }

/* ------------------------------------------------------------------ pagination */

.pagination { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface-alt);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    min-width: 34px;
    text-align: center;
}
.pagination a:hover { background: var(--surface-hover); text-decoration: none; color: var(--text); }
.pagination .is-current { background: var(--primary-light); border-color: var(--gold-border); color: var(--primary); }
.pagination .is-disabled { opacity: .4; pointer-events: none; }
.pagination__info { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ timeline */

.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 12px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--border);
}
.timeline__item { position: relative; padding-bottom: 20px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__marker {
    position: absolute;
    left: -30px; top: 1px;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--surface-alt);
    border: 2px solid var(--border);
    display: grid; place-items: center;
    font-size: 11px;
    z-index: 1;
}
.timeline__head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.timeline__title { font-weight: 600; font-size: 13.5px; color: var(--text); }
.timeline__time { font-size: 12px; color: var(--faint); margin-left: auto; }
.timeline__body {
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-top: 6px;
    white-space: pre-wrap;
    word-break: break-word;
}
.timeline__meta { font-size: 12px; color: var(--muted); margin-top: 5px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ detail lists */

.detail-list { display: grid; gap: 0; }
.detail-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row dt { color: var(--muted); font-weight: 500; }
.detail-row dd { font-weight: 500; word-break: break-word; color: var(--text); }

/* ------------------------------------------------------------------ charts */

.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 170px; padding-top: 10px; }
.bar-chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.bar-chart__stack { width: 100%; display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 100%; }
.bar-chart__bar { width: 42%; max-width: 22px; border-radius: 4px 4px 0 0; min-height: 3px; transition: opacity var(--transition); }
.bar-chart__bar--total { background: var(--gold-border); }
.bar-chart__bar--won { background: var(--success); }
.bar-chart__label { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.legend__item { display: flex; align-items: center; gap: 6px; }
.legend__swatch { width: 10px; height: 10px; border-radius: 3px; }

.progress-row { display: flex; align-items: center; gap: 11px; padding: 7px 0; font-size: 13.5px; }
.progress-row__label { min-width: 120px; font-weight: 550; color: var(--text); }
.progress-row__track { flex: 1; height: 7px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.progress-row__fill { height: 100%; border-radius: 999px; background: var(--primary); }
.progress-row__value { min-width: 54px; text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--text); }

/* ------------------------------------------------------------------ auth (two-panel, matches Nexus portal) */

.auth { min-height: 100vh; overflow: hidden; }
.auth__container {
    display: grid;
    grid-template-columns: 480px 1fr;
    min-height: 100vh;
}

/* Left — form panel */
.auth__panel {
    background: var(--surface);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px 56px;
    position: relative;
    z-index: 2;
    border-right: 1px solid var(--gold-border);
}
.auth__logo-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 48px; }
.auth__logo-mark {
    width: 44px; height: 44px; border-radius: 11px;
    background: var(--primary-light); border: 1px solid var(--gold-border);
    display: grid; place-items: center; flex-shrink: 0;
}
.auth__brand-name {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.05rem; font-weight: 600;
    letter-spacing: .18em; color: var(--primary);
    text-transform: uppercase;
}
.auth__brand-sub {
    display: block; font-size: .6rem; letter-spacing: .22em;
    color: var(--muted); text-transform: uppercase; margin-top: 2px;
}
.auth__title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem; font-weight: 500; color: var(--text); margin-bottom: 6px;
}
.auth__subtitle { font-size: .875rem; color: var(--muted); margin-bottom: 34px; }
.auth__footer { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }

/* Right — brand panel */
.auth__brand {
    position: relative;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px 64px;
    overflow: hidden;
}
.auth__brand-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 70% 30%, rgba(201,168,122,.07) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(201,168,122,.04) 0%, transparent 50%);
    pointer-events: none;
}
.auth__brand-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: .3;
    pointer-events: none;
}
.auth__brand-headline {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 4.2rem; font-weight: 400; line-height: 1;
    color: var(--primary); opacity: .85;
    position: relative; margin-bottom: 22px;
}
.auth__brand-headline em { font-style: italic; color: var(--text); opacity: .9; }
.auth__brand-desc { font-size: .9rem; color: var(--muted); line-height: 1.7; max-width: 420px; margin-bottom: 36px; position: relative; }
.auth__pills { display: flex; flex-wrap: wrap; gap: 10px; position: relative; }
.auth__pill {
    background: var(--primary-light);
    border: 1px solid var(--gold-border);
    color: var(--primary-dark);
    font-size: .75rem; letter-spacing: .08em;
    padding: 7px 14px; border-radius: 20px;
    display: flex; align-items: center; gap: 6px;
}
.auth__pill-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); display: inline-block; }
.auth__location { position: absolute; top: 40px; right: 40px; text-align: right; }
.auth__location-text { font-size: .7rem; letter-spacing: .2em; color: var(--faint); text-transform: uppercase; }
.auth__location-city { font-size: .85rem; color: var(--primary); opacity: .7; letter-spacing: .1em; }

/* ------------------------------------------------------------------ utilities */

.stack   { display: flex; flex-direction: column; gap: 16px; }
.row     { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--end { justify-content: flex-end; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.text-muted  { color: var(--muted); }
.text-faint  { color: var(--faint); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.text-warning{ color: var(--warning); }
.text-gold   { color: var(--primary); }
.text-sm     { font-size: 12.5px; }
.text-lg     { font-size: 16px; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.tabular { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }

.inline-form { display: inline; }

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--primary-light);
    border-bottom: 1px solid var(--gold-border);
    flex-wrap: wrap;
    font-size: 13.5px;
    color: var(--text);
}
.bulk-bar select { max-width: 190px; }

.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 35;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
    body.nav-open .sidebar { transform: translateX(0); box-shadow: var(--shadow); }
    body.nav-open .sidebar-backdrop { display: block; }
    .main { margin-left: 0; }
    .menu-toggle { display: grid; place-items: center; }
    .topbar { padding: 0 16px; }
    .topbar__search { display: none; }
    .content { padding: 18px 16px; }
    .detail-row { grid-template-columns: 1fr; gap: 2px; }
    .grid--sidebar { grid-template-columns: 1fr; }
    .auth__container { grid-template-columns: 1fr; }
    .auth__brand { display: none; }
    .auth__panel { padding: 48px 32px; }
}

@media (max-width: 560px) {
    .page-head h1 { font-size: 25px; }
    .stat__value { font-size: 29px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
}

@media print {
    .sidebar, .topbar, .page-head__actions, .form-actions, .pagination, .filters { display: none !important; }
    .main { margin-left: 0; }
    .card { box-shadow: none; border-color: var(--border); break-inside: avoid; }
    body { background: #fff; color: #111; }
}
