/* ============================================
   FlashBetZA Support Portal — Styles
   ============================================
   Light/Purple theme — visually unified with the admin
   portal so workers see the same chrome admins do. The
   variable names below are kept (--gold, --bg-dark, …)
   so existing class implementations keep working; only
   the palette they resolve to has changed.
   ============================================ */

/* ── CSS Custom Properties ── */
:root {
    /* Admin-aligned primary palette (mirrors admin-tokens.css). */
    --admin-primary: #667eea;
    --admin-primary-end: #764ba2;
    --admin-primary-soft: rgba(102, 126, 234, 0.12);
    --admin-primary-faint: rgba(102, 126, 234, 0.08);
    --admin-primary-strong: #4338ca;

    /* Aliases — semantic names from the original support-portal palette
       remapped onto the admin token palette so the rest of the file works
       without per-rule edits. */
    --gold: var(--admin-primary);
    --gold-dim: rgba(102, 126, 234, 0.85);
    --orange: var(--admin-primary-end);
    --bg-dark: #f0f4f8;
    --bg-dark-alt: #ffffff;
    --bg-surface: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-card-active: #eef2ff;
    --text-primary: #1e293b;
    --text-muted: #475569;
    --text-dim: #94a3b8;
    --border-gold: #c7d2fe;
    --border-gold-strong: #818cf8;
    --border-subtle: #e2e8f0;
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-border: #6ee7b7;
    --error: #ef4444;
    --error-bg: #fee2e2;
    --error-border: #fecaca;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-border: #fcd34d;
    --info: #3b82f6;
    --info-bg: #dbeafe;
    --info-border: #93c5fd;
    --bg-input: #f8fafc;
    --error-text: #991b1b;
    --success-text: #065f46;
    --border-strong: #c7d2fe;

    /* Layout */
    --sidebar-width: 250px;
    --header-height: 60px;
    --transition: 0.2s ease;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Dense filter stacks (creator DB, worker tools): borderless gray controls */
    --portal-filter-control-bg: #f1f3f5;
    --portal-filter-control-radius: 10px;
    --portal-filter-control-height: 40px;
}

/* ============================================
   PORTAL SURFACE FILTERS — support/worker chrome
   Borderless inputs & muted buttons on light gray (#f1f3f5).
   Used on staff/support; admin shell loads overrides below for !important wins.
   ============================================ */

.portal-surface-filters .filters-row {
    background: transparent;
    border: none;
    box-shadow: none;
}

.portal-surface-filters input[type="text"],
.portal-surface-filters input[type="search"],
.portal-surface-filters select {
    background: var(--portal-filter-control-bg);
    color: var(--text-primary);
    border: none;
    border-radius: var(--portal-filter-control-radius);
    box-shadow: none;
    min-height: var(--portal-filter-control-height);
    padding: 0 12px;
    font-size: 13px;
    font-family: inherit;
}

.portal-surface-filters input::placeholder {
    color: var(--text-muted);
}

.portal-surface-filters input:focus,
.portal-surface-filters select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.22);
    background: #ffffff;
}

.portal-surface-filters .btn.btn-secondary,
.portal-surface-filters a.btn.btn-secondary {
    background: var(--portal-filter-control-bg) !important;
    color: var(--text-muted) !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: var(--portal-filter-control-radius) !important;
    min-height: var(--portal-filter-control-height);
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transform: none !important;
}

.portal-surface-filters .btn.btn-secondary:hover,
.portal-surface-filters a.btn.btn-secondary:hover {
    background: #e8eaed !important;
    color: var(--text-primary) !important;
    border: none !important;
    transform: none !important;
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Same paint as body so no white seams next to fixed chrome (mobile bottom bar). */
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   LAYOUT GRID
   ============================================ */

/* Column flex so top navbar + main share one viewport height — avoids
   navbar_height + min-height:100vh on main (excluding navbar) causing a bogus body scrollbar. */
.client-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.client-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* Support/staff chrome has no left rail (navbar only). Offset only when
       #client-sidebar exists (e.g. client/includes/sidebar.php). */
    margin-left: 0;
}

.client-layout:has(#client-sidebar) .client-main {
    margin-left: var(--sidebar-width);
}

