/* =====================================================================
   Christy theme (Terracotta & Linen) for the MyMDMCV Vendor & Customer Portal
   Loaded LAST on every layout, so it overrides the "Sliced" Tailwind
   template, DataTables, Select2 and portal_style.css.
   To roll back: remove the <link> to this file from the Head_css partials.
   ===================================================================== */

:root {
    /* Christy navy + Terracotta & Linen */
    --c-navy: #1C355E;           /* Christy brand navy: sidebar, headings, main buttons */
    --c-navy-deep: #1C355E;      /* sidebar */
    --c-navy-hover: #26457A;
    --c-accent: #C0643F;         /* terracotta: highlights, chart bars, active markers */
    --c-accent-text: #9A4A2A;    /* terracotta dark enough for text on white */
    --c-accent-on-navy: #E59A78; /* terracotta light enough for use on navy */
    --c-accent-soft: #F6E3D9;    /* terracotta tint for badges */
    --c-gold: #C0643F;
    --c-gold-text: #9A4A2A;
    --c-gold-light: #E59A78;
    --c-cream: #F5EFE6;
    --c-ground: #F5EFE6;         /* linen background */
    --c-sand: #E6DACB;
    --c-line: #E6DACB;           /* borders */
    --c-field-line: #D9CBB8;
    --c-head-bg: #FAF6F0;
    --c-tint: #F1E9DD;
    --c-ink: #1F2430;
    --c-muted: #5B6170;
    --c-success: #2E6B4E;
    --c-success-bg: #E7F1EB;
    --c-warning: #9A4A2A;
    --c-warning-bg: #F6E3D9;
    --c-danger: #B42318;
    --c-danger-bg: #FBE9E7;
    --c-radius: 12px;
    --c-radius-sm: 8px;
    --f-body: 'Source Sans 3', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --f-display: Georgia, 'Times New Roman', serif;
    --sidebar-w: 240px;
}

/* ---------- Base ---------- */
html body,
html body.font-cerebri {
    font-family: var(--f-body) !important;
    font-size: 15px;
    color: var(--c-ink);
    -webkit-text-size-adjust: 100%;
}

body .bg-\[\#f9fbfd\] { background-color: var(--c-ground) !important; }

a { color: var(--c-navy); }

/* ---------- Sidebar ---------- */
body .sidebar {
    background: var(--c-navy-deep) !important;
    border: 0 !important;
    width: var(--sidebar-w);
}
body .sidebar > div:first-child {
    background: transparent !important;
    height: auto !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
body .sidebar > div:first-child > .p-4 { padding: 22px 16px !important; }
body .sidebar .main-logo img {
    width: 150px !important;
    max-width: 100%;
    height: auto !important;
}
body .sidebar .detached-menu {
    height: calc(100vh - 92px) !important;
    padding: 8px 12px 24px !important;
    margin-top: 0 !important;
}
body .sidebar .detached-menu::-webkit-scrollbar { width: 6px; }
body .sidebar .detached-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* section labels (Portal, Emails, User Module …) */
body .sidebar h2 {
    margin: 18px 12px 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-gold-light) !important;
}

/* top-level items */
body .sidebar .nav-item > a,
body .sidebar .nav-item > a.text-black {
    min-height: 42px;
    padding: 0 12px !important;
    margin-bottom: 2px !important;
    border-radius: var(--c-radius-sm);
    color: rgba(255, 255, 255, 0.80) !important;
    font-size: 15px;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}
body .sidebar .nav-item > a svg { color: inherit; opacity: 0.9; }
body .sidebar .nav-item > a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF !important;
}
body .sidebar .nav-item > a.active {
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 3px 0 0 var(--c-accent-on-navy);
    color: #FFFFFF !important;
    font-weight: 600;
}
body .sidebar .nav-item > a .dropdown-icon { opacity: 0.6; }

/* sub-menu items */
body .sidebar ul.sub-menu {
    color: rgba(255, 255, 255, 0.68) !important;
    padding: 2px 0 6px;
}
body .sidebar ul.sub-menu li a {
    min-height: 36px;
    padding-left: 44px !important;
    border-radius: var(--c-radius-sm);
    color: rgba(255, 255, 255, 0.68) !important;
    font-size: 14px;
}
body .sidebar ul.sub-menu li a:before { display: none !important; }
body .sidebar ul.sub-menu li a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF !important;
}
body .sidebar ul.sub-menu li a.active {
    background: rgba(255, 255, 255, 0.10);
    box-shadow: inset 3px 0 0 var(--c-accent-on-navy);
    color: #FFFFFF !important;
    font-weight: 600;
}

