/* ─────────────────────────────────────────────────────────────
   Fongué Performance — Dashboard
   Brand: Orbitron (headings) + Inter (body)
         #9cec13 neon-lime accent · #ffbf00 gold · #141414 dark
───────────────────────────────────────────────────────────── */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    /* brand */
    --lime:           #9cec13;
    --lime-dim:       rgba(156,236,19,.12);
    --lime-glow:      0 0 16px rgba(156,236,19,.35);
    --gold:           #ffbf00;
    --gold-dim:       rgba(255,191,0,.12);

    /* dark palette */
    --bg:             #0d0d0d;
    --bg-card:        #191919;
    --bg-card-hover:  #1f1f1f;
    --bg-input:       #1d1d1d;
    --sidebar-bg:     #111111;
    --border:         #2e2e2e;
    --border-strong:  #3d3d3d;

    /* text */
    --text-primary:   #f2f2f2;
    --text-secondary: #9e9e9e;
    --text-muted:     #686868;

    /* status */
    --success:        #22c55e;
    --success-bg:     rgba(34,197,94,.12);
    --warning:        #f59e0b;
    --warning-bg:     rgba(245,158,11,.12);
    --danger:         #ef4444;
    --danger-bg:      rgba(239,68,68,.12);
    --info:           #38bdf8;
    --info-bg:        rgba(56,189,248,.12);

    /* layout */
    --sidebar-width:  252px;
    --header-h:       58px;
    --radius:         10px;
    --radius-sm:      6px;
    --shadow:         0 1px 4px rgba(0,0,0,.5);
    --shadow-md:      0 8px 24px rgba(0,0,0,.6);
    --transition:     .15s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--lime); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* Orbitron helper */
.font-orbitron { font-family: 'Orbitron', sans-serif; }

/* ─────────────────────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────────────────────── */
.login-body { background: #0a0a0a; }

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

.login-brand {
    width: 44%;
    background: #0a0a0a;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}
/* neon glow backdrop */
.login-brand::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(156,236,19,.08) 0%, transparent 70%);
    pointer-events: none;
}
.login-brand-inner {
    max-width: 360px;
    position: relative;
    z-index: 1;
}
.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    border: 1px solid var(--lime);
    box-shadow: var(--lime-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: var(--lime);
    letter-spacing: -1px;
    margin-bottom: 28px;
}
.login-brand h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .5px;
    margin-bottom: 12px;
    line-height: 1.3;
}
.login-brand p {
    color: var(--text-secondary);
    font-size: .88rem;
    line-height: 1.7;
    margin-bottom: 36px;
}
.login-features { display: flex; flex-direction: column; gap: 12px; }
.login-feature {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-secondary); font-size: .85rem;
}
.feat-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--lime); flex-shrink: 0;
    box-shadow: 0 0 6px var(--lime);
}

/* Form panel */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--bg-card);
}
.login-form-inner { width: 100%; max-width: 380px; }
.login-form-inner h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: .3px;
    margin-bottom: 6px;
}
.login-sub { color: var(--text-secondary); margin-bottom: 32px; font-size: .88rem; }

.demo-hint {
    margin-top: 24px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .8rem;
    color: var(--text-secondary);
}
.demo-hint code {
    background: var(--border);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: .78rem;
    color: var(--lime);
}

/* ─────────────────────────────────────────────────────────────
   APP SHELL
───────────────────────────────────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ────────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 200;
    transition: transform var(--transition);
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo {
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1px solid var(--lime);
    box-shadow: 0 0 10px rgba(156,236,19,.25);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px; font-weight: 900;
    color: var(--lime); flex-shrink: 0;
    letter-spacing: -.5px;
}
.sidebar-brand { flex: 1; }
.sidebar-brand-name {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: .75rem; font-weight: 700;
    color: #fff; line-height: 1.2; letter-spacing: .3px;
}
.sidebar-brand-sub {
    display: block;
    font-size: .68rem;
    color: var(--text-muted);
    letter-spacing: .05em;
}
.sidebar-close {
    display: none; background: none; border: none;
    color: var(--text-muted); font-size: 18px; padding: 4px; line-height: 1;
}

/* Nav */
.sidebar-nav {
    flex: 1; padding: 10px 8px; overflow-y: auto;
}
.nav-section-label {
    font-size: .65rem; font-weight: 600;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-muted); padding: 8px 8px 4px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: .86rem; font-weight: 500;
    transition: background var(--transition), color var(--transition);
    margin-bottom: 1px; text-decoration: none;
}
.nav-item:hover {
    background: rgba(156,236,19,.06);
    color: var(--lime);
    text-decoration: none;
}
.nav-item.active {
    background: var(--lime-dim);
    color: var(--lime);
    border-left: 2px solid var(--lime);
    padding-left: 8px;
}
.nav-icon { display: flex; align-items: center; flex-shrink: 0; }

/* Footer */
.sidebar-footer {
    padding: 12px 12px;
    border-top: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
}
.sidebar-user { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.sidebar-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--lime-dim); border: 1px solid var(--lime);
    color: var(--lime); display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
    display: block; font-size: .8rem; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role { display: block; font-size: .68rem; color: var(--text-muted); }
.sidebar-logout {
    color: var(--text-muted); display: flex; align-items: center;
    padding: 6px; border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.sidebar-logout:hover { color: var(--lime); background: var(--lime-dim); text-decoration: none; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.7); z-index: 199;
}

/* ── Main wrapper ───────────────────────────────────────────── */
.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex; flex-direction: column; min-width: 0;
}

/* ── Top bar ────────────────────────────────────────────────── */
.topbar {
    height: var(--header-h);
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
    padding: 0 24px; position: sticky; top: 0; z-index: 100;
}
.topbar-menu-btn {
    display: none; background: none; border: none;
    color: var(--text-secondary); padding: 4px; border-radius: 6px;
}
.topbar-title { flex: 1; }
.topbar-title h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: .85rem; font-weight: 700;
    letter-spacing: .5px; color: var(--text-primary);
}
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--lime-dim); border: 1px solid var(--lime);
    color: var(--lime); display: flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700;
}

/* ── Page content ───────────────────────────────────────────── */
.page-content {
    flex: 1; padding: 28px 28px 56px;
    max-width: 1400px; width: 100%;
}
.page-header {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 24px; gap: 12px;
}
.page-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem; font-weight: 800;
    letter-spacing: .5px; color: #fff;
}
.page-sub { color: var(--text-secondary); font-size: .85rem; }
.page-header-actions {
    display: flex; gap: 8px; align-items: center; flex-shrink: 0;
}
.btn-icon-only {
    padding-left: 10px; padding-right: 10px;
}
@media (max-width: 768px) {
    .page-header { margin-bottom: 16px; }
    .page-header-actions { gap: 6px; }
    .page-header-actions .btn-sm { font-size: .75rem; padding: 8px 10px; }
}

/* ─────────────────────────────────────────────────────────────
   COMPONENTS
───────────────────────────────────────────────────────────── */

/* Stats row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px; margin-bottom: 20px;
}
.stats-row-5 { grid-template-columns: repeat(5, 1fr); }
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
}
.stat-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
}
.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem; font-weight: 700;
    letter-spacing: -.5px; line-height: 1.1;
    color: #fff;
}
.stat-label { font-size: .75rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-trend { font-size: .73rem; margin-top: 6px; }
.trend-up   { color: var(--lime); }
.trend-down { color: var(--danger); }
.trend-neutral { color: var(--text-muted); }

/* Card */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden; margin-bottom: 18px;
}
.card-toolbar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.card-header-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 10px; border-bottom: 1px solid var(--border);
}
.card-title { font-weight: 600; font-size: .9rem; color: var(--text-primary); }
.card-subtitle { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* Table */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.data-table th {
    text-align: left; padding: 9px 14px;
    font-size: .68rem; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--text-muted); border-bottom: 1px solid var(--border);
    white-space: nowrap; background: var(--sidebar-bg);
}
.data-table td {
    padding: 11px 14px; border-bottom: 1px solid var(--border);
    color: var(--text-primary); vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-card-hover); }