.page-content {
    flex: 1;
    padding: 30px;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

/* Admin support hubs on support./staff. host: match admin-shell .cc-container
   (admin-support-skin-overrides.css caps it at --admin-page-max-width, default 1400px) */
.page-content.support-manager-shell {
    max-width: 1400px;
    box-sizing: border-box;
}

/* ============================================
   SIDEBAR
   ============================================ */

.client-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-dark-alt);
    border-right: 1px solid var(--border-gold);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow-y: auto;
    transition: transform var(--transition);
    /* Match the page (body) scrollbar exactly. Without these the sidebar
       paints the chunky platform default (light grey on Windows/Chrome)
       while the body paints our slim dark thumb — visually mismatched. */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}

.client-sidebar::-webkit-scrollbar { width: 8px; height: 8px; }
.client-sidebar::-webkit-scrollbar-track { background: transparent; }
.client-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.18);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
.client-sidebar::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.32); }

/* Page (body) scrollbar — slim dark thumb so the right edge matches the
   sidebar exactly. Applied at the html level so it covers any scroll
   container that doesn't override its own scrollbar. */
html, body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 8px; height: 8px; }
html::-webkit-scrollbar-track, body::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb, body::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.18);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
html::-webkit-scrollbar-thumb:hover, body::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,0.32); }

.sidebar-brand {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(102, 126, 234, 0.3));
}

.sidebar-brand-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.3px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Section label between top-level support links and the perm-gated
   "Admin tools" section. Matches admin-shell typography. */
.sidebar-section-label {
    margin: 6px 0;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dim);
    text-align: left;
}

/* Worker hub tabs — used by Schedule / Earnings / Inbox / Profile hubs to
   surface several sub-sections under one sidebar item.
   Visual language: modern segmented control. Pill tabs on a subtle dark
   strip, consistent gap above and below (== .page-content top padding)
   so the strip breathes inside the hub layout. */
.worker-hub-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 30px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.worker-hub-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    color: var(--text-muted, #b0b8c0);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1;
    white-space: nowrap;
    transition: background var(--transition, 150ms ease),
                color var(--transition, 150ms ease),
                box-shadow var(--transition, 150ms ease),
                transform 120ms ease;
}

.worker-hub-tab:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary, #ffffff);
}

.worker-hub-tab:active {
    transform: translateY(1px);
}