/* ---------- Top bar ---------- */
body .detached-topbar {
    height: 64px !important;
    background: #FFFFFF !important;
    border-bottom: 1px solid var(--c-line) !important;
    padding: 0 20px !important;
}
body .detached-topbar > div > button,
body .detached-topbar .h-5 > button {
    width: 40px;
    height: 40px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--c-line);
    border-radius: var(--c-radius-sm);
    color: var(--c-navy) !important;
    background: #FFFFFF;
}
body .detached-topbar .h-5 { height: 40px !important; }
body .detached-topbar .h-5 > button.hidden { display: none !important; }
body .detached-topbar .profile > button {
    height: 44px;
    padding: 0 10px 0 4px;
    gap: 10px !important;
    border: 1px solid var(--c-line);
    border-radius: 22px;
    color: var(--c-ink);
    font-weight: 500;
}
.christy-avatar {
    width: 34px;
    height: 34px;
    border-radius: 17px;
    background: var(--c-navy);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex: none;
}
body .detached-topbar .profile ul {
    border-color: var(--c-line) !important;
    border-radius: var(--c-radius-sm) !important;
    box-shadow: 0 10px 30px rgba(21, 33, 58, 0.12);
    margin-top: -6px;
}
body .detached-topbar .profile ul a { padding: 10px 14px !important; font-size: 15px; }
.christy-topbar-logo { display: none; height: 30px; width: auto; }

/* ---------- Page title ---------- */
.christy-page-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 4px; }
.christy-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-gold-text);
}
.christy-page-title {
    margin: 0;
    font-family: var(--f-display);
    font-weight: 400;
    font-size: 32px;
    line-height: 1.15;
    color: var(--c-navy);
}

/* ---------- Content area ---------- */
body .detached-content {
    padding: 24px 28px !important;
}
body .detached-content > * + * { margin-top: 20px !important; }

/* cards */
body .detached-content .bg-white.border,
body .detached-content .bg-white.shadow-md,
body .detached-content .card,
body .detached-content .rounded-2xl.bg-white {
    border: 1px solid var(--c-line) !important;
    border-radius: var(--c-radius) !important;
    box-shadow: none !important;
}
body .detached-content .border-black\/10 { border-color: var(--c-line) !important; }

body .detached-content h2,
body .detached-content h3,
body .detached-content h4.card-title,
body .detached-content .text-base.font-semibold.text-slate-800 {
    font-family: var(--f-display);
    font-weight: 400 !important;
    color: var(--c-navy) !important;
}
body .detached-content h2 { font-size: 20px !important; }