/* Search & filter */
.search-input {
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .83rem; outline: none;
    width: 210px;
    background: var(--bg-input); color: var(--text-primary);
    transition: border-color var(--transition);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--lime); }
.filter-select {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .83rem; outline: none;
    background: var(--bg-input); color: var(--text-primary); cursor: pointer;
}

/* Avatar cell */
.avatar-cell { display: flex; align-items: center; gap: 9px; }
.mini-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--lime-dim); color: var(--lime);
    font-size: .7rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    border: 1px solid rgba(156,236,19,.2);
}

/* Row actions */
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.action-btn {
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 5px 7px;
    color: var(--text-muted); display: flex; align-items: center;
    transition: all var(--transition);
}
.action-btn:hover { color: var(--lime); border-color: var(--lime); background: var(--lime-dim); text-decoration: none; }
.action-btn-success:hover { color: var(--lime); border-color: var(--lime); background: var(--lime-dim); }

/* Badges */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 20px;
    font-size: .7rem; font-weight: 600;
    letter-spacing: .03em; white-space: nowrap;
}
.badge-success  { background: var(--success-bg); color: var(--success); }
.badge-warning  { background: var(--warning-bg); color: var(--warning); }
.badge-danger   { background: var(--danger-bg);  color: var(--danger); }
.badge-info     { background: var(--info-bg);    color: var(--info); }
.badge-orange   { background: rgba(234,88,12,.12); color: #f97316; }
.badge-neutral  { background: rgba(255,255,255,.06); color: var(--text-secondary); }
.badge-lime     { background: var(--lime-dim); color: var(--lime); }

/* Alerts */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    margin-bottom: 18px; font-size: .86rem; font-weight: 500;
}
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3); }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,.3); }

/* Toast notifications */
.toast-container {
    position: fixed; top: 16px; right: 16px; z-index: 10000;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: none; max-width: min(400px, calc(100vw - 32px));
}
.toast {
    pointer-events: auto;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px 36px 12px 14px;
    font-size: .84rem; font-weight: 500; line-height: 1.4;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    position: relative; overflow: hidden;
    transform: translateX(120%); opacity: 0;
    transition: transform .3s cubic-bezier(.22,1,.36,1), opacity .3s ease;
    touch-action: pan-x; user-select: none;
}
.toast.toast-in   { transform: translateX(0); opacity: 1; }
.toast.toast-out  { transform: translateX(120%); opacity: 0; }
.toast-success { border-left: 3px solid var(--success); color: var(--success); }
.toast-error   { border-left: 3px solid var(--danger);  color: var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); color: var(--warning); }
.toast-info    { border-left: 3px solid var(--lime);    color: var(--lime); }
.toast-dismiss {
    position: absolute; top: 6px; right: 6px;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1rem; line-height: 1;
    padding: 4px; border-radius: 3px;
}
.toast-dismiss:hover { color: var(--text); background: var(--hover); }
.toast-progress {
    position: absolute; bottom: 0; left: 0; height: 2px;
    background: currentColor; opacity: .5;
    transition: none;
}
.toast-progress.running { transition: width linear; }

/* Confirm dialog */
.confirm-backdrop {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(0,0,0,.55); display: flex;
    align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s ease;
}
.confirm-backdrop.confirm-open { opacity: 1; }
.confirm-dialog {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px;
    max-width: 380px; width: calc(100vw - 32px);
    box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.confirm-title {
    font-weight: 600; font-size: 1rem; margin-bottom: 8px;
    color: var(--text);
}
.confirm-message {
    font-size: .85rem; color: var(--text-secondary);
    margin-bottom: 20px; line-height: 1.5;
}
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: .83rem; font-weight: 600;
    border: 1px solid transparent; cursor: pointer;
    transition: all var(--transition); text-decoration: none; white-space: nowrap;
}
.btn-primary {
    background: var(--lime); color: #0a0a0a; border-color: var(--lime);
}
.btn-primary:hover {
    background: #aaff1a; border-color: #aaff1a;
    box-shadow: var(--lime-glow); text-decoration: none; color: #0a0a0a;
}
.btn-ghost {
    background: transparent; color: var(--text-secondary);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: rgba(255,255,255,.04); color: var(--text-primary);
    text-decoration: none;
}
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 5px 11px; font-size: .78rem; }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block; font-size: .8rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%; padding: 8px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: .86rem; color: var(--text-primary);
    background: var(--bg-input); outline: none;
    font-family: inherit;
    transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(156,236,19,.1);
}
.form-group textarea { resize: vertical; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-row-between {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; font-size: .82rem;
}
.form-note { margin-top: 10px; font-size: .78rem; color: var(--text-muted); }

/* Password toggle */
.password-wrap { position: relative; }
.password-wrap input { padding-right: 40px; }
.pw-toggle {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted);
    padding: 0; display: flex; align-items: center;
}
.pw-toggle:hover { color: var(--lime); }

/* Checkbox */
.checkbox-label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.checkbox-label input[type=checkbox] { width: auto; cursor: pointer; accent-color: var(--lime); }
.text-link { color: var(--lime); font-size: .82rem; }

/* Mono */
.mono { font-family: 'Courier New', monospace; font-size: .8rem; color: var(--lime); }

/* Utility */
.text-success { color: var(--lime) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger  { color: var(--danger) !important; }
.text-muted   { color: var(--text-muted) !important; }
.hidden       { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   MODAL
───────────────────────────────────────────────────────────── */
.modal-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.75); z-index: 500;
    align-items: center; justify-content: center; padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    width: 100%; max-width: 480px;
    max-height: 90vh; overflow-y: auto;
    animation: slideUp .18s ease;
}
.modal-lg { max-width: 620px; }
@keyframes slideUp {
    from { transform: translateY(14px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: .88rem; font-weight: 700; letter-spacing: .3px;
}
.modal-close {
    background: none; border: none; font-size: 18px;
    color: var(--text-muted); line-height: 1; padding: 4px;
    border-radius: 4px; transition: color var(--transition);
}
.modal-close:hover { color: var(--lime); }
.modal-body { padding: 20px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 10px;
    padding-top: 8px; border-top: 1px solid var(--border); margin-top: 8px;
}
#salesOrderModal .modal {
    display: flex; flex-direction: column; overflow: hidden;
}
#salesOrderModal .modal-body {
    overflow-y: auto; flex: 1;
}
#salesOrderModal .modal-footer {
    flex-shrink: 0; margin-top: 0; padding: 12px 20px;
}

/* ─────────────────────────────────────────────────────────────
   PIPELINE STRIP (Sales)
───────────────────────────────────────────────────────────── */
.pipeline-strip {
    display: flex; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; margin-bottom: 18px;
}
.pipeline-stage {
    flex: 1; padding: 13px 14px;
    border-right: 1px solid var(--border); text-align: center;
}
.pipeline-stage:last-child { border-right: none; }
.pipeline-stage-name {
    font-size: .65rem; color: var(--text-muted);
    font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}