.worker-hub-tab.active {
    background: var(--gold, #f5c542);
    color: var(--bg-dark, #0e1116);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.15) inset,
        0 6px 14px -6px rgba(245, 197, 66, 0.55);
}

.worker-hub-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 7px;
    background: var(--gold, #f5c542);
    color: var(--bg-dark, #0e1116);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.worker-hub-tab.active .worker-hub-tab-badge {
    background: var(--bg-dark, #0e1116);
    color: var(--gold, #f5c542);
}

@media (max-width: 640px) {
    .worker-hub-tabs {
        display: flex;
        width: 100%;
        gap: 6px;
        padding: 5px;
        margin-bottom: 22px;
    }
    .worker-hub-tab {
        flex: 1 1 0;
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition);
    position: relative;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(102, 126, 234, 0.08);
    color: var(--gold);
    border-left-color: var(--gold);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-badge {
    margin-left: auto;
    background: var(--admin-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 22px;
    text-align: center;
    line-height: 1.4;
}

.sidebar-badge.urgent {
    background: var(--error);
    color: white;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-username {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-status {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: capitalize;
}

.sidebar-logout-btn {
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    background: var(--error-bg);
    color: var(--error);
}

/* ============================================
   HEADER
   ============================================ */

.client-header {
    height: var(--header-height);
    background: var(--bg-dark-alt);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 20px;
    position: static;
    top: auto;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-card-hover);
    color: var(--gold);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-greeting {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.header-logout-btn {
    display: none;
    padding: 6px 14px;
    background: var(--error-bg);
    color: var(--error);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
}

.header-logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

/* ============================================
   CARDS
   ============================================ */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-gold);
}

.card-gold {
    border-color: var(--border-gold);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.card-header h2,
.card-header h3 {
    color: var(--gold);
    font-weight: 700;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.card-icon.gold { background: rgba(102, 126, 234, 0.1); }
.card-icon.green { background: var(--success-bg); }
.card-icon.red { background: var(--error-bg); }
.card-icon.blue { background: var(--info-bg); }
.card-icon.orange { background: var(--warning-bg); }

/* ============================================
   ACTION ITEMS
   ============================================ */

.action-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.action-card:hover {
    transform: translateX(4px);
}

/* Action card text colors.
   The variants below inherit pastel backgrounds (red-50 / amber-50 / blue-50 /
   green-50) from the relight, but their text colors were still tuned for the
   original dark-card variants — e.g. amber-200 text on amber-50 bg, which
   makes the "You have a shift today" banner near-invisible. We pair each
   pastel bg with its tonally-matching dark-700 text variant so contrast
   passes WCAG AA without breaking the existing badge-style look. */
.action-card.urgent {
    background: var(--error-bg);
    border-color: var(--error-border);
    color: #991b1b;
}

.action-card.warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: #92400e;
}

.action-card.info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: #1e40af;
}

.action-card.success-action {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: #065f46;
}

.action-card .action-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.action-card .action-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.action-card .action-arrow {
    color: inherit;
    opacity: 0.5;
    font-size: 18px;
}

/* ============================================
   STATS GRID
   ============================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: var(--border-gold);
    background: var(--bg-card-hover);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 4px;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ============================================
   PROGRESS RING (creator dashboard)
   ============================================ */

.progress-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.progress-ring {
    width: 70px;
    height: 70px;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-subtle);
    stroke-width: 6;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--gold);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.progress-ring-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
}

/* Creator dashboard — two stat tiles: same footprint, vertically centered, matched hero visuals */
.creator-quick-stats {
    align-items: stretch;
}

.creator-quick-stats .stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 152px;
    padding: 16px 12px;
}

.creator-quick-stats .creator-quick-stats__visual {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-bottom: 10px;
}

.creator-quick-stats .creator-quick-stats__visual .progress-ring-container {
    gap: 0;
}

.creator-quick-stats .creator-quick-stats__ring {
    width: 52px;
    height: 52px;
}

.creator-quick-stats .creator-quick-stats__emoji {
    font-size: 28px;
    line-height: 1;
    display: block;
}

.creator-quick-stats .stat-card > .stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
    margin: 0 0 4px;
    line-height: 1.2;
}

.creator-quick-stats .stat-card > .stat-label {
    margin-top: 0;
    max-width: 100%;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-error   { background: var(--error-bg);   color: var(--error);   border: 1px solid var(--error-border); }
.badge-info    { background: var(--info-bg);     color: var(--info);    border: 1px solid var(--info-border); }
.badge-gold    { background: rgba(102, 126, 234, 0.12); color: var(--gold); border: 1px solid var(--border-gold); }
.badge-dim     { background: rgba(255,255,255,0.05); color: var(--text-dim); border: 1px solid var(--border-subtle); }

/* ============================================
   AFFILIATE LINK CARD (creator dashboard)
   ============================================ */

.affiliate-card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
}

.affiliate-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.affiliate-card-header h3 {
    color: var(--gold);
    font-size: 18px;
    font-weight: 700;
}

.affiliate-link-display {
    background: rgba(102, 126, 234, 0.06);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-bottom: 14px;
    font-family: ui-monospace, 'Courier New', monospace;
    font-size: 14px;
    color: var(--admin-primary-strong);
    word-break: break-all;
    line-height: 1.5;
}

.affiliate-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
}

.btn-gold {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-primary-end) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--border-gold);
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.08);
    border-color: var(--border-gold-strong);
    color: var(--gold);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.25);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.35);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: white;
}

.btn-ghost {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ============================================
   SECTION CARD
   ============================================ */

.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
}

.section-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-card-header .section-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* Icon tile with no content (emoji removed) — hide leftover colored square */
.section-card-header .section-icon:empty {
    display: none;
}

.section-card-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition);
    font-family: inherit;
}

/* Native select option / optgroup colors.
   Historically these used #e2e2e2 (legacy dark-theme white-ish) on #ffffff,
   which rendered as invisible light-grey text against the now-light option
   panel. Switched to the same slate-800 we already use for body copy so the
   options match every other piece of text in the support portal. The
   selected/hovered option still inherits the browser's blue highlight. */
.form-select option,
select option {
    background: #ffffff;
    color: var(--text-primary);
}

.form-select optgroup,
select optgroup {
    background: #ffffff;
    color: var(--text-primary);
}

select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-dim);
}

.form-hint {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 4px;
}

.form-input.is-valid { border-color: var(--success); }
.form-input.is-invalid { border-color: var(--error); }

.form-feedback {
    font-size: 12px;
    margin-top: 5px;
}

.form-feedback.success { color: var(--success); }
.form-feedback.error { color: var(--error-text); }

/* ============================================
   UPCOMING POST ITEMS (creator schedule / dashboard)
   ============================================ */