/* KPI cards (dashboard) */
.christy-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.christy-kpi {
    background: #FFFFFF;
    border: 1px solid var(--c-line);
    border-radius: var(--c-radius);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.christy-kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.christy-kpi-label { font-size: 15px; font-weight: 600; color: var(--c-muted); line-height: 1.25; }
.christy-kpi-icon {
    width: 38px; height: 38px; flex: none;
    border-radius: 10px;
    background: var(--c-tint);
    color: var(--c-navy);
    display: inline-flex; align-items: center; justify-content: center;
}
.christy-kpi-icon.is-pending { background: var(--c-warning-bg); color: var(--c-warning); }
.christy-kpi-value {
    font-family: var(--f-display);
    font-size: 40px;
    line-height: 1;
    color: var(--c-navy);
    min-height: 40px;
}
.christy-kpi-sub { font-size: 14px; color: var(--c-muted); }
body .detached-content .christy-kpi-value label,
body .detached-content .christy-chip label { font: inherit !important; color: inherit !important; margin: 0; }
.christy-chip {
    display: inline-block;
    min-width: 12px;
    padding: 1px 8px;
    border-radius: 10px;
    background: var(--c-tint);
    color: #4A5060;
    font-weight: 600;
    text-align: center;
}
.christy-chip.is-up { background: var(--c-success-bg); color: var(--c-success); }

/* ---------- Buttons ---------- */
body .btn {
    min-height: 44px;
    padding: 10px 20px;
    border-radius: var(--c-radius-sm) !important;
    font-family: var(--f-body);
    font-weight: 600 !important;
    font-size: 15px;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
body .btn.w-full { display: flex; }
body .detached-content .flex > .btn + .btn,
body .detached-content .flex > a.btn + a.btn { margin-left: 10px; }
body .btn.bg-WebApp, body .btn-WebApp, body .bg-WebApp,
body .btn.bg-purple, body .bg-purple {
    background-color: var(--c-navy) !important;
    border-color: var(--c-navy) !important;
    color: #FFFFFF !important;
}
body .btn.bg-WebApp:hover, body .btn.bg-purple:hover { background-color: var(--c-navy-hover) !important; border-color: var(--c-navy-hover) !important; }
body .btn.bg-info {
    background-color: #FFFFFF !important;
    border-color: var(--c-navy) !important;
    color: var(--c-navy) !important;
}
body .btn.bg-info:hover { background-color: var(--c-tint) !important; }
body .btn.bg-success { background-color: var(--c-success) !important; border-color: var(--c-success) !important; color: #FFFFFF !important; }
body .btn.bg-danger { background-color: var(--c-danger) !important; border-color: var(--c-danger) !important; color: #FFFFFF !important; }
body .btn.border-danger:not(.bg-danger) { color: var(--c-danger) !important; border-color: var(--c-danger) !important; }
body .btn:focus-visible { outline: 3px solid rgba(192, 100, 63, 0.55); outline-offset: 2px; }

body .text-purple { color: var(--c-navy) !important; }
body .border-purple { border-color: var(--c-navy) !important; }
body .text-success { color: var(--c-success) !important; }
body .text-danger { color: var(--c-danger) !important; }

/* ---------- Forms ---------- */
body .form-input, body .form-select, body .form-textarea, body .form-multiselect,
body .detached-content input[type="text"], body .detached-content input[type="email"],
body .detached-content input[type="number"], body .detached-content input[type="password"],
body .detached-content input[type="tel"], body .detached-content input[type="date"],
body .detached-content select, body .detached-content textarea {
    min-height: 46px;
    border: 1px solid var(--c-field-line) !important;
    border-radius: var(--c-radius-sm) !important;
    background-color: #FFFFFF !important;
    color: var(--c-ink) !important;
    font-family: var(--f-body);
    font-size: 15px;
    box-shadow: none !important;
}
body .detached-content textarea, body .form-textarea { min-height: 96px; padding-top: 10px; }
body .form-input:focus, body .form-select:focus, body .form-textarea:focus,
body .detached-content input:focus, body .detached-content select:focus, body .detached-content textarea:focus {
    border-color: var(--c-navy) !important;
    outline: none !important;
    box-shadow: 0 0 0 1px var(--c-navy) !important;
}
body .form-input::placeholder, body .detached-content input::placeholder, body .detached-content textarea::placeholder { color: #8B8F9A !important; }
body .detached-content input[disabled], body .detached-content select[disabled],
body .detached-content input[readonly] { background-color: #F4F1EA !important; color: var(--c-muted) !important; }
body .detached-content input[type="checkbox"], body .detached-content input[type="radio"] { accent-color: var(--c-navy); }
body .detached-content label { color: var(--c-ink); font-weight: 600; font-size: 14px; }

.required-field:after { color: var(--c-danger) !important; font-size: 16px !important; }
body .field-validation-error, body .text-danger.field-validation-error { color: var(--c-danger) !important; font-size: 13px; }
body .input-validation-error { border-color: var(--c-danger) !important; }

/* Select2 */
body .select2-container .select2-selection--single {
    height: 46px !important;
    border: 1px solid var(--c-field-line) !important;
    border-radius: var(--c-radius-sm) !important;
    background: #FFFFFF !important;
}
body .select2-container .select2-selection__rendered { line-height: 44px !important; padding-left: 14px !important; color: var(--c-ink) !important; }
body .select2-container .select2-selection__arrow { height: 44px !important; right: 8px !important; }
body .select2-container--focus .select2-selection--single,
body .select2-container--open .select2-selection--single { border-color: var(--c-navy) !important; }
body .select2-dropdown { border-color: var(--c-field-line) !important; border-radius: var(--c-radius-sm) !important; }
body .select2-results__option--highlighted { background: var(--c-navy) !important; color: #FFFFFF !important; }

/* Fieldset sections (e.g. "Business details") */
body .fieldset2 {
    border: 1px solid var(--c-line) !important;
    border-radius: var(--c-radius) !important;
    background: #FFFFFF;
    padding: 20px 24px 24px !important;
    margin-bottom: 20px !important;
}
body .fieldset2 legend {
    border: 0 !important;
    color: var(--c-navy) !important;
    font-family: var(--f-display);
    font-variant: normal !important;
    font-size: 19px !important;
    padding: 0 10px !important;
    margin-left: -6px !important;
    background: #FFFFFF;
}
body .section { border-color: var(--c-line) !important; border-radius: var(--c-radius); }
body .section-title { color: var(--c-navy) !important; font-family: var(--f-display); font-weight: 400 !important; }

/* ---------- Tables / DataTables ---------- */
body .detached-content table { border-color: var(--c-line) !important; font-size: 15px; }
body .detached-content table thead th,
body table.dataTable thead th {
    background: var(--c-head-bg) !important;
    color: var(--c-muted) !important;
    font-weight: 600 !important;
    font-size: 13px;
    border-bottom: 1px solid var(--c-line) !important;
    white-space: nowrap;
}
body .detached-content table td { border-color: var(--c-line) !important; }
body table.dataTable tbody tr:hover { background-color: #FBF7F1 !important; }
body .dt-container .dt-layout-table .dt-layout-cell,
body .dataTables_wrapper .dataTables_scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body .dt-container .dt-paging .dt-paging-button.current,
body .dt-container .dt-paging .dt-paging-button.current:hover {
    background: var(--c-navy) !important;
    border-color: var(--c-navy) !important;
    color: #FFFFFF !important;
    border-radius: 6px;
}
body .dt-container .dt-search input { min-height: 40px; }

/* ---------- Footer ---------- */
body .detached-content footer { color: var(--c-muted) !important; font-size: 13px; padding-top: 12px; }

/* =====================================================================
   Mobile & tablet (below 1024px): hidden off-canvas menu
   ===================================================================== */
@media (max-width: 1023.98px) {
    body .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        right: auto !important;
        width: 288px !important;
        max-width: 86vw;
        height: 100% !important;
        border-radius: 0 !important;
        transform: translateX(-105%);
        transition: transform .25s ease, box-shadow .25s ease !important;
        z-index: 60 !important;
    }
    body.toggle-sidebar .sidebar {
        transform: translateX(0);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    }
    /* undo the desktop "collapsed" rules when the menu is opened on mobile */
    body.toggle-sidebar .sidebar .nav-item a span,
    body.toggle-sidebar .sidebar h2 { display: block !important; }
    body.toggle-sidebar .sidebar .nav-item a .dropdown-icon { display: flex !important; }
    body.toggle-sidebar .sidebar .nav-item a { justify-content: space-between !important; }
    body.toggle-sidebar .sidebar .sub-menu { display: flex; }
    body.toggle-sidebar .sidebar ul { row-gap: 0.25rem !important; }
    body.toggle-sidebar .sidebar .main-logo .logo-icon { display: none !important; }
    body.toggle-sidebar .sidebar .main-logo .dark-logo { display: block !important; }
    body .sidebar .detached-menu { height: calc(100% - 92px) !important; }
    body .sidebar .nav-item > a { min-height: 44px; font-size: 16px; }

    /* the dimmed backdrop behind the open menu */
    body div.fixed.inset-0[class*="bg-black/60"] {
        z-index: 55 !important;
        background: rgba(10, 16, 30, 0.56) !important;
    }

    body .main-content,
    body.toggle-sidebar .main-container .main-content { margin-left: 0 !important; margin-right: 0 !important; padding: 0 !important; }

    body .detached-topbar { padding: 0 12px !important; gap: 8px !important; }
    body .detached-topbar > div:first-child button { width: 44px; height: 44px; }
    .christy-topbar-logo { display: block; }
    body .detached-topbar .profile > button { width: 44px; padding: 0 !important; justify-content: center; border: 0; }
    body .detached-topbar .profile > button > svg { display: none; }

    body .detached-content { padding: 18px 16px !important; height: calc(100vh - 64px) !important; }
    .christy-page-title { font-size: 26px; }
    .christy-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .christy-kpi { padding: 14px; gap: 8px; }
    .christy-kpi-icon { display: none; }
    .christy-kpi-label { font-size: 13px; }
    .christy-kpi-value { font-size: 30px; min-height: 30px; }
    .christy-kpi-sub { font-size: 12px; }

    /* dashboard panels: let them size to content */
    body .detached-content .h-\[400px\] { height: auto !important; min-height: 0; }
    body .detached-topbar .h-5 { display: none !important; }

    /* forms: full-width fields, stacked actions */
    body .fieldset2 { padding: 14px 14px 18px !important; }
    body .detached-content .grid { grid-template-columns: minmax(0, 1fr) !important; }
    body .detached-content .christy-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    body .detached-content input:not([type="checkbox"]):not([type="radio"]),
    body .detached-content select, body .detached-content textarea,
    body .detached-content .select2-container,
    body .detached-content [class*="w-1/"], body .detached-content [class*="w-2/"],
    body .detached-content [class*="w-3/"], body .detached-content [class*="w-4/"],
    body .detached-content [class*="w-5/"] { width: 100% !important; max-width: 100%; }
    body .detached-content .flex.justify-end,
    body .detached-content .flex.justify-between { flex-wrap: wrap; gap: 10px; }

    /* any wide table scrolls inside its own box instead of the whole page */
    body .detached-content table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    body .detached-content table.dataTable { display: table; }
}

@media (min-width: 1024px) {
    body .detached-topbar .profile > button { padding-right: 12px; }
}
@media (max-width: 1279.98px) and (min-width: 1024px) {
    .christy-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =====================================================================
   Sign-in & account pages (BlankLayout)
   ===================================================================== */
.christy-auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    background: var(--c-cream);
    font-family: var(--f-body);
}
.christy-auth-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #FFFFFF;
}
.christy-auth-hero::before { content: ""; position: absolute; inset: 0; background: rgba(28, 53, 94, 0.80); }
.christy-auth-hero-inner {
    position: relative;
    height: 100%;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 56px 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
}
.christy-auth-hero-logo { width: 200px; height: auto; }
.christy-auth-hero-copy { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.christy-auth-hero-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; color: #F0B79A; text-transform: uppercase; }
.christy-auth-hero-title { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 48px; line-height: 1.1; color: #FFFFFF; }
.christy-auth-hero-text { margin: 0; font-size: 18px; line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.christy-auth-hero-foot { display: flex; flex-wrap: wrap; gap: 10px 24px; font-size: 14px; color: rgba(255, 255, 255, 0.72); }

.christy-auth-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    padding: 40px 48px 24px;
}
.christy-auth-mobile-logo { display: none; }
.christy-auth-main { flex: 1; display: flex; align-items: center; justify-content: center; }
.christy-auth-footer {
    border-top: 1px solid var(--c-sand);
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    font-size: 14px;
    color: var(--c-muted);
}

/* existing account views (Forgot/Reset password…) drop into the right-hand panel */
.christy-auth-main > div { min-height: 0 !important; width: 100%; padding: 0 !important; max-width: 460px !important; }
.christy-auth-main .loginform {
    max-width: 460px !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}
.christy-auth-main .loginform h1 {
    font-family: var(--f-display);
    font-weight: 400 !important;
    font-size: 34px !important;
    color: var(--c-navy) !important;
    text-align: left !important;
}
.christy-auth-main .loginform p.text-center { text-align: left !important; }
.christy-auth-main .form-input {
    height: 48px;
    border-radius: var(--c-radius-sm) !important;
    border-color: var(--c-field-line) !important;
    background: #FFFFFF !important;
    font-size: 16px;
    padding: 0 14px;
}
.christy-auth-main .form-input:focus { border-color: var(--c-navy) !important; box-shadow: 0 0 0 1px var(--c-navy) !important; }
.christy-auth-main .btn {
    min-height: 52px;
    border-radius: var(--c-radius-sm) !important;
    background: var(--c-navy) !important;
    border-color: var(--c-navy) !important;
    color: #FFFFFF !important;
    font-size: 17px !important;
}

/* the Login view's own pieces */
.christy-signin { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 26px; }
.christy-signin-head { display: flex; flex-direction: column; gap: 8px; }
.christy-signin-head h1 { margin: 0; line-height: 1.15; font-family: var(--f-display); font-weight: 400; font-size: 36px; color: var(--c-navy); }
.christy-signin-head p { margin: 0; font-size: 16px; color: var(--c-muted); }
.christy-field { display: flex; flex-direction: column; gap: 6px; }
.christy-field > label { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.christy-pw { position: relative; }
.christy-pw .form-input { padding-right: 52px !important; }
.christy-pw-toggle {
    position: absolute; right: 4px; top: 4px;
    width: 40px; height: 40px;
    border: 0; background: transparent;
    color: var(--c-muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border-radius: 6px;
}
.christy-pw-toggle:hover { color: var(--c-navy); }
.christy-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.christy-row label { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--c-ink); }
.christy-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--c-navy); }
.christy-row a { font-weight: 600; text-decoration: none; color: var(--c-navy); min-height: 44px; display: flex; align-items: center; }
.christy-row a:hover { color: var(--c-gold-text); }
.christy-errors { color: var(--c-danger); font-size: 14px; }
.christy-errors ul { margin: 0; padding: 10px 14px; list-style: none; background: var(--c-danger-bg); border-radius: var(--c-radius-sm); }
.christy-errors.validation-summary-valid { display: none; }

@media (max-width: 1023.98px) {
    .christy-auth { grid-template-columns: minmax(0, 1fr); }
    .christy-auth-hero { min-height: 200px; }
    .christy-auth-hero-inner { min-height: 200px; padding: 28px 20px; align-items: center; justify-content: center; gap: 12px; }
    .christy-auth-hero-copy, .christy-auth-hero-foot { display: none; }
    .christy-auth-hero-logo { width: 150px; }
    .christy-auth-hero .christy-auth-hero-eyebrow-mobile { display: block; }
    .christy-auth-panel { min-height: 0; padding: 28px 20px 20px; }
    .christy-auth-main { align-items: flex-start; }
    .christy-signin-head h1, .christy-auth-main .loginform h1 { font-size: 30px !important; }
    .christy-auth-footer { justify-content: center; text-align: center; margin-top: 28px; }
    .christy-auth-footer .christy-hide-sm { display: none; }
}
.christy-auth-hero-eyebrow-mobile { display: none; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; color: #F0B79A; text-transform: uppercase; }

/* Server CAPTCHA on the sign-in page */
.christy-captcha { display: flex; align-items: stretch; gap: 10px; flex-wrap: wrap; }
.christy-captcha img {
    width: 150px; height: 48px; flex: none;
    object-fit: contain;
    border: 1px solid var(--c-field-line);
    border-radius: var(--c-radius-sm);
    background: #FFFFFF;
}
.christy-captcha-refresh {
    width: 48px; height: 48px; flex: none;
    border: 1px solid var(--c-field-line);
    border-radius: var(--c-radius-sm);
    background: #FFFFFF;
    color: var(--c-navy);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.christy-captcha-refresh:hover { border-color: var(--c-navy); }
.christy-captcha .form-input { flex: 1 1 140px; min-width: 0; letter-spacing: 0.08em; }
.christy-field-error { color: var(--c-danger); font-size: 13px; }

/* Wide report grids (Reports > Customers / Vendors): keep them inside their card.
   portal_style.css sets .row { display: table } which stretches to the table's full width,
   and grid/flex children default to min-width:auto, so the card grew with it. */
body .detached-content .grid > *,
body .detached-content .flex-col > *,
body .detached-content .card { min-width: 0; max-width: 100%; }
body .detached-content .row:has(table.dataTable),
body .detached-content .row:has(.dt-container),
body .detached-content .row:has(table[id^="tbl"]) { display: block !important; width: 100%; }
body .detached-content .row:has(table.dataTable) > [class*="col"],
body .detached-content .row:has(.dt-container) > [class*="col"],
body .detached-content .row:has(table[id^="tbl"]) > [class*="col"] { display: block !important; width: 100% !important; min-width: 0; }
body .detached-content .dt-container { width: 100%; max-width: 100%; }
body .detached-content .dt-container .dt-layout-row.dt-layout-table,
body .detached-content .dt-container .dt-layout-table .dt-layout-cell { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
body .detached-content table.dataTable th,
body .detached-content table.dataTable td { white-space: nowrap; }