.pipeline-stage-count {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.15rem; font-weight: 700; color: #fff;
}
.pipeline-stage-val { font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

/* ─────────────────────────────────────────────────────────────
   PROGRAMS GRID
───────────────────────────────────────────────────────────── */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px; margin-bottom: 18px;
}
.program-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; flex-direction: column;
    transition: border-color var(--transition);
}
.program-card:hover { border-color: var(--border-strong); }
.program-card-top { padding: 18px 18px 14px; flex: 1; }
.program-card-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 10px; margin-bottom: 10px;
}
.program-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700; font-size: .88rem; color: #fff; letter-spacing: .2px;
}
.program-category { font-size: .72rem; color: var(--text-muted); margin-top: 3px; }
.program-desc { font-size: .82rem; color: var(--text-secondary); line-height: 1.55; }
.program-meta {
    display: flex; flex-wrap: wrap; gap: 8px 14px;
    padding: 11px 18px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.program-meta-item {
    display: flex; align-items: center; gap: 5px;
    font-size: .76rem; color: var(--text-secondary);
}
.program-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px;
}
.program-price { display: flex; align-items: baseline; gap: 3px; }
.price-amount {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem; font-weight: 700; color: var(--lime);
}
.price-period { font-size: .75rem; color: var(--text-muted); }

/* ─────────────────────────────────────────────────────────────
   ANALYTICS
───────────────────────────────────────────────────────────── */
.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analytics-card-wide { grid-column: 1 / -1; }
.chart-area { padding: 16px; position: relative; height: 260px; }

.integration-placeholder {
    padding: 36px 24px; text-align: center; color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.integration-placeholder p { font-size: .86rem; max-width: 280px; }
.integration-note { padding: 12px 20px 16px; font-size: .8rem; text-align: center; }

.social-metrics { padding: 4px 0; }
.social-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 20px; border-bottom: 1px solid var(--border);
    font-size: .84rem;
}
.social-row:last-child { border-bottom: none; }
.social-platform { display: flex; align-items: center; gap: 9px; font-weight: 500; }
.social-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────
   SETTINGS
───────────────────────────────────────────────────────────── */
.settings-layout {
    display: grid; grid-template-columns: 190px 1fr;
    gap: 22px; align-items: start;
}
.settings-nav {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 6px;
    display: flex; flex-direction: column; gap: 2px;
}
.settings-nav-item {
    background: none; border: none; text-align: left;
    padding: 9px 12px; border-radius: var(--radius-sm);
    font-size: .84rem; font-weight: 500;
    color: var(--text-secondary); cursor: pointer;
    transition: all var(--transition);
}
.settings-nav-item:hover { background: rgba(255,255,255,.04); color: var(--text-primary); }
.settings-nav-item.active { background: var(--lime-dim); color: var(--lime); font-weight: 600; }

.settings-content {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
}
.settings-section-header { margin-bottom: 22px; }
.settings-section-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: .88rem; font-weight: 700; letter-spacing: .3px;
    color: #fff; margin-bottom: 4px;
}
.settings-section-header p { font-size: .83rem; color: var(--text-secondary); }
.settings-form .btn { margin-top: 4px; }

.integration-block {
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 15px 18px; margin-bottom: 14px;
    transition: border-color var(--transition);
}
.integration-block:hover { border-color: var(--border-strong); }
.integration-block-head {
    display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.integration-block-head > div:nth-child(2) { flex: 1; }
.integration-block-head strong { font-size: .88rem; display: block; color: var(--text-primary); }
.integration-block-head p { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }
.integration-logo {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .82rem; flex-shrink: 0;
}
.integration-block .form-group { margin-bottom: 0; }

/* Toggle switch */
.toggle-group { margin-bottom: 20px; }
.toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row strong { font-size: .86rem; font-weight: 600; display: block; margin-bottom: 2px; }
.toggle-row p { font-size: .78rem; color: var(--text-secondary); }
.toggle-switch { position: relative; flex-shrink: 0; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
    display: block; width: 38px; height: 20px;
    background: var(--border-strong); border-radius: 20px;
    position: relative; transition: background var(--transition);
}
.toggle-track::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 14px; height: 14px; background: #fff; border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.toggle-switch input:checked + .toggle-track { background: var(--lime); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(18px); }

.session-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; padding: 13px 0;
}
.session-row strong { font-size: .86rem; display: block; }
.session-row p { font-size: .78rem; color: var(--text-secondary); margin-top: 2px; }

.divider { border: none; border-top: 1px solid var(--border); margin: 26px 0; }

/* ─────────────────────────────────────────────────────────────
   ATHLETES / SALES shared helpers
───────────────────────────────────────────────────────────── */
.prog-pill {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 20px;
    font-size: .7rem; font-weight: 600;
    background: var(--lime-dim); color: var(--lime); white-space: nowrap;
}
.tag-chip {
    display: inline-block; padding: 1px 6px; border-radius: 10px;
    font-size: .7rem; background: rgba(255,255,255,.06);
    color: var(--text-secondary); margin: 1px;
}
.source-badge { font-size: .76rem; color: var(--text-secondary); text-transform: capitalize; }
.contact-tags { display: flex; gap: 4px; margin-top: 3px; flex-wrap: wrap; }
.hidden-col { display: none; }
.mt-8 { margin-top: 8px; }

.empty-state {
    padding: 52px 24px; text-align: center; color: var(--text-muted);
    display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: .88rem;
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .stats-row          { grid-template-columns: 1fr 1fr; }
    .stats-row-5        { grid-template-columns: 1fr 1fr; }
    .analytics-grid     { grid-template-columns: 1fr; }
    .analytics-card-wide { grid-column: auto; }
    .settings-layout    { grid-template-columns: 1fr; }
    .settings-nav       { flex-direction: row; overflow-x: auto; flex-wrap: nowrap; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .sidebar-close { display: block; }
    .main-wrap { margin-left: 0; }
    .topbar-menu-btn { display: none !important; } /* bottom nav replaces hamburger */
    .page-content { padding: 18px 14px calc(72px + env(safe-area-inset-bottom)); }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
    .pipeline-strip { display: grid; grid-template-columns: repeat(3,1fr); }
    .login-brand { display: none; }
    /* Drawer safe area */
    .drawer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

    /* ── Compact stat cards ── */
    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-bottom: 14px;
    }
    /* 5-card rows: horizontal scroll strip */
    .stats-row-5 {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        margin-bottom: 14px;
        padding-bottom: 4px; /* space for scrollbar */
        scrollbar-width: none;
    }
    .stats-row-5::-webkit-scrollbar { display: none; }
    .stats-row-5 .stat-card {
        min-width: 130px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }
    /* Tighter card padding + smaller value on mobile */
    .stat-card {
        padding: 12px 14px;
    }
    .stat-value {
        font-size: 1.2rem;
    }
    .stat-icon {
        width: 28px; height: 28px;
        margin-bottom: 6px;
        border-radius: 6px;
    }
    .stat-label { font-size: .70rem; margin-top: 3px; }
    .stat-trend { font-size: .68rem; margin-top: 4px; }
}

@media (max-width: 480px) {
    .programs-grid  { grid-template-columns: 1fr; }
    /* Keep 2-col for stat cards — 1-col wastes too much vertical space */
    .stats-row { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 1.1rem; }
}

/* ─────────────────────────────────────────────────────────────
   ATHLETE CARD GRID
───────────────────────────────────────────────────────────── */
.cards-toolbar {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center;
}

.athlete-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}
@media (min-width: 768px)  { .athlete-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .athlete-grid { grid-template-columns: repeat(3, 1fr); } }

.athlete-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; flex-direction: column;
    cursor: pointer;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.athlete-card:hover {
    border-color: rgba(156,236,19,.35);
    box-shadow: 0 4px 20px rgba(0,0,0,.35);
    transform: translateY(-1px);
}