.post-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: all var(--transition);
    border-left: 4px solid var(--border-gold);
}

.post-item:hover {
    background: var(--bg-card-hover);
}

.post-item.completed {
    border-left-color: var(--success);
}

.post-item.overdue {
    border-left-color: var(--error);
}

.post-item.today {
    border-left-color: var(--orange);
    background: rgba(102, 126, 234, 0.06);
}

.post-item.pending-approval {
    border-left-color: var(--warning);
}

.post-item-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    align-items: start;
}

.post-item-header > div:first-child {
    min-width: 0;
}

.post-date {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.post-description {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

.post-link-display {
    margin-top: 8px;
}

.post-link-display a {
    font-size: 13px;
    font-weight: 600;
}

/* ============================================
   MARK COMPLETE FORM (inline — creator schedule)
   ============================================ */

.mark-complete-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
}

.mark-complete-form .form-group {
    flex: none;
    width: 100%;
    min-width: 0;
    margin-bottom: 0;
}

.mark-complete-form .btn {
    width: 100%;
    align-self: stretch;
}

.mark-complete-form .form-group label {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 600;
    margin-bottom: 6px;
}

.mark-complete-form .form-input[type="url"] {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

/* ============================================
   CREATOR PORTAL — post lists, briefs, password card
   ============================================ */

.creator-post-list {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* One white section-card; posts are rows separated by hairlines — no card-in-card */
.section-card .creator-post-list .post-item {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-left: none;
    padding: 18px 0;
    width: 100%;
    box-sizing: border-box;
}

.section-card .creator-post-list .post-item:hover {
    background: transparent;
}

.section-card .creator-post-list .post-item + .post-item {
    border-top: 1px solid var(--border-subtle);
}

.section-card .creator-post-list .post-item:first-child {
    padding-top: 0;
}

.section-card .creator-post-list .post-item.today {
    background: transparent;
}

/* Brief: same flat row language as the list — hairline + type only (no faux cards) */
.creator-brief-callout {
    margin-top: 12px;
    padding: 12px 0 0;
    border: none;
    border-radius: 0;
    border-top: 1px dashed var(--border-subtle);
    background: transparent;
}

.creator-brief-callout__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    margin-bottom: 6px;
}

.creator-brief-callout__title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
}

.creator-brief-callout__body {
    font-size: 14px;
    color: var(--text-muted);
    white-space: pre-wrap;
    line-height: 1.5;
}

.creator-brief-callout__attachments {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.creator-brief-callout__attachments a {
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-primary-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(102, 126, 234, 0.45);
    max-width: 100%;
    word-break: break-word;
}

.creator-brief-callout__attachments a:hover {
    color: var(--admin-primary-strong);
    text-decoration-color: var(--admin-primary-strong);
}

.creator-password-email-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 18px 16px;
    margin-bottom: 20px;
}

.creator-password-email-card__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.creator-password-email-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--admin-primary-soft);
    color: var(--admin-primary-strong);
    font-size: 18px;
    font-weight: 800;
    flex-shrink: 0;
}

.creator-password-email-card__label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.creator-password-email-card__email {
    color: var(--admin-primary-strong);
    font-size: 14px;
    margin-top: 4px;
    font-weight: 600;
    word-break: break-word;
}

.creator-password-email-card__hint {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Alert text colors — same readability fix as .action-card variants.
   Pair each pastel background with its dark-700 tonal partner so the
   message stays on-brand but is actually legible on light surfaces. */
.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid var(--success-border);
}

.alert-error {
    background: var(--error-bg);
    color: #991b1b;
    border: 1px solid var(--error-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: #92400e;
    border: 1px solid var(--warning-border);
}

.alert-info {
    background: var(--info-bg);
    color: #1e40af;
    border: 1px solid var(--info-border);
}

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-dim);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   TIME CLOCK — SUPPORT SPECIFIC
   ============================================ */

.clock-display {
    text-align: center;
    padding: 40px 20px;
}

.clock-timer {
    font-size: 56px;
    font-weight: 800;
    color: var(--gold);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    margin-bottom: 8px;
    line-height: 1;
}

.clock-status {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}

.clock-status.active { color: var(--success); }
.clock-status.on-break { color: var(--warning); }
.clock-status.inactive { color: var(--text-dim); }

.clock-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.clock-btn {
    padding: 16px 40px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: inherit;
}

