/* ============================================================================
 * Event Trekker business-admin · OCS visual skin (SHARED)
 * ----------------------------------------------------------------------------
 * Dispatch 5814 — BH directive: "Update the Admin pages to match this design,
 * including the same background color and overall visual style."
 *
 * This is the SHARED extraction of the approved dashboard.html OCS skin
 * (dark-navy 240px fixed sidebar · light-gray #f1f5f9 content · white cards
 * 8px radius / 0 1px 3px shadow · typography + spacing). dashboard.html keeps
 * its own page-scoped <style> copy (do-not-touch); every OTHER business-admin
 * page links THIS file so one edit propagates the skin console-wide.
 *
 * Borrows the OneCareSync Admin VISUAL LANGUAGE only (colours + measurements
 * taken 1:1 from the dashboard, which took them from onecaresync-admin
 * static/css/style.css). Scoped under `body.ocs-mirror` so it never leaks into
 * pages that still use the legacy admin-shell dark skin.
 *
 * NOTE: this file also re-skins a handful of LEGACY admin.css class names
 * (.admin-section · .admin-tile · .admin-table · .admin-filter-bar ·
 * .admin-info-banner · .admin-error · .admin-modal* · form-control · Crafto
 * .btn-base-color / .btn-transparent-base-color / .text-*-gray) so pages can
 * keep their existing inner markup + testids unchanged — only the outer shell
 * markup is converted to the .ocs-* structure. Every re-skin below is scoped
 * under `body.ocs-mirror` so legacy dark pages are unaffected.
 * ============================================================================ */

body.ocs-mirror {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #16a34a;
    --warning: #ca8a04;
    --danger: #dc2626;
    --border: #e2e8f0;
    --dark: #1e293b;

    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--dark);
    background-color: #f1f5f9;
}
body.ocs-mirror * { box-sizing: border-box; }
body.ocs-mirror a { color: var(--primary); text-decoration: none; }
body.ocs-mirror a:hover { text-decoration: underline; }

/* ---- Dark navy sidebar (240px · OCS visual) ---- */
.ocs-sidebar {
    width: 240px;
    background: var(--dark);
    color: #fff;
    padding: 20px 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}
.ocs-sidebar-header {
    padding: 15px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
    text-align: center;
}
.ocs-brand-logo { margin-bottom: 10px; }
.ocs-brand-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    object-fit: contain;
}
.ocs-brand-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 8px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.ocs-brand-event { color: #4D4D4D; }
.ocs-brand-trekker { color: #F0533D; }
.ocs-sidebar-header small {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    margin-top: 8px;
}
.ocs-sidebar-nav { list-style: none; margin: 0; padding: 0; }
.ocs-sidebar-nav li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    transition: all 0.2s;
}
.ocs-sidebar-nav li a:hover,
.ocs-sidebar-nav li a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    text-decoration: none;
}
.ocs-sidebar-nav li a.active { border-left: 3px solid var(--primary); }
.ocs-sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 15px 0;
}
.ocs-nav-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}
.ocs-nav-badge.ocs-nav-badge--zero { display: none; }

/* ---- Light content area ---- */
.ocs-main {
    flex: 1;
    padding: 20px 30px;
    overflow-x: auto;
    margin-left: 240px;
    min-height: 100vh;
}

/* ---- White page-header card (L: title · R: admin profile) ---- */
.ocs-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    gap: 16px;
    flex-wrap: wrap;
}
.ocs-page-header h1,
.ocs-page-header h2 { font-size: 24px; font-weight: 600; color: var(--dark); margin: 0; }
.ocs-header-actions { display: flex; align-items: center; gap: 16px; }
.ocs-user-info { text-align: right; font-size: 13px; color: var(--dark); line-height: 1.35; }
.ocs-user-info .ocs-user-name { font-weight: 600; color: var(--dark); }
.ocs-user-info .ocs-user-role { display: block; color: var(--secondary); font-size: 12px; }
.ocs-user-info small { display: block; color: var(--secondary); font-size: 11px; }

/* ---- Page intro / lead paragraph under the header ---- */
.ocs-page-lead {
    color: var(--secondary);
    font-size: 14px;
    margin: -10px 0 20px;
    max-width: 900px;
}