/* Card header */
.athlete-card-header {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px 10px;
}
.athlete-avatar {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
}
.athlete-avatar-initials {
    background: var(--lime-dim); border: 1px solid rgba(156,236,19,.25);
    color: var(--lime); display: flex; align-items: center; justify-content: center;
    font-size: .85rem; font-weight: 700;
}
.athlete-card-identity { flex: 1; min-width: 0; }
.athlete-name {
    font-weight: 600; font-size: .88rem; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.athlete-meta-row {
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 3px;
}
.athlete-meta-row .badge { font-size: .65rem; padding: 1px 6px; }

/* Card body */
.athlete-card-body {
    padding: 0 14px 8px; flex: 1;
    display: flex; flex-direction: column; gap: 6px;
}
.athlete-milestone-row {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 10px;
    background: rgba(255,255,255,.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.milestone-item { display: flex; align-items: baseline; gap: 6px; }
.milestone-label {
    font-size: .64rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted); flex-shrink: 0; width: 32px;
}
.milestone-value { font-size: .81rem; color: var(--text-primary); flex: 1; }
.milestone-date  {
    font-size: .71rem; font-weight: 600; flex-shrink: 0;
    background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 10px;
}
.athlete-card-footer-info {
    display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
    padding-top: 2px;
}
.athlete-expiry { font-size: .74rem; color: var(--text-secondary); }
.athlete-billing-pill { font-size: .74rem; font-weight: 500; }

/* Card footer: quick actions */
.athlete-card-footer {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-top: 1px solid var(--border);
}
.card-action-btn {
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 5px 9px;
    font-size: .82rem; cursor: pointer; line-height: 1;
    color: var(--text-primary); text-decoration: none;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.card-action-btn:hover {
    border-color: var(--lime); background: var(--lime-dim); text-decoration: none;
}

/* ─────────────────────────────────────────────────────────────
   SLIDE-IN DRAWER
───────────────────────────────────────────────────────────── */
.drawer-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(2px);
    z-index: 399;
    animation: fadeIn .2s ease;
}
.drawer-overlay.open { display: block; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.athlete-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(460px, 100vw);
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    box-shadow: -12px 0 40px rgba(0,0,0,.6);
    z-index: 400;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.athlete-drawer.open { transform: translateX(0); }

.drawer-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.drawer-athlete-id { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.drawer-name {
    font-family: 'Orbitron', sans-serif;
    font-size: .9rem; font-weight: 700; color: #fff; letter-spacing: .2px;
}
.drawer-meta { font-size: .76rem; color: var(--text-secondary); margin-top: 2px; }
.drawer-close {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 6px; border-radius: var(--radius-sm);
    flex-shrink: 0; display: flex; align-items: center;
    transition: color var(--transition), background var(--transition);
}
.drawer-close:hover { color: var(--lime); background: var(--lime-dim); }

.drawer-body {
    flex: 1; overflow-y: auto; padding: 0;
}

/* Sections inside drawer */
.drawer-section {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.drawer-section-label {
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .1em; color: var(--text-muted); margin-bottom: 10px;
}

/* 2-column action grid */
.drawer-action-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
}
.drawer-action-btn {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 11px;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); cursor: pointer;
    font-size: .82rem; color: var(--text-primary); font-family: inherit;
    text-decoration: none; transition: all var(--transition); text-align: left;
}
.drawer-action-btn:hover {
    border-color: var(--lime); background: var(--lime-dim);
    color: var(--text-primary); text-decoration: none;
}
.drawer-action-btn.drawer-action-danger:hover { border-color: var(--danger); background: var(--danger-bg); }
.drawer-action-btn.drawer-action-disabled { opacity: .4; pointer-events: none; }
.da-icon { font-size: 1rem; flex-shrink: 0; }

/* Drawer action dropdowns */
.da-dropdown { position: relative; }
.da-dropdown-toggle { width: 100%; justify-content: flex-start; }
.da-chevron { margin-left: auto; font-size: .7rem; opacity: .5; transition: transform .15s; }
.da-dropdown.open .da-chevron { transform: rotate(180deg); }
.da-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,.45); overflow: hidden; margin-top: -1px;
}
.da-dropdown.open .da-dropdown-menu { display: block; }
.da-dropdown-item {
    display: block; width: 100%; padding: 9px 12px; border: none; background: none;
    color: var(--text-secondary); font-size: .8rem; text-align: left; cursor: pointer;
    transition: background .1s, color .1s; border-bottom: 1px solid var(--border);
}
.da-dropdown-item:last-child { border-bottom: none; }
.da-dropdown-item:hover { background: var(--lime-dim); color: var(--text-primary); }

/* Expiry readonly display */
.drawer-expiry-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 4px;
}
.drawer-expiry-label {
    font-size: .76rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0;
}
.drawer-expiry-readonly {
    flex: 1; padding: 6px 10px;
    background: rgba(255,255,255,.04); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-secondary);
    font-size: .84rem; outline: none; cursor: default;
}

/* Extend panel */
.extend-date-input {
    padding: 7px 10px; border: 1px solid var(--border);
    border-radius: var(--radius-sm); background: var(--bg-input);
    color: var(--text-primary); font-size: .84rem; outline: none;
}
.extend-date-input:focus { border-color: var(--lime); }

/* Drawer tabs */
.drawer-tabs {
    display: flex; border-bottom: 1px solid var(--border);
    flex-shrink: 0; padding: 0 18px;
    position: sticky; top: 0; background: var(--bg-card); z-index: 1;
}
.tab-btn {
    flex: 1; padding: 10px 4px;
    background: none; border: none; border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: .82rem; font-weight: 600; color: var(--text-muted);
    cursor: pointer; transition: all var(--transition); white-space: nowrap;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--lime); border-bottom-color: var(--lime); }

.drawer-tab-panel { padding: 16px 18px; }
.drawer-empty { color: var(--text-muted); font-size: .84rem; padding: 4px 0; }

/* Profile info grid */
.drawer-profile-section { padding: 12px 18px; }
.drawer-profile-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
}
.profile-field {}
.profile-field-label {
    font-size: .63rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted); margin-bottom: 1px;
}
.profile-field-value {
    font-size: .82rem; color: var(--text-primary);
}
.profile-field-value a { color: var(--lime); }