.clock-btn.clock-in {
    background: linear-gradient(135deg, var(--success) 0%, #16a34a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
}

.clock-btn.clock-out {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.clock-btn.break-start {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.clock-btn.break-end {
    background: linear-gradient(135deg, var(--info) 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.clock-btn:hover {
    transform: translateY(-2px);
}

.clock-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.clock-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.clock-meta-item {
    text-align: center;
}

.clock-meta-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.clock-meta-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   SHIFT CARDS
   ============================================ */

.shift-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    transition: all var(--transition);
    border-left: 4px solid var(--border-gold);
    margin-bottom: 10px;
}

.shift-card:hover {
    background: var(--bg-card-hover);
}

.shift-card.live {
    border-left-color: var(--success);
    background: rgba(34, 197, 94, 0.05);
}

.shift-card.upcoming {
    border-left-color: var(--gold);
}

.shift-card.completed {
    border-left-color: var(--text-dim);
    opacity: 0.7;
}

.shift-card.missed {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.03);
}

.shift-card.flagged {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.03);
}

.shift-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.shift-time {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.shift-details {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.shift-detail {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.shift-detail-icon {
    font-size: 14px;
    opacity: 0.6;
}

/* ============================================
   HOURS TABLE
   ============================================ */

.hours-table {
    width: 100%;
    border-collapse: collapse;
}

.hours-table th {
    text-align: left;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
}

.hours-table td {
    padding: 12px 14px;
    font-size: 14px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
}

.hours-table tr:hover td {
    background: var(--bg-card-hover);
}

.hours-table .amount {
    font-weight: 700;
    color: var(--gold);
}

/* ============================================
   EARNINGS SUMMARY
   ============================================ */

.earnings-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.earnings-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.earnings-item-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.earnings-item-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
}

.earnings-item-value.gold {
    color: var(--gold);
}

/* ============================================
   DOCUMENT CARDS
   ============================================ */

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: all var(--transition);
}

.doc-card:hover {
    border-color: var(--border-gold);
    background: var(--bg-card-hover);
}

.doc-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.doc-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.doc-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.doc-card-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* ============================================
   SIGNATURE / CONTRACT (creator contracts)
   ============================================ */

.signature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
}

.signature-card.signed {
    border-color: var(--success-border);
    background: var(--success-bg);
}

.signature-card.needs-signing {
    border-color: var(--warning-border);
    background: var(--warning-bg);
}

.signature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.signature-input {
    width: 100%;
    padding: 14px;
    background: var(--bg-input);
    border: 2px solid var(--border-gold);
    border-radius: var(--radius-sm);
    font-size: 16px;
    color: var(--text-primary);
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    transition: all var(--transition);
}

.signature-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.contract-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.contract-detail-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px;
}

.contract-detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.contract-detail-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================
   PROFILE TABS (creator profile)
   ============================================ */

.profile-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-tab-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: inherit;
    text-align: center;
}

.profile-tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.profile-tab-btn.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.profile-tab-content {
    display: none;
}

.profile-tab-content.active {
    display: block;
}

/* ============================================
   PLATFORM CARDS (creator profile / onboarding)
   ============================================ */

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.platform-card {
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.platform-card:hover {
    border-color: var(--border-gold);
    background: rgba(102, 126, 234, 0.04);
}

.platform-card.selected {
    border-color: var(--gold);
    background: rgba(102, 126, 234, 0.08);
}

.platform-card .platform-icon {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-card .platform-icon svg {
    width: 28px;
    height: 28px;
}

.platform-card .platform-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.platform-card.selected .platform-name {
    color: var(--gold);
}

.platform-url-wrapper {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    margin-top: 0;
}

.platform-url-wrapper.open {
    max-height: 80px;
    opacity: 1;
    margin-top: 10px;
}

.platform-url-wrapper input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
}

.platform-url-wrapper input:focus {
    outline: none;
    border-color: var(--gold);
}

/* ============================================
   UPLOAD ZONES (creator profile / onboarding)
   ============================================ */

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.upload-zone {
    border: 2px dashed var(--border-gold);
    border-radius: var(--radius-md);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    background: rgba(102, 126, 234, 0.04);
    border-color: var(--gold);
}

.upload-zone.uploaded {
    border-color: var(--success);
    border-style: solid;
    background: var(--success-bg);
}

.upload-zone .upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
    opacity: 0.6;
}

.upload-zone h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upload-zone p {
    font-size: 12px;
    color: var(--text-dim);
}