/* ---- Cards (OCS .card · white content container) ---- */
.ocs-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}
.ocs-card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.ocs-card-header.ocs-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ocs-card-body { padding: 20px; }
.ocs-grid { display: grid; gap: 20px; }
.ocs-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ocs-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---- Buttons (OCS) ---- */
.ocs-btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}
.ocs-btn-primary { background: var(--primary); color: #fff; }
.ocs-btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.ocs-btn-secondary {
    background: #fff;
    color: var(--dark);
    border: 1px solid var(--border);
}
.ocs-btn-secondary:hover { background: #f8fafc; text-decoration: none; }
.ocs-btn-sm { padding: 5px 10px; font-size: 12px; }

.ocs-hidden { display: none !important; }

/* ---- Mobile menu toggle + overlay (OCS visual) ---- */
.ocs-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--dark);
    color: #fff;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ocs-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: 0.3s;
}
.ocs-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}
.ocs-sidebar-overlay.active { display: block; }

/* ============================================================================
 * LEGACY class re-skin (scoped under body.ocs-mirror)
 * Lets converted pages keep their existing inner markup + testids while the
 * outer shell switches to .ocs-* structure. Everything below maps the dark
 * admin.css look onto the OCS light look.
 * ========================================================================== */

/* Neutralize the legacy dark shell backgrounds so the light OCS bg shows. */
body.ocs-mirror.admin-shell,
body.ocs-mirror .admin-main,
body.ocs-mirror .admin-body { background: transparent; color: var(--dark); }