/* ─────────────────────────────────────────────────────────────
   BILLING & HISTORY ROWS
───────────────────────────────────────────────────────────── */
.billing-row {
    display: grid; grid-template-columns: 1fr auto auto;
    gap: 10px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.billing-row:last-child { border-bottom: none; }

.history-row {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.history-row:last-child { border-bottom: none; }

/* ─────────────────────────────────────────────────────────────
   DASHBOARD
───────────────────────────────────────────────────────────── */
.dashboard-cols { display: grid; grid-template-columns: 1fr 380px; gap: 20px; margin-top: 20px; align-items: start; }
@media (max-width: 900px) { .dashboard-cols { grid-template-columns: 1fr; } }

/* ── Calendar ─────────────────────────────────────────────── */
.calendar-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.calendar-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.calendar-dow-row {
    display: grid; grid-template-columns: repeat(7,1fr); gap: 2px;
    border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 4px;
}
.calendar-dow-row span {
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-muted); text-align: center; padding: 4px 0;
}
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-day {
    min-height: 52px; padding: 5px 4px;
    border-radius: 6px; cursor: pointer;
    transition: background var(--transition);
}
.cal-day:hover  { background: rgba(255,255,255,.05); }
.cal-day.outside { opacity: .25; pointer-events: none; }
.cal-day.today  { outline: 1px solid var(--lime); outline-offset: -1px; }
.cal-day.today .cal-day-num { color: var(--lime); font-weight: 700; }
.cal-day.selected { background: var(--lime-dim); }
.cal-day-num {
    font-size: .73rem; color: var(--text-secondary);
    line-height: 1; margin-bottom: 4px;
}
.cal-dots { display: flex; flex-wrap: wrap; gap: 2px; }
.cal-dot  { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.cal-dot.task        { background: var(--lime); }
.cal-dot.expiry      { background: #f97316; }
.cal-dot.milestone   { background: #60a5fa; }
.cal-dot.appointment { background: #a78bfa; }

/* Calendar filter dropdown */
.cal-filter-wrap { position: relative; }
.cal-filter-btn  { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.cal-filter-panel {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 120;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.4);
    padding: 8px 6px; min-width: 148px;
    display: none; flex-direction: column; gap: 2px;
}
.cal-filter-wrap.open .cal-filter-panel { display: flex; }
.cal-fopt {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 8px; border-radius: 6px; cursor: pointer;
    font-size: .8rem; color: var(--text-secondary);
    user-select: none; transition: background .1s;
}
.cal-fopt:hover { background: rgba(255,255,255,.05); }
.cal-fopt input[type=checkbox] { accent-color: var(--lime); cursor: pointer; margin: 0; width: 13px; height: 13px; }
.cal-fopt-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cal-fopt-dot.task        { background: var(--lime); }
.cal-fopt-dot.expiry      { background: #f97316; }
.cal-fopt-dot.milestone   { background: #60a5fa; }
.cal-fopt-dot.appointment { background: #a78bfa; }

/* Day detail panel */
#day-detail {
    margin-top: 16px; padding: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.day-detail-title { font-size: .84rem; font-weight: 600; color: var(--text-primary); }
.day-event-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.05);
    font-size: .82rem;
}
.day-event-row:last-child { border-bottom: none; }
.day-event-row .cal-dot { margin-top: 5px; flex-shrink: 0; }

/* ── Task panel (right column) ────────────────────────────── */
.task-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: calc(var(--header-h) + 20px);
    max-height: calc(100vh - var(--header-h) - 40px);
    overflow-y: auto;
}
.task-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.task-panel-title {
    font-family: 'Orbitron', sans-serif;
    font-size: .82rem; font-weight: 700;
    letter-spacing: .05em; color: var(--text-primary);
}
.task-count-badge {
    background: var(--lime); color: #000;
    font-size: .70rem; font-weight: 700;
    padding: 1px 8px; border-radius: 20px;
}

/* Task rows */
.task-section-label {
    font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted); margin: 14px 0 6px;
}
.task-section-label:first-child { margin-top: 0; }
.task-row {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.05);
}
.task-row:last-child { border-bottom: none; }
.task-row-body  { flex: 1; min-width: 0; }
.task-row-title { font-size: .84rem; font-weight: 500; color: var(--text-primary); }
.task-row-meta  { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .73rem; color: var(--text-muted); margin-top: 3px; }
.task-row-athlete { color: var(--text-secondary); }
.task-complete-btn {
    flex-shrink: 0; padding: 4px 10px;
    background: none; border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: .76rem;
    color: var(--text-muted); cursor: pointer;
    transition: all var(--transition);
}
.task-complete-btn:hover { border-color: var(--lime); color: var(--lime); background: var(--lime-dim); }
.task-overdue-chip {
    background: rgba(239,68,68,.15); color: #fca5a5;
    padding: 1px 7px; border-radius: 10px; font-size: .68rem; white-space: nowrap;
}
.task-due-chip {
    background: rgba(255,255,255,.06); color: var(--text-secondary);
    padding: 1px 7px; border-radius: 10px; font-size: .68rem; white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────────
   KANBAN BOARD (Sales)
───────────────────────────────────────────────────────────── */
.kanban-wrap   { display:flex; gap:14px; overflow-x:auto; padding-bottom:16px; align-items:flex-start; }
.kanban-col    { flex:0 0 280px; background:var(--bg-card); border:1px solid var(--border); border-radius:10px; display:flex; flex-direction:column; }
@media (min-width: 1280px) { .kanban-col { flex-basis: 320px; } }
@media (min-width: 1600px) { .kanban-col { flex-basis: 360px; } }
.kanban-col-header { padding:12px 14px 10px; border-bottom:1px solid var(--border); }
.kanban-col-title  { font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-secondary); }
.kanban-col-meta   { font-size:.72rem; color:var(--text-muted); margin-top:2px; }
.kanban-cards  { padding:8px; display:flex; flex-direction:column; gap:6px; min-height:80px; }
.kanban-card   { background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:10px 12px; cursor:grab; transition:border-color .15s, box-shadow .15s; position:relative; }
.kanban-card:hover { border-color:var(--lime); box-shadow:0 0 0 1px var(--lime); }
.kanban-card.dragging { opacity:.4; }
.kanban-col.drag-over .kanban-cards { background:var(--lime-dim); border-radius:6px; }
.kanban-card-top  { display:flex; align-items:flex-start; gap:8px; margin-bottom:7px; }
.kanban-avatar    { width:28px; height:28px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.kanban-avatar-init { background:var(--lime-dim); border:1px solid rgba(156,236,19,.2); color:var(--lime); display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; }
.kanban-card-identity { flex:1; min-width:0; }
.kanban-card-name    { font-size:.82rem; font-weight:600; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kanban-card-opp     { font-size:.74rem; color:var(--text-muted); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kanban-card-footer  { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.kanban-val-chip     { font-size:.70rem; background:var(--lime-dim); color:var(--lime); padding:1px 7px; border-radius:10px; font-weight:600; }
.kanban-src-chip     { font-size:.70rem; color:var(--text-muted); }
.kanban-age-chip          { font-size:.68rem; color:var(--text-muted); margin-left:auto; }
.kanban-age-chip.age-warn { color:#f59e0b; }
.kanban-age-chip.age-stale{ color:#ef4444; font-weight:600; }
.kanban-appt-dot     { width:6px; height:6px; border-radius:50%; background:#60a5fa; margin-left:auto; flex-shrink:0; }
.kanban-card.updated-24h { border-left:3px solid var(--lime); }
.kanban-card.stale-7d    { border-left:3px solid #f59e0b; }
.kanban-card.stale-14d   { border-left:3px solid #ef4444; }
.kanban-card.stale-14d .kanban-card-name { color:#ef4444; }

/* ── Won / Lost history section ─────────────────────────────────────────────── */
.wl-section        { margin-top:24px; }
.wl-section-header { display:flex; align-items:center; margin-bottom:12px; }
.wl-section-title  { font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-secondary); }
.wl-grid           { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.wl-col            { background:var(--bg-card); border:1px solid var(--border); border-radius:10px; padding:14px; }
.wl-col-label      { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); margin-bottom:10px; }
.wl-group-header   { display:flex; justify-content:space-between; font-size:.74rem; font-weight:600; padding:4px 0 6px; border-bottom:1px solid var(--border); margin-bottom:6px; }
.wl-won-header     { color:var(--success, #4ade80); }
.wl-lost-header    { color:var(--danger, #f87171); }
.wl-card           { display:flex; align-items:center; gap:8px; padding:6px 4px; cursor:pointer; border-radius:6px; transition:background .12s; }
.wl-card:hover     { background:var(--bg); }
.wl-avatar         { width:24px; height:24px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.wl-avatar-init    { background:var(--lime-dim); border:1px solid rgba(156,236,19,.2); color:var(--lime); display:flex; align-items:center; justify-content:center; font-size:.68rem; font-weight:700; }
.wl-card-body      { flex:1; min-width:0; }
.wl-card-name      { font-size:.80rem; font-weight:500; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.wl-card-val       { font-size:.72rem; color:var(--lime); margin-top:1px; }
.wl-card-date      { font-size:.68rem; color:var(--text-muted); flex-shrink:0; }
.wl-empty          { font-size:.78rem; color:var(--text-muted); padding:8px 4px; }
@media (max-width:600px) { .wl-grid { grid-template-columns:1fr; } }

/* btn-danger */
.btn-danger { background:rgba(239,68,68,.15); color:#fca5a5; border:1px solid rgba(239,68,68,.3); }
.btn-danger:hover { background:rgba(239,68,68,.25); }

/* Small inline delete/danger icon button */
.icon-btn-danger { flex-shrink:0; background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:.78rem; padding:3px 5px; border-radius:4px; line-height:1; opacity:.5; transition:opacity .15s, color .15s; }
.icon-btn-danger:hover { opacity:1; color:#fca5a5; }

/* Calendars reference panel */
.cal-reference {
    margin-top:14px; font-size:.80rem;
    border:1px solid var(--border); border-radius:var(--radius);
    background:var(--bg-card);
}
.cal-reference summary {
    padding:10px 14px; cursor:pointer; color:var(--text-muted);
    list-style:none; user-select:none;
}
.cal-reference summary::-webkit-details-marker { display:none; }
.cal-reference-grid { padding:8px 14px 14px; display:flex; flex-direction:column; gap:4px; }
.cal-ref-row { display:flex; align-items:center; gap:10px; padding:4px 0; border-bottom:1px solid var(--border); }
.cal-ref-row:last-child { border-bottom:none; }
.cal-ref-id   { font-family:'Courier New',monospace; font-size:.72rem; color:var(--lime); flex-shrink:0; word-break:break-all; }
.cal-ref-name { font-size:.78rem; color:var(--text-secondary); flex:1; }

/* ── Stat card delta ─────────────────────────────────────── */
.stat-delta    { font-size:.70rem; margin-top:3px; }
.stat-delta.up   { color:var(--success); }
.stat-delta.down { color:var(--danger); }

/* ── Activity pulse strip ────────────────────────────────── */
.activity-pulse { font-size:.76rem; color:var(--text-muted); padding:6px 0 12px; display:flex; gap:16px; flex-wrap:wrap; }
.activity-pulse strong { color:var(--text-secondary); }

/* ── Pipeline pills ──────────────────────────────────────── */
.pipeline-pills { display:flex; gap:6px; margin-bottom:14px; flex-wrap:wrap; }
.pipeline-pill  { padding:5px 14px; border-radius:20px; font-size:.76rem; cursor:pointer; border:1px solid var(--border); color:var(--text-muted); user-select:none; transition:background .12s, color .12s, border-color .12s; }
.pipeline-pill.active { background:var(--lime); color:#000; border-color:var(--lime); font-weight:600; }

/* ── Drawer notes ────────────────────────────────────────── */
.note-row      { padding:10px 0; border-bottom:1px solid var(--border); }
.note-row:last-child { border-bottom:none; }
.note-body     { font-size:.83rem; color:var(--text-primary); white-space:pre-wrap; }
.note-meta     { font-size:.72rem; color:var(--text-muted); margin-top:4px; }
.note-add-area { width:100%; background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-sm); color:var(--text-primary); padding:9px 10px; font-size:.83rem; resize:vertical; }
.note-add-area:focus { border-color:var(--lime); outline:none; }
.opp-note-form { padding-top:4px; }

/* ── Drawer appointments ─────────────────────────────────── */
.appt-row      { display:flex; align-items:flex-start; gap:10px; padding:9px 0; border-bottom:1px solid var(--border); }
.appt-row:last-child { border-bottom:none; }
.appt-time     { font-size:.73rem; color:var(--text-muted); flex-shrink:0; width:80px; }
.appt-title    { font-size:.82rem; font-weight:500; }
.appt-cal      { font-size:.72rem; color:var(--text-muted); }
.appt-status-chip { font-size:.68rem; padding:1px 7px; border-radius:10px; display:inline-block; margin-top:3px; }
.appt-status-confirmed { background:rgba(34,197,94,.15); color:#4ade80; }
.appt-status-cancelled { background:rgba(239,68,68,.15); color:#fca5a5; }
.appt-book-btn { display:inline-flex; align-items:center; gap:6px; padding:6px 14px; background:var(--lime-dim); color:var(--lime); border:1px solid var(--lime); border-radius:var(--radius-sm); font-size:.78rem; font-weight:600; text-decoration:none; margin-top:12px; }
.appt-book-btn:hover { background:var(--lime); color:#000; text-decoration:none; }

/* Loading dots animation */
.loading-dots { color:var(--text-muted); letter-spacing:.1em; }

/* ── Sales Order Modal ───────────────────────────────────── */
.so-section        { padding:14px 0; border-bottom:1px solid var(--border); }
.so-section:last-child { border-bottom:none; }
.so-section-label  { font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); margin-bottom:8px; }
.so-row-2          { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* Radio button pills */
.so-radio-group    { display:flex; flex-wrap:wrap; gap:6px; }
.so-radio-btn      { display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border:1px solid var(--border); border-radius:20px; cursor:pointer; font-size:.80rem; color:var(--text-secondary); user-select:none; transition:border-color .12s, background .12s, color .12s; }
.so-radio-btn:hover { border-color:var(--lime); color:var(--lime); }
.so-radio-btn input[type=radio] { display:none; }
.so-radio-btn:has(input:checked) { background:var(--lime-dim,rgba(156,236,19,.12)); border-color:var(--lime); color:var(--lime); font-weight:600; }

/* Contact search dropdown — fixed so it escapes the modal's overflow-y:auto */
.so-search-dropdown { position:fixed; background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius); z-index:600; min-height:120px; max-height:260px; overflow-y:auto; box-shadow:0 8px 32px rgba(0,0,0,.55); }
.so-search-card     { display:flex; align-items:center; gap:10px; padding:9px 12px; cursor:pointer; transition:background .1s; border-bottom:1px solid var(--border); }
.so-search-card:last-child { border-bottom:none; }
.so-search-card:hover, .so-search-card--active { background:var(--bg-input); }
.so-search-avatar   { width:32px; height:32px; border-radius:50%; background:var(--lime-dim,rgba(156,236,19,.15)); color:var(--lime); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; flex-shrink:0; }
.so-search-name     { font-size:.83rem; font-weight:500; color:var(--text-primary); }
.so-search-sub      { font-size:.73rem; color:var(--text-muted); margin-top:2px; }
.so-search-msg      { padding:10px 12px; font-size:.80rem; color:var(--text-muted); }

/* Locked contact card */
.so-contact-card    { display:flex; align-items:center; gap:10px; padding:10px 12px; background:var(--bg-input); border:1px solid var(--border); border-radius:var(--radius-sm); margin-bottom:4px; }
.so-contact-avatar  { width:36px; height:36px; border-radius:50%; background:var(--lime-dim,rgba(156,236,19,.15)); color:var(--lime); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.90rem; flex-shrink:0; }
.so-contact-info    { flex:1; min-width:0; }
.so-contact-name    { font-size:.85rem; font-weight:600; color:var(--text-primary); }
.so-contact-meta    { font-size:.74rem; color:var(--text-muted); margin-top:2px; }
.so-contact-clear   { background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:14px; padding:4px; flex-shrink:0; }
.so-contact-clear:hover { color:var(--danger); }

/* Breakdown table */
.so-breakdown-table { width:100%; border-collapse:collapse; font-size:.82rem; margin-top:2px; }
.so-breakdown-table th { text-align:right; padding:4px 8px; font-size:.70rem; text-transform:uppercase; letter-spacing:.05em; color:var(--text-muted); font-weight:600; border-bottom:1px solid var(--border); }
.so-breakdown-table th:first-child { text-align:left; }
.so-breakdown-table td { padding:6px 8px; text-align:right; color:var(--text-secondary); border-bottom:1px solid var(--border); }
.so-breakdown-table td:first-child { text-align:left; color:var(--text-muted); font-size:.78rem; }
.so-breakdown-table tr:last-child td { border-bottom:none; }
.so-val-hi { color:var(--lime) !important; font-weight:600; }
.so-row-label { white-space:nowrap; }

/* Bare inputs/selects inside SO sections (not wrapped in .form-group) */
#so-fixed-price,
#so-tax-rate,
#so-custom-nbr,
#so-custom-gross,
#so-notes {
    width:100%; padding:8px 12px;
    border:1px solid var(--border); border-radius:var(--radius-sm);
    font-size:.86rem; color:var(--text-primary);
    background:var(--bg-input); outline:none;
    font-family:inherit;
    transition:border-color var(--transition);
    margin-top:4px;
}
#so-fixed-price:focus,
#so-tax-rate:focus,
#so-custom-nbr:focus,
#so-custom-gross:focus,
#so-notes:focus {
    border-color:var(--lime);
    box-shadow:0 0 0 3px rgba(156,236,19,.10);
}
#so-notes {
    resize:vertical;
    min-height:72px;
    line-height:1.5;
}

/* Toggles & confirm */
.so-toggle-label  { display:flex; align-items:center; gap:8px; font-size:.80rem; color:var(--text-secondary); cursor:pointer; user-select:none; }
.so-toggle-label input[type=checkbox] { accent-color:var(--lime); width:14px; height:14px; cursor:pointer; }
.so-confirm-label { display:flex; align-items:flex-start; gap:8px; font-size:.80rem; color:var(--text-secondary); cursor:pointer; line-height:1.5; }
.so-confirm-label input[type=checkbox] { accent-color:var(--lime); width:14px; height:14px; margin-top:2px; cursor:pointer; flex-shrink:0; }

/* ── Mobile First Fixes ────────────────────────────────────────────────────── */

/* C1: Input font-size ≥ 16px — prevents iOS auto-zoom on focus */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="tel"],
select,
textarea {
    font-size: 16px;
}
@media (min-width: 769px) {
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="tel"],
    select,
    textarea {
        font-size: 15px;
    }
}

/* C2: Touch targets ≥ 44px */
.nav-item {
    padding: 12px 12px;
    min-height: 44px;
}
.sidebar-close,
.sidebar-logout {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn {
    min-height: 44px;
    padding: 10px 16px;
}
.btn-sm {
    min-height: 38px;
}
.modal-close {
    min-width: 44px;
    min-height: 44px;
}
.pipeline-pill,
.filter-chip {
    min-height: 38px;
    padding: 8px 14px;
}
.drawer-action-btn {
    min-height: 44px;
}

/* C3: Kanban board — mobile horizontal scroll-snap */
@media (max-width: 768px) {
    .kanban-wrap {
        flex-direction: row;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 20px;
        /* Inset padding so first/last column don't flush against edge */
        padding-left: 2px;
        padding-right: 2px;
    }
    .kanban-col {
        flex: 0 0 calc(100vw - 32px);
        scroll-snap-align: center;
    }
    .kanban-card {
        padding: 12px 14px;  /* bigger tap target */
    }
    .kanban-card-name { font-size: .88rem; }
    .kanban-card-footer { gap: 8px; }
    .kanban-val-chip,
    .kanban-src-chip,
    .kanban-age-chip { font-size: .75rem; }
    .kanban-col-header { padding: 14px 14px 10px; }
    /* Scroll hint: right edge fade on kanban */
    .kanban-wrap::after {
        content: '';
        position: sticky;
        right: 0;
        top: 0;
        min-width: 28px;
        height: 100%;
        pointer-events: none;
        background: linear-gradient(to left, var(--bg-page, #0d0d0d), transparent);
        flex-shrink: 0;
    }
}

/* ─────────────────────────────────────────────────────────────
   UPCOMING CALLS PANEL
───────────────────────────────────────────────────────────── */
.upcoming-calls {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); margin-bottom: 16px; overflow: hidden;
}
.uc-hd {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 16px; border-bottom: 1px solid var(--border);
}
.uc-title {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .07em; color: var(--text-muted);
}
.uc-period { font-size: .72rem; color: var(--text-muted); margin-left: auto; }
.uc-toggle {
    background: none; border: none; color: var(--text-muted);
    font-size: .9rem; padding: 0 2px; line-height: 1;
    transition: transform var(--transition), color var(--transition);
    cursor: pointer; margin-left: 6px;
}
.uc-toggle:hover { color: var(--text-primary); }

/* Cards */
.uc-card {
    display: grid; grid-template-columns: 68px 1fr auto;
    gap: 0 16px; padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.uc-card:last-child { border-bottom: none; }
.uc-card:hover { background: var(--bg-card-hover); }

/* Time column */
.uc-time {
    display: flex; flex-direction: column; align-items: center;
    padding-top: 2px; gap: 1px;
}
.uc-day {
    font-size: .66rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
}
.uc-time--today .uc-day { color: var(--lime); }
.uc-hour {
    font-size: .92rem; font-weight: 600; color: var(--text-primary);
    line-height: 1.2;
}
.uc-date { font-size: .68rem; color: var(--text-muted); margin-top: 1px; }

/* Body */
.uc-body { min-width: 0; }
.uc-contact { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.uc-avatar {
    width: 27px; height: 27px; border-radius: 50%; flex-shrink: 0;
    background: var(--lime-dim); color: var(--lime);
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; font-weight: 700;
}
.uc-info { min-width: 0; }
.uc-name {
    font-size: .88rem; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.uc-meta { font-size: .74rem; color: var(--text-muted); margin-top: 1px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uc-status-badge { font-size: .62rem !important; padding: 1px 6px !important; }

.uc-opp-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; flex-wrap: wrap; }
.uc-badge   { font-size: .66rem !important; padding: 1px 6px !important; }
.uc-opp-prog { font-size: .78rem; color: var(--lime); font-weight: 500; }
.uc-opp-val  { font-size: .78rem; color: var(--text-secondary); }

.uc-athlete { font-size: .76rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.uc-athlete strong { color: var(--text-secondary); font-weight: 500; }
.uc-prog-status { opacity: .8; }
.uc-mstone-sep  { color: var(--text-muted); margin: 0 2px; }
.uc-dot { color: var(--border-strong); font-size: .7rem; }

/* Actions */
.uc-actions { display: flex; flex-direction: column; gap: 4px; justify-content: center; flex-shrink: 0; }
.uc-btn { font-size: .72rem !important; padding: 4px 9px !important; min-height: 0 !important; white-space: nowrap; }

/* Skeleton */
.uc-skeleton {
    display: grid; grid-template-columns: 68px 1fr; gap: 16px;
    padding: 13px 16px; border-bottom: 1px solid var(--border); align-items: start;
}
.uc-skeleton:last-child { border-bottom: none; }

/* Details row: location + assignee */
.uc-details { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; font-size: .76rem; }
.uc-location-link { color: var(--lime); text-decoration: none; }
.uc-location-link:hover { text-decoration: underline; }
.uc-location { color: var(--text-muted); }
.uc-assignee { color: var(--text-muted); }
.uc-assignee::before { content: '👤 '; }
.uc-calendar { color: var(--text-muted); }
.uc-calendar::before { content: '📅 '; }
.uc-btn-showed { color: var(--success, #4ade80) !important; }
.uc-btn-noshow { color: var(--danger, #f87171) !important; }

/* Empty state */
.uc-empty { padding: 20px 16px; font-size: .83rem; color: var(--text-muted); text-align: center; }

/* ─────────────────────────────────────────────────────────────
   PROGRAMS PAGE
───────────────────────────────────────────────────────────── */
.prog-currency-label {
    font-size: .75rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--lime);
    padding: 4px 10px; border-radius: var(--radius-sm);
    background: var(--lime-dim); display: inline-block;
    margin: 1.5rem 0 1rem;
}
.prog-currency-label:first-child { margin-top: 0; }

/* Pricing table */
.prog-table { width: 100%; border-collapse: collapse; }
.prog-table th {
    text-align: left; padding: 0 12px 10px 0;
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.prog-table th:not(:first-child) { text-align: center; }
.prog-table td {
    padding: 10px 12px 10px 0;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.prog-table tr:last-child td { border-bottom: none; }
.prog-table td:first-child {
    font-size: .9rem; font-weight: 500; color: var(--text-primary);
    min-width: 150px;
}
.prog-table td:not(:first-child) { text-align: center; }
.prog-m-total { color: var(--lime); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.prog-table input[type="number"] {
    width: 90px; padding: 6px 10px; text-align: center;
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    transition: border-color var(--transition);
    -moz-appearance: textfield;
}
.prog-table input[type="number"]:focus {
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(156,236,19,.1);
    outline: none;
}
.prog-table input[type="number"]::-webkit-inner-spin-button,
.prog-table input[type="number"]::-webkit-outer-spin-button { opacity: .4; }

/* Language grid */
.prog-lang-grid {
    display: grid;
    align-items: center;
    gap: .6rem 2rem;
    margin-bottom: 1.5rem;
}
.prog-lang-header {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted); text-align: center;
}
.prog-lang-name {
    font-size: .9rem; font-weight: 500; color: var(--text-primary);
}

/* Tax rates editor */
.prog-tax-header {
    font-size: .72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-muted);
}
.prog-tax-grid {
    display: grid;
    gap: .5rem;
    align-items: center;
}
.prog-tax-row { display: contents; }
.prog-tax-row input[type="number"],
.prog-tax-row input[type="text"] {
    padding: 7px 10px;
    background: var(--bg-input); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    width: 100%;
    transition: border-color var(--transition);
}
.prog-tax-row input:focus {
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(156,236,19,.1);
    outline: none;
}
.prog-tax-default {
    display: flex; align-items: center; justify-content: center;
}
.prog-tax-default input[type="radio"] {
    accent-color: var(--lime); width: 16px; height: 16px; cursor: pointer;
}

/* C4: Modal — bottom sheet on mobile */
@media (max-width: 640px) {
    .modal-backdrop {
        align-items: flex-end;
    }
    .modal,
    .modal-lg {
        width: 100vw;
        max-width: 100vw;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
        margin: 0;
    }
    .modal-header {
        position: sticky;
        top: 0;
        z-index: 1;
        background: var(--bg-card);
    }
}

/* C5: Table responsive — scroll with visual fade indicator */
.table-wrap {
    -webkit-overflow-scrolling: touch;
    position: relative;
}
.table-wrap::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 48px;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to left, var(--bg-card), transparent);
}
@media (max-width: 768px) {
    .data-table {
        min-width: 540px;
    }
}

/* C8: Task panel — no sticky on mobile */
@media (max-width: 900px) {
    .task-panel {
        position: static;
        max-height: none;
    }
}

/* ─────────────────────────────────────────────────────────────
   BOTTOM NAV BAR (mobile)
───────────────────────────────────────────────────────────── */
.bottom-nav {
    display: flex; /* hidden on desktop via min-width query below */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(60px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--sidebar-bg);
    border-top: 1px solid var(--border);
    flex-direction: row;
    align-items: stretch;
    z-index: 300;
}
@media (min-width: 769px) {
    .bottom-nav { display: none; }
}
.bn-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px;
    font-size: .60rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary);
    background: none; border: none;
    min-height: 44px;
    padding: 6px 2px;
    text-decoration: none;
    transition: color var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.bn-item.active { color: var(--lime); }
.bn-item:active { color: var(--lime); opacity: .8; }
.bn-item svg { flex-shrink: 0; }

/* ─────────────────────────────────────────────────────────────
   MORE SLIDE-UP SHEET
───────────────────────────────────────────────────────────── */
.more-backdrop {
    display: none;
    position: fixed; inset: 0; z-index: 400;
    background: rgba(0,0,0,.6);
}
.more-backdrop.open { display: block; }

.more-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 401;
    background: var(--bg-card);
    border-top: 1px solid var(--border-strong);
    border-radius: 16px 16px 0 0;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.more-sheet.open { transform: translateY(0); }

.more-sheet-handle {
    width: 36px; height: 4px;
    background: var(--border-strong); border-radius: 2px;
    margin: 0 auto 12px;
}

.more-sheet-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.ms-item {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    color: var(--text-primary); font-size: .95rem; font-weight: 500;
    text-decoration: none;
    border-top: 1px solid var(--border);
    -webkit-tap-highlight-color: transparent;
    transition: background var(--transition);
}
.ms-item:active { background: var(--bg-card-hover); }
.ms-item--active { color: var(--lime); }
.ms-item--danger { color: var(--danger); }
.ms-item svg { flex-shrink: 0; opacity: .75; }

/* ─────────────────────────────────────────────────────────────
   ATTENTION / ACTION-REQUIRED SECTION (Dashboard)
───────────────────────────────────────────────────────────── */
.attention-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.attention-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.attention-card--danger  { border-left-color: var(--danger); }
.attention-card--warning { border-left-color: var(--warning); }

.attention-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.attention-card-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}
.attention-card--danger  .attention-card-title { color: var(--danger); }
.attention-card--warning .attention-card-title { color: var(--warning); }
.attention-card-title svg { flex-shrink: 0; opacity: .85; }

.attention-count {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.attention-card-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.attention-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: .82rem;
    min-height: 22px;
}
.attention-item-name {
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.attention-item-meta {
    font-size: .76rem;
    color: var(--text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}
.attention-item-badge {
    font-size: .72rem;
    font-weight: 700;
    flex-shrink: 0;
    white-space: nowrap;
    padding: 1px 7px;
    border-radius: 10px;
}
.attention-item-badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.attention-item-badge--warning { background: var(--warning-bg); color: var(--warning); }

.attention-more {
    font-size: .74rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.attention-card-footer-link {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: color var(--transition);
}
.attention-card--danger  .attention-card-footer-link:hover { color: var(--danger);  text-decoration: none; }
.attention-card--warning .attention-card-footer-link:hover { color: var(--warning); text-decoration: none; }

/* ─────────────────────────────────────────────────────────────
   SKELETON SHIMMER (async loading states)
───────────────────────────────────────────────────────────── */
@keyframes skel-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}
.skel {
    display: block;
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--border-strong) 50%, var(--bg-card) 75%);
    background-size: 1200px 100%;
    animation: skel-shimmer 1.4s infinite linear;
    border-radius: var(--radius-sm);
}
.skel-stat-val {
    height: 2rem;
    width: 50px;
    margin-bottom: 6px;
}
.skel-stat-lbl {
    height: .65rem;
    width: 80px;
}
.skel-row {
    height: .85rem;
    width: 100%;
    margin-bottom: 8px;
    border-radius: 4px;
}
.skel-row--short { width: 55%; }
.skel-row--med   { width: 75%; }
.skel-cell {
    height: .75rem;
    border-radius: 3px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.data-ready { animation: fadeIn .22s ease; }