.upload-zone .current-preview {
    max-width: 100%;
    max-height: 100px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.upload-zone input[type="file"] {
    display: none;
}

/* ============================================
   CAMPAIGN CARDS (optional / shared class names)
   ============================================ */

.campaign-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
    transition: all var(--transition);
}

.campaign-card:hover {
    border-color: var(--border-gold);
    background: var(--bg-card-hover);
}

.campaign-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.campaign-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.campaign-client {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.campaign-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-subtle);
}

.campaign-detail {
    font-size: 13px;
}

.campaign-detail-label {
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.campaign-detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   CALENDAR (creator schedule)
   ============================================ */

.calendar-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    font-size: 14px;
}

.calendar-nav button:hover {
    background: var(--bg-card-hover);
    color: var(--gold);
    border-color: var(--border-gold);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-day {
    text-align: center;
    padding: 8px 4px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: default;
    position: relative;
    transition: all var(--transition);
}

.calendar-day.today {
    color: var(--gold);
    font-weight: 700;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid var(--border-gold);
}

.calendar-day.scheduled {
    cursor: pointer;
}

.calendar-day.scheduled:hover {
    background: var(--bg-card-hover);
}

.calendar-day .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 2px auto 0;
}

.calendar-day .dot.gold { background: var(--gold); }
.calendar-day .dot.green { background: var(--success); }
.calendar-day .dot.orange { background: var(--warning); }
.calendar-day .dot.red { background: var(--error); }

.calendar-day.empty {
    color: transparent;
}

/* ============================================
   REQUEST CARDS
   ============================================ */

.request-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 10px;
    transition: all var(--transition);
}