/* Crafto text utilities → OCS ink */
body.ocs-mirror .text-dark-gray { color: var(--dark) !important; }
body.ocs-mirror .text-medium-gray { color: var(--secondary) !important; }
body.ocs-mirror h1,
body.ocs-mirror h2,
body.ocs-mirror h3,
body.ocs-mirror h4,
body.ocs-mirror h5,
body.ocs-mirror h6 { color: var(--dark); }
body.ocs-mirror code { color: var(--dark); background: #f1f5f9; }

/* Section + tile → white OCS card */
body.ocs-mirror .admin-section,
body.ocs-mirror .admin-tile,
body.ocs-mirror .admin-table-wrap {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
body.ocs-mirror .admin-section { padding: 20px; margin-bottom: 20px; }
body.ocs-mirror .admin-tile { padding: 20px; }
body.ocs-mirror .admin-tile:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
body.ocs-mirror .admin-table-wrap { overflow: hidden; }
body.ocs-mirror .admin-section-title { color: var(--secondary); }

/* Tables → OCS table look */
body.ocs-mirror .admin-table { width: 100%; border-collapse: collapse; }
body.ocs-mirror .admin-table th,
body.ocs-mirror .admin-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
    font-size: 14px;
}
body.ocs-mirror .admin-table thead th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--secondary);
}
body.ocs-mirror .admin-table tbody tr:hover { background: #f8fafc; }

/* Keep single-word status pills + narrow column headers from wrapping
 * ("active" → "activ e"; uppercased LOCALE / PLATFORM headers). Scoped so it
 * only affects OCS-mirror pages. */
body.ocs-mirror .verb-chip { white-space: nowrap; }
body.ocs-mirror .admin-table thead th { white-space: nowrap; }

/* Row-action buttons */
body.ocs-mirror .admin-row-action {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 6px;
}
body.ocs-mirror .admin-row-action:hover { background: #f8fafc; }
body.ocs-mirror .admin-row-action--danger { color: var(--danger); border-color: #fca5a5; }
body.ocs-mirror .admin-row-action--danger:hover { background: #fee2e2; }

/* Filter bar + pagination */
body.ocs-mirror .admin-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
body.ocs-mirror .admin-filter-bar label { white-space: nowrap; flex: 0 0 auto; color: var(--secondary); }
body.ocs-mirror .admin-filter-bar input,
body.ocs-mirror .admin-filter-bar select,
body.ocs-mirror .input,
body.ocs-mirror .form-control,
body.ocs-mirror select.form-control,
body.ocs-mirror textarea.form-control,
body.ocs-mirror input.form-control {
    height: auto;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--dark);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}
body.ocs-mirror .admin-filter-bar input,
body.ocs-mirror .admin-filter-bar select { height: 36px; padding: 0 10px; font-size: 13px; }
body.ocs-mirror .form-control::placeholder,
body.ocs-mirror .input::placeholder { color: #94a3b8; }
body.ocs-mirror .form-control:focus,
body.ocs-mirror .input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    background: #fff;
    color: var(--dark);
}
body.ocs-mirror label { color: var(--secondary); }

body.ocs-mirror .admin-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 16px;
}
body.ocs-mirror .admin-pagination button {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}
body.ocs-mirror .admin-pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Info banner + error → OCS light variants */
body.ocs-mirror .admin-info-banner {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}
body.ocs-mirror .admin-info-banner a { color: #1d4ed8; text-decoration: underline; }
body.ocs-mirror .admin-info-banner strong { font-weight: 600; }
body.ocs-mirror .admin-error {
    background: #fee2e2;
    color: var(--danger);
    border: 1px solid #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}
body.ocs-mirror .admin-error.d-none { display: none; }

/* Crafto buttons → OCS buttons */
body.ocs-mirror .btn-base-color {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    border-radius: 6px;
    font-weight: 500;
}
body.ocs-mirror .btn-base-color:hover,
body.ocs-mirror .btn-base-color:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}
body.ocs-mirror .btn-transparent-base-color {
    background-color: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
    border-radius: 6px;
    font-weight: 500;
}
body.ocs-mirror .btn-transparent-base-color:hover,
body.ocs-mirror .btn-transparent-base-color:focus {
    background-color: #f8fafc;
    color: var(--dark);
}

/* Form section helpers used by broadcast / app-version / system-config */
body.ocs-mirror .admin-fieldset legend { color: var(--dark); }
body.ocs-mirror .admin-check-row,
body.ocs-mirror .admin-radio-row,
body.ocs-mirror .admin-toggle-row { color: var(--dark); }
body.ocs-mirror .admin-toggle-row { border-bottom: 1px solid var(--border); }
body.ocs-mirror .admin-check-row input,
body.ocs-mirror .admin-radio-row input { accent-color: var(--primary); }

/* Modals → OCS light modal */
body.ocs-mirror .admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
body.ocs-mirror .admin-modal-overlay.d-none { display: none; }
body.ocs-mirror .admin-modal {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(15,23,42,0.25);
}
body.ocs-mirror .admin-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

/* Detail definition list (user-detail) on the light card */
body.ocs-mirror .admin-detail-row { border-bottom: 1px solid var(--border); }
body.ocs-mirror .admin-detail-row > dt { color: var(--secondary); }
body.ocs-mirror .admin-detail-row > dd { color: var(--dark); }

/* Broadcast preview blocks re-tinted for the light skin */
body.ocs-mirror .bc-preview {
    background: #f8fafc;
    border: 1px solid var(--border);
}
body.ocs-mirror .bc-preview-banner {
    background: #eff6ff;
    border-left: 4px solid var(--primary);
    color: var(--dark);
}
body.ocs-mirror .bc-preview-push {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
}
body.ocs-mirror .bc-preview-body { color: var(--secondary); }

/* Secret-field mask + audit payload on the light skin */
body.ocs-mirror .admin-secret-mask,
body.ocs-mirror .audit-payload-pre {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--dark);
}

/* ============================================================================
 * Auth-card pages (login · 2fa · accept-invite) — OCS light consistency.
 * These have NO sidebar; `ocs-auth` gives them the same light-gray backdrop +
 * white card / 8px radius / soft shadow as the console, without the flex shell.
 * ========================================================================== */
body.ocs-auth {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --danger: #dc2626;
    --border: #e2e8f0;
    --dark: #1e293b;
    /* bb-et · BH refinement — page backdrop now matches the OneCareSync login:
     * full-viewport dark-navy (OCS `.login-container` gradient #1e293b→#334155,
     * style.css:408). The compact white card sits centered on top of it. */
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: var(--dark);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
/* Navy field behind the card = whole viewport (OCS `.login-container`). */
body.ocs-auth .admin-auth-card-wrap {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}
/* OCS `.login-box` box-model: white card · 400px cap · 12px radius · deep soft
 * shadow (style.css:413-420). White so ET content + blue links keep contrast on
 * the navy backdrop.
 * bb-et · BH refinement — card HEIGHT reduced ~25% to hug its content: vertical
 * padding trimmed 40px→28px (horizontal kept ~40px), brand/logo bottom-margins
 * tightened, and the footer/back-link Crafto `mt-4`/`mt-3` (percentage) top-gap
 * collapsed (see the footer rules below). No `min-height` — the card already
 * sizes to content; the prior tallness was pure whitespace. */
body.ocs-auth .admin-auth-card {
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 28px 40px;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    color: var(--dark);
}
/* OCS card internals — compact stacked spacing (style.css:434-459,346-364).
 * Logo 80px block; brand-name 24px; subtitle tight; form fields 15px gap. */
body.ocs-auth .admin-auth-brand { margin-bottom: 14px; }
body.ocs-auth .admin-auth-logo { width: 80px; height: 80px; margin-bottom: 14px; }
body.ocs-auth .admin-auth-brand h1 { font-size: clamp(1.375rem, 5vw, 1.5rem); margin-bottom: 5px; }
/* Two-line under-heading treatment mirroring the OneCareSync login (style.css
 * `.login-subtitle` 14px/secondary/5px + `.login-box .subtitle`): a prominent
 * "Admin Portal" subtitle directly under the brand, then a smaller muted helper
 * line. Scoped to ocs-auth (login/2fa/accept-invite cards) so it never leaks. */
body.ocs-auth .admin-auth-subtitle { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
body.ocs-auth .admin-auth-helper { font-size: 13px; }
body.ocs-auth .admin-auth-form label { margin-bottom: 5px; font-size: 13px; }
body.ocs-auth .admin-auth-form .form-control {
    height: auto;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}
/* Collapse the excess whitespace below the CONTINUE button. ROOT CAUSE: the auth
 * <footer> matches Crafto's base `footer{padding:...}` rule (responsive.min.css →
 * 90px top + 90px bottom at desktop widths) — 180px of dead padding around a
 * single 30px helper line. That, not any margin, was the tall gap under the text.
 * Zero the Crafto footer padding + keep a compact fixed top-gap so the card hugs
 * its content. (`.mt-4`=4% on the footer stays small and harmless.) The 2fa
 * "Back to sign in" link (`.d-block .mt-3`) gets the same compact top-gap. Scoped
 * to ocs-auth only so no console footer is affected. */
body.ocs-auth .admin-auth-footer {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 12px;
    margin-bottom: 0;
    /* bb-et · BH login footer = OCS-parity copyright ("© 2026 Event Trekker.
     * All rights reserved."). Center the line like OCS's copyright footer. */
    text-align: center;
}
body.ocs-auth .admin-auth-form a.d-block { margin-top: 12px !important; }
/* Compact mobile card mirrors OCS media rule (style.css:894-898). */
@media (max-width: 480px) {
    body.ocs-auth .admin-auth-card { padding: 18px 20px; max-width: none; }
}
/* Plain links on the white auth card → OCS blue (#2563eb) for WCAG 1.4.3
 * contrast. Overrides admin.css `.admin-shell a` coral (#FF8F5C · 2.24:1 on
 * white); ocs-skin.css loads after admin.css so equal specificity wins. Covers
 * accept-invite.html "Back to sign-in", plus 2fa.html + index.html auth links. */
body.ocs-auth a { color: var(--primary); }
body.ocs-auth a:hover { text-decoration: underline; }
body.ocs-auth .text-dark-gray { color: var(--dark) !important; }
body.ocs-auth .text-medium-gray { color: var(--secondary) !important; }
body.ocs-auth h1, body.ocs-auth h2, body.ocs-auth h3 { color: var(--dark); }
body.ocs-auth label { color: var(--dark); }
body.ocs-auth .admin-auth-form .form-control,
body.ocs-auth .form-control {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
}
body.ocs-auth .admin-auth-form .form-control::placeholder,
body.ocs-auth .form-control::placeholder { color: #94a3b8; }
body.ocs-auth .admin-auth-form .form-control:focus,
body.ocs-auth .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    background: #fff;
    color: var(--dark);
}
body.ocs-auth .btn-base-color {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
body.ocs-auth .btn-base-color:hover,
body.ocs-auth .btn-base-color:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}
body.ocs-auth .btn-transparent-base-color {
    background-color: #fff;
    border: 1px solid var(--border);
    color: var(--dark);
}
body.ocs-auth .btn-transparent-base-color:hover,
body.ocs-auth .btn-transparent-base-color:focus {
    background-color: #f8fafc;
    color: var(--dark);
}
body.ocs-auth .admin-error {
    background: #fee2e2;
    color: var(--danger);
    border: 1px solid #fca5a5;
}
body.ocs-auth code { color: var(--dark); background: #f1f5f9; }

/* Responsive */
@media (max-width: 992px) {
    body.ocs-mirror .ocs-grid-2,
    body.ocs-mirror .ocs-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    body.ocs-mirror { display: block; }
    .ocs-menu-toggle { display: block; }
    .ocs-sidebar {
        left: -260px;
        width: 260px;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    .ocs-sidebar.active { left: 0; }
    .ocs-main { margin-left: 0; padding: 70px 12px 20px; width: 100%; }
    .ocs-page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}