.request-card:hover {
    background: var(--bg-card-hover);
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.request-type {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.request-date {
    font-size: 12px;
    color: var(--text-dim);
}

.request-message {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.request-response {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================
   PROFILE SECTIONS
   ============================================ */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.profile-item {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.profile-item-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.profile-item-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Verification checklist */
.verification-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.verification-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
}

.verification-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.verification-icon.verified {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid var(--success-border);
}

.verification-icon.pending {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.verification-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   SPINNER
   ============================================ */

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
}

.spinner-light {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

.shake { animation: shake 0.4s ease; }

/* ============================================
   VIEW MORE LINK
   ============================================ */

.view-more {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gold);
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
    transition: all var(--transition);
}

.view-more:hover {
    gap: 10px;
    color: var(--orange);
}

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

@media (max-width: 1024px) {
    .page-content {
        padding: 24px 20px;
    }
}

/* ============================================
   RESPONSIVE — MOBILE (sidebar → bottom bar)
   ============================================ */

@media (max-width: 768px) {
    .client-main {
        margin-left: 0;
        /* Match bottom bar height + home-indicator inset — avoids a dead strip above the bar. */
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    }

    .client-layout:has(#client-sidebar) .client-main {
        margin-left: 0;
    }

    .client-sidebar {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        flex-direction: row;
        border-right: none;
        border-top: 1px solid var(--border-subtle);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.08);
        overflow: visible;
        z-index: 300;
        /* Paint through safe area so nothing shows under the bar; removes bottom “white lip”. */
        padding-bottom: env(safe-area-inset-bottom, 0px);
        transform: translateZ(0);
    }

    .sidebar-brand,
    .sidebar-footer {
        display: none;
    }

    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        padding: 0;
        width: 100%;
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar-link {
        flex-direction: column;
        gap: 2px;
        padding: 8px 6px;
        font-size: 10px;
        border-left: none !important;
        border-radius: 0;
        text-align: center;
        min-width: 0;
        flex: 1;
        color: var(--text-muted);
    }

    .sidebar-link:hover {
        background: rgba(102, 126, 234, 0.06);
        color: var(--text-primary);
    }

    .sidebar-link.active {
        background: rgba(102, 126, 234, 0.08);
        border-top: none;
        border-bottom: 2px solid var(--admin-primary);
        border-left: none;
        padding-top: 8px;
        padding-bottom: 6px;
        color: var(--admin-primary);
    }

    .sidebar-link.active svg {
        opacity: 1;
    }

    .sidebar-link svg {
        width: 22px;
        height: 22px;
        stroke: currentColor;
        opacity: 0.88;
    }

    .sidebar-link-text {
        display: none;
    }

    .sidebar-link::after {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 600;
        display: block;
    }

    .sidebar-badge {
        position: absolute;
        top: 2px;
        right: 50%;
        transform: translateX(14px);
        font-size: 9px;
        padding: 1px 5px;
        min-width: 16px;
    }

    .sidebar-toggle {
        display: none !important;
    }

    .client-header {
        padding: 0 16px;
    }

    .page-title {
        font-size: 17px;
    }

    .header-greeting {
        display: none;
    }

    .header-logout-btn {
        display: inline-flex;
    }

    .page-content {
        padding: 16px 12px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-value {
        font-size: 22px;
    }

    .section-card {
        padding: 18px 14px;
        overflow-x: hidden;
    }

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

    .earnings-summary {
        grid-template-columns: 1fr;
    }

    .clock-timer {
        font-size: 42px;
    }

    .clock-actions {
        flex-direction: column;
    }

    .clock-btn {
        width: 100%;
    }

    .hours-table {
        font-size: 13px;
    }

    .hours-table th,
    .hours-table td {
        padding: 8px 10px;
    }

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

    .section-description {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

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

    .contract-details-grid {
        grid-template-columns: 1fr;
    }

    .contract-detail-value {
        font-size: 14px;
        word-break: break-word;
    }

    .affiliate-actions {
        flex-direction: column;
    }

    .affiliate-actions .btn {
        width: 100%;
    }

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

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

    .campaign-details {
        grid-template-columns: 1fr;
    }

    .profile-tabs {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        overflow-x: visible;
        border-bottom: none;
        margin-bottom: 20px;
    }

    .profile-tab-btn {
        padding: 10px 6px;
        font-size: 12px;
        min-width: 0;
        flex-shrink: unset;
        border-bottom: none;
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        text-align: center;
        white-space: nowrap;
        color: var(--text-muted);
        background: var(--bg-surface);
    }

    .profile-tab-btn.active {
        border-color: var(--admin-primary);
        background: rgba(102, 126, 234, 0.1);
        color: var(--admin-primary-strong);
    }

    .profile-tab-btn .tab-icon {
        display: none;
    }

    /* Prevent iOS auto-zoom */
    .form-input,
    .form-select,
    .form-textarea,
    input[type="text"],
    input[type="url"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="number"],
    textarea,
    .signature-input,
    .platform-url-wrapper input {
        font-size: 16px !important;
    }

    .section-card form {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 14px 10px;
    }

    .creator-quick-stats .stat-card {
        min-height: 138px;
        padding: 12px 8px;
    }

    .creator-quick-stats .stat-card > .stat-value {
        font-size: 17px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    .section-card {
        padding: 16px 12px;
    }

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

    .contract-details-grid {
        grid-template-columns: 1fr;
    }

    .campaign-details {
        grid-template-columns: 1fr;
    }

    .profile-tab-btn {
        padding: 8px 4px;
        font-size: 10px;
    }

    .clock-timer {
        font-size: 36px;
    }
}

/* ── Staff OS chrome (/staff/public — Sections 4, 6, 12) ── */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.staff-os-break-banner {
    width: 100%;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.25), rgba(239, 68, 68, 0.2));
    border-bottom: 2px solid var(--warning);
    margin: 0 0 12px;
    padding: 12px 16px;
    box-sizing: border-box;
}

.staff-os-break-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.staff-os-break-banner__title {
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 13px;
    color: var(--warning);
}

.staff-os-break-banner__meta {
    font-size: 14px;
    color: var(--text-primary);
}

/* .staff-os-module-strip*, .staff-os-module-strip__kbd, and
   .staff-os-command-palette__* rules were removed when the horizontal
   module strip and Ctrl+K palette were retired. The left sidebar in
   support/includes/sidebar.php is now the single source of staff
   navigation. See StaffOsChrome::render() and
   {staff,support}/public/sw.js (cache version bumped to v3). */

/* ============================================
   AUTH SURFACES — creator login / forgot / reset
   (scoped so dashboard body layout is unchanged)
   ============================================ */

body.portal-auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

body.portal-auth-page::before {
    content: '';
    position: absolute;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.18) 0%, transparent 70%);
    top: -220px;
    right: -200px;
    animation: portal-auth-float 9s ease-in-out infinite;
    pointer-events: none;
}

body.portal-auth-page::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.14) 0%, transparent 70%);
    bottom: -160px;
    left: -160px;
    animation: portal-auth-float 11s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes portal-auth-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.portal-auth-page .login-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10), 0 8px 20px rgba(15, 23, 42, 0.04);
    max-width: 440px;
    width: 100%;
    padding: 48px 40px 40px;
    position: relative;
    z-index: 1;
    animation: portal-auth-slide-up 0.5s ease-out;
}

@keyframes portal-auth-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.portal-auth-page .login-container h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 10px;
}

.portal-auth-page .logo-area {
    text-align: center;
    margin-bottom: 30px;
}

.portal-auth-page .logo-mark {
    display: block;
    width: 180px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    color: var(--admin-primary);
}

.portal-auth-page .logo-mark .cls-1 { fill: currentColor; }

.portal-auth-page .logo-area .logo-icon {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 8px;
}

.portal-auth-page .subtitle {
    color: var(--admin-primary);
    margin: 14px 0 30px;
    font-size: 13px;
    text-align: center;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.portal-auth-page .login-container > p.subtitle {
    text-transform: none;
    letter-spacing: 0.02em;
    font-weight: 500;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin: -6px 0 24px;
}

.portal-auth-page .form-group {
    margin-bottom: 18px;
    position: relative;
}

.portal-auth-page label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.portal-auth-page .input-wrapper { position: relative; }

.portal-auth-page .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    transition: color 0.2s ease;
    pointer-events: none;
}

.portal-auth-page input[type="text"],
.portal-auth-page input[type="password"],
.portal-auth-page input[type="email"] {
    width: 100%;
    padding: 13px 15px 13px 44px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: inherit;
}

.portal-auth-page input::placeholder {
    color: var(--text-dim);
}

.portal-auth-page input:focus {
    outline: none;
    border-color: var(--admin-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.portal-auth-page .input-wrapper:focus-within .input-icon {
    color: var(--admin-primary);
}

.portal-auth-page .login-btn,
.portal-auth-page .submit-btn {
    width: 100%;
    padding: 14px;
    background: var(--admin-primary);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.30);
    letter-spacing: 0.4px;
    margin-top: 10px;
    font-family: inherit;
}

.portal-auth-page .login-btn:hover,
.portal-auth-page .submit-btn:hover {
    background: var(--admin-primary-strong);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.38);
}

.portal-auth-page .login-btn:active,
.portal-auth-page .submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.portal-auth-page .error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: portal-auth-shake 0.45s ease-in-out;
}

@keyframes portal-auth-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.portal-auth-page .error::before {
    content: '⚠';
    font-size: 18px;
    flex-shrink: 0;
}

.portal-auth-page .success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-auth-page .success::before {
    content: '✓';
    font-size: 18px;
    flex-shrink: 0;
    font-weight: bold;
}

.portal-auth-page .forgot-link {
    text-align: center;
    margin-top: 18px;
}

.portal-auth-page .forgot-link a {
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.portal-auth-page .forgot-link a:hover {
    color: var(--admin-primary-strong);
    text-decoration: underline;
}

.portal-auth-page .back-link {
    text-align: center;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
}

.portal-auth-page .back-link a {
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease, gap 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.portal-auth-page .back-link a:hover {
    color: var(--admin-primary-strong);
    gap: 10px;
}

.portal-auth-page .back-link a::before { content: '←'; }

.portal-auth-page .portal-auth-user-card {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
    text-align: center;
    line-height: 1.5;
}

.portal-auth-page .portal-auth-user-card strong {
    color: var(--text-primary);
}

.portal-auth-page .portal-auth-user-email {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-dim);
}

.portal-auth-page a.portal-auth-primary-link {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 20px;
    background: var(--admin-primary);
    color: #fff !important;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.28);
}

.portal-auth-page a.portal-auth-primary-link:hover {
    background: var(--admin-primary-strong);
    color: #fff !important;
}

@media (max-width: 500px) {
    .portal-auth-page .login-container {
        padding: 36px 24px 28px;
    }

    .portal-auth-page .logo-mark { width: 150px; }

    .portal-auth-page input[type="text"],
    .portal-auth-page input[type="password"],
    .portal-auth-page input[type="email"] {
        font-size: 16px;
    }

    .portal-auth-page .login-container h1 {
        font-size: 20px;
    }
}

/* showToast() — stack above sticky .navbar / .support-top-navbar (z-index: 10000) */
body > .toast.toast-success,
body > .toast.toast-error,
body > .toast.toast-warning,
body > .toast.toast-info {
    z-index: 2147483646 !important;
}

/* ── Hide browser scrollbar (keep scrolling functional) ── */
html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}
