/* ================================================================
   Customer Catalog Dashboard — app styles
   Built on top of Bootstrap 5 + Bootstrap Icons (loaded via CDN).
   ================================================================ */

body {
    background: #f5f5f7;
    color: #202124;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Top navigation branding ---- */
.topnav {
    background: linear-gradient(135deg, #061624 0%, #0a2c44 100%);
}
.brand-logo {
    height: 34px;
    width: 34px;
    object-fit: contain;
}
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    color: #fff;
}
.brand-text .brand-title {
    font-size: 16px;
    font-weight: 600;
}
/* Czar Gaming palette: lime #c6ff00, cyan #00ffff, blue #0090c8 */
.brand-text .brand-sub {
    font-size: 11px;
    color: #c6ff00;
    opacity: 0.95;
    letter-spacing: 0.3px;
    font-weight: 400;
}

/* ---- Login page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #061624 0%, #0a2c44 100%);
    padding: 24px;
}
.login-wrap { width: 100%; max-width: 440px; }
.login-card { border: none; border-radius: 10px; }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-logo-lg { height: 56px; width: auto; max-width: 100%; object-fit: contain; }
.login-logo { text-align: center; margin-bottom: 20px; }
.brand-row .brand-title { font-size: 18px; font-weight: 600; color: #00739f; }
.brand-row .brand-sub   { font-size: 12px; color: #5f6368; letter-spacing: 0.3px; }

/* ---- Status chips ---- */
.badge.status-DRAFT              { background: #e8eaed; color: #3c4043; }
.badge.status-TECH_REVIEW        { background: #e3f2fd; color: #1565c0; }
.badge.status-MANAGEMENT_REVIEW  { background: #ede7f6; color: #4527a0; }
.badge.status-OPERATOR_SIGN_OFF  { background: #fff3e0; color: #e65100; }
.badge.status-READY_FOR_BUILD    { background: #e0f2f1; color: #00695c; }
.badge.status-BUILD_IN_PROGRESS  { background: #fff8e1; color: #f57f17; }
.badge.status-UAT                { background: #f3e5f5; color: #6a1b9a; }
.badge.status-GO_LIVE_SCHEDULED  { background: #e8f5e9; color: #2e7d32; }
.badge.status-LIVE               { background: #c8e6c9; color: #1b5e20; }
.badge.status-ON_HOLD            { background: #ffe0b2; color: #e65100; }
.badge.status-CANCELLED          { background: #ffcdd2; color: #b71c1c; }

/* ---- Form section headings ---- */
.section-h {
    font-size: 14px;
    font-weight: 600;
    color: #00739f;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 20px 0 8px;
}
.contact-h {
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0;
}

/* ---- Tabs ---- */
.nav-tabs .nav-link { color: #5f6368; }
.nav-tabs .nav-link.active { color: #00739f; font-weight: 500; }

/* ---- Tables ---- */
.table thead th {
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* ---- Provider category badges (wiring section) ---- */
.agg-card .card-header { background: #f1f3f9; font-size: 14px; }
.cat-badge { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; background: #e8eaf6; color: #283593; }
.cat-badge.cat-SLOTS        { background: #fff3e0; color: #e65100; }
.cat-badge.cat-LIVE_CASINO  { background: #e8f5e9; color: #1b5e20; }
.cat-badge.cat-SPORTS       { background: #e3f2fd; color: #0d47a1; }
.cat-badge.cat-HORSES       { background: #efebe9; color: #4e342e; }
.cat-badge.cat-POKER        { background: #f3e5f5; color: #4a148c; }
.cat-badge.cat-OTHER        { background: #eceff1; color: #37474f; }

/* ---- Asset preview boxes (branding section) ---- */
.preview-box {
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 6px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}
.preview-img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

/* ---- Notes log ---- */
.note-body { white-space: pre-wrap; word-break: break-word; }

/* ---- Customer tabs ---- */
.ticket-tabs { white-space: nowrap; }
.ticket-tabs .nav-link { font-size: 14px; padding: .5rem .8rem; }

/* ---- Pipeline bar on the overview ---- */
.pipeline { display: flex; justify-content: space-between; position: relative; }
.pipeline::before {
    content: ""; position: absolute; top: 7px; left: 4%; right: 4%;
    height: 2px; background: #e0e0e0; z-index: 0;
}
.pipeline .step { flex: 1; text-align: center; position: relative; z-index: 1; }
.pipeline .dot {
    width: 16px; height: 16px; border-radius: 50%; margin: 0 auto 6px;
    background: #fff; border: 2px solid #bdbdbd;
}
.pipeline .lbl { font-size: 12px; font-weight: 600; color: #5f6368; }
.pipeline .who { font-size: 11px; color: #9aa0a6; }
.pipeline .step.done .dot { background: #2e7d32; border-color: #2e7d32; }
.pipeline .step.current .dot { background: #0090c8; border-color: #0090c8; box-shadow: 0 0 0 4px rgba(0,144,200,.18); }
.pipeline .step.current .lbl { color: #00739f; }

/* ---- KPI tiles on the customer list ---- */
.kpi { border: 0; border-radius: 10px; }
.kpi .kpi-num { font-size: 26px; font-weight: 700; line-height: 1; }
.kpi .kpi-lbl { font-size: 12px; color: #5f6368; text-transform: uppercase; letter-spacing: .4px; }
a.kpi-link { text-decoration: none; color: inherit; }
a.kpi-link:hover .kpi { box-shadow: 0 .25rem .75rem rgba(0,0,0,.08) !important; }

/* ---- Code / template editors ---- */
.code-editor { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.45; tab-size: 4; }
pre.preview { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 6px; font-size: 12px; max-height: 420px; overflow: auto; white-space: pre; }
.secret-mask { letter-spacing: 2px; color: #9aa0a6; }
.row-link { cursor: pointer; }

/* ---- Provider lists: show ~10 rows per aggregator, scroll the rest ---- */
.prov-list { max-height: 268px; overflow-y: auto; scrollbar-width: thin; }
.prov-list .form-check { padding-right: 4px; }

/* ---- Branding: live theme preview (desktop 1280px page scaled into the panel) ---- */
.theme-preview { overflow: hidden; }
.preview-stage { position: relative; height: 380px; overflow: hidden; background: #e9ecef; }
.preview-stage iframe {
    position: absolute; top: 0; left: 0; border: 0; background: #fff;
    width: 1280px; height: 900px; transform-origin: 0 0;
}
.preview-stage.mobile { display: flex; justify-content: center; }
.preview-stage.mobile iframe {
    left: 50%; width: 390px; height: 844px; transform-origin: 50% 0; top: 4px;
    border: 8px solid #222; border-radius: 28px;
}
.preview-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }

/* ---- Czar Gaming accents ---- */
.topnav .brand-title { color: #00ffff; }
.login-card { border-top: 4px solid #00c8e8 !important; }

/* ---- pickers.js: multi-selects and list boxes ---- */
.pk { position: relative; }
.pk-field { min-height: 38px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; cursor: pointer; padding-right: 2.25rem; }
.pk-field:disabled { cursor: default; }
.pk-tag { background: var(--bs-primary-bg-subtle, #e7f0ff); color: var(--bs-primary-text-emphasis, #0a3a8a);
          border-radius: 4px; padding: 1px 7px; font-size: .82rem; white-space: nowrap; }
.pk-more { background: var(--bs-secondary-bg, #eee); color: var(--bs-secondary-color, #555); }
.pk-panel { position: absolute; z-index: 1060; left: 0; right: 0; top: calc(100% + 2px); min-width: 260px;
            background: var(--bs-body-bg, #fff); border: 1px solid var(--bs-border-color, #ddd); border-radius: 6px; }
.pk-top { padding: 8px; border-bottom: 1px solid var(--bs-border-color, #eee); }
.pk-list { max-height: 260px; overflow-y: auto; padding: 4px 0; }
.pk-group { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
            color: var(--bs-secondary-color, #777); padding: 6px 12px 2px; }
.pk-row { display: flex; align-items: center; padding: 4px 12px; margin: 0; cursor: pointer; font-size: .9rem; }
.pk-row:hover { background: var(--bs-tertiary-bg, #f4f6f8); }
.pk-row .form-check-input { margin-top: 0; flex: none; }
.pk-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px;
           border-top: 1px solid var(--bs-border-color, #eee); }

/* =====================================================================================================
   2026-11 look — "harbour" console in Czar Gaming colours (Inter text, JetBrains Mono for ids and code)
   ink #0E2433 · mist #EDF1F4 · panel #FFF · line #D6DEE5 · action #0A7FB5 · lime #C6FF00 (only on ink)
   One bold element: every skin page opens with an ink band (name, status, tabs) that continues the top bar;
   the lime underline marks the tab you are on. Everything else is flat and quiet.
   ===================================================================================================== */
:root {
    --ink: #0E2433; --ink-2: #16334A; --ink-line: rgba(255,255,255,.10);
    --mist: #EDF1F4; --panel: #FFFFFF; --line: #D6DEE5; --line-2: #E6ECF1;
    --text: #13222E; --muted: #5B6B7A; --faint: #8A98A6;
    --action: #0A7FB5; --action-dark: #086690; --action-soft: #E3F1F8;
    --lime: #C6FF00; --ok: #2F7D4F; --warn: #A15C00; --bad: #B4232C;
    --radius: 8px;
    --bs-primary: #0A7FB5; --bs-primary-rgb: 10,127,181; --bs-link-color: #0A7FB5; --bs-link-color-rgb: 10,127,181;
    --bs-link-hover-color: #086690; --bs-body-color: #13222E; --bs-border-color: #D6DEE5; --bs-body-bg: #FFFFFF;
    --bs-primary-bg-subtle: #E3F1F8; --bs-primary-text-emphasis: #075A80;
    --bs-font-sans-serif: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
    --bs-font-monospace: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
body { background: var(--mist); color: var(--text); font-family: var(--bs-font-sans-serif); font-size: 14px;
       -webkit-font-smoothing: antialiased; }
.table, .kpi-num, .skin-meta, .pipeline { font-variant-numeric: tabular-nums; }
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5 { font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
h1.h3 { font-size: 1.55rem; }
code, .font-monospace { font-family: var(--bs-font-monospace); }
code { color: #8A2E5C; font-size: .86em; }
a { color: var(--action); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--action) !important; outline-offset: 2px; }

/* ---- top bar: ink, flat; the skin band below continues it ---- */
.topnav { background: var(--ink) !important; box-shadow: none !important; padding-top: .45rem; padding-bottom: .45rem;
          border-bottom: 1px solid var(--ink-line); }
.topnav .brand-logo { height: 30px; width: 30px; }
.topnav .brand-title { color: #fff; font-weight: 600; font-size: 15px; letter-spacing: -0.005em; }
.topnav .brand-text .brand-sub { color: #9FB3C3; font-size: 11.5px; letter-spacing: 0; }
.topnav .btn-outline-light, .topnav .btn-light {
    border: 0; background: transparent; color: #D5E1EA; font-weight: 500; border-radius: 6px; padding: .35rem .7rem; }
.topnav .btn-outline-light:hover, .topnav .btn-outline-light:focus, .topnav .btn-outline-light.show {
    background: var(--ink-2); color: #fff; }
.topnav .btn-light { background: var(--lime); color: var(--ink); font-weight: 600; }
.topnav .btn-light:hover { background: #D6FF4D; color: var(--ink); }
.dropdown-menu { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(14,36,51,.14);
                 padding: .35rem; font-size: 14px; }
.dropdown-item { border-radius: 5px; padding: .4rem .65rem; }
.dropdown-item i { color: var(--muted); width: 1.2em; display: inline-block; }
.dropdown-item:active { background: var(--action); }
.dropdown-header { color: var(--faint); font-size: 12px; font-weight: 600; padding: .5rem .65rem .25rem; }

/* ---- the skin band: name, status and tabs on ink, full width ---- */
.skin-head { position: relative; background: var(--ink); color: #DCE6EE; margin: -1.5rem 0 1.25rem;
             padding: 1rem 0 0; box-shadow: 0 0 0 100vmax var(--ink); clip-path: inset(0 -100vmax); }
.skin-head .skin-back { color: #9FB3C3; text-decoration: none; font-size: 13px; padding: 0; }
.skin-head .skin-back:hover { color: #fff; }
.skin-head h1 { color: #fff; font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; margin: .2rem 0 .35rem; }
.skin-head .skin-meta { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; align-items: center; font-size: 13px; color: #A9BCCB; }
.skin-head .skin-meta code { color: var(--lime); background: transparent; font-size: 12.5px; }
.skin-head .skin-meta i { opacity: .7; margin-right: .2rem; }
.skin-head .ticket-tabs { border: 0; margin-top: 1rem; gap: .15rem; scrollbar-width: none; }
.skin-head .ticket-tabs::-webkit-scrollbar { display: none; }
.skin-head .ticket-tabs .nav-link { color: #A9BCCB; border: 0; border-radius: 0; background: transparent; font-weight: 500;
             padding: .55rem .8rem .7rem; position: relative; }
.skin-head .ticket-tabs .nav-link i { display: none; }
.skin-head .ticket-tabs .nav-link:hover { color: #fff; }
.skin-head .ticket-tabs .nav-link.active { color: #fff; background: transparent; }
.skin-head .ticket-tabs .nav-link.active::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0;
             height: 3px; border-radius: 3px 3px 0 0; background: var(--lime); }

/* ---- status chips: a dot and the word, readable on white and on ink ---- */
.badge[class*="status-"] { font-weight: 600; font-size: 11.5px; letter-spacing: 0; padding: .32em .7em .32em .6em;
                            border-radius: 999px; text-transform: none; }
.badge[class*="status-"]::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
                                    background: currentColor; margin-right: .45em; vertical-align: 1px; }
.badge.status-DRAFT              { background: #E6EBF0; color: #44535F; }
.badge.status-TECH_REVIEW        { background: #DDEFF8; color: #075A80; }
.badge.status-MANAGEMENT_REVIEW  { background: #E7E4F7; color: #4B3A9E; }
.badge.status-OPERATOR_SIGN_OFF  { background: #FCEBD9; color: #8F4A00; }
.badge.status-READY_FOR_BUILD    { background: #DDF2EC; color: #17664F; }
.badge.status-BUILD_IN_PROGRESS  { background: #FFF2CC; color: #7A5600; }
.badge.status-UAT                { background: #F1E3F5; color: #7A2C8C; }
.badge.status-GO_LIVE_SCHEDULED  { background: #E0F2E5; color: #276B3E; }
.badge.status-LIVE               { background: #D3EFD9; color: #1B5E32; }
.badge.status-ON_HOLD            { background: #FCE3CC; color: #8F4A00; }
.badge.status-CANCELLED          { background: #F8DADC; color: #9B1C25; }

/* ---- panels: flat white, hairline, no drop shadows ---- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none !important; }
.card > .card-body { padding: 1.15rem 1.25rem; }
.card-header { background: #F6F8FA; border-bottom: 1px solid var(--line-2); }
.shadow-sm { box-shadow: none !important; }
main > .card + .card, main .card.mb-3 { margin-bottom: 1rem !important; }

/* section headings: sentence case, weight not shouting */
.section-h { font-size: 15px; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: -0.005em;
             margin: 1.6rem 0 .75rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line-2); }
.card-body > .section-h:first-child, .section-h.mt-0 { margin-top: 0; }
.contact-h { font-size: 13px; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 600; }

/* ---- forms ---- */
.form-label { font-size: 13px; font-weight: 500; color: #33424E; margin-bottom: .3rem; }
.form-label.small { font-size: 12.5px; }
.form-text { color: var(--faint); font-size: 12.5px; }
.form-control, .form-select { border-color: #C9D4DD; border-radius: 6px; color: var(--text); }
.form-control::placeholder { color: #A3B0BC; }
.form-control:focus, .form-select:focus { border-color: var(--action); box-shadow: 0 0 0 3px rgba(10,127,181,.16); }
.form-control:disabled, .form-select:disabled, fieldset:disabled .form-control, fieldset:disabled .form-select {
    background-color: #F3F6F8; color: #5B6B7A; }
.form-check-input:checked { background-color: var(--action); border-color: var(--action); }
.input-group-text { background: #F6F8FA; border-color: #C9D4DD; color: var(--muted); }

/* ---- buttons ---- */
.btn { border-radius: 6px; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--action); --bs-btn-border-color: var(--action); --bs-btn-hover-bg: var(--action-dark);
               --bs-btn-hover-border-color: var(--action-dark); --bs-btn-active-bg: var(--action-dark);
               --bs-btn-disabled-bg: #8DBFD6; --bs-btn-disabled-border-color: #8DBFD6; }
.btn-outline-primary { --bs-btn-color: var(--action); --bs-btn-border-color: #9CC9DF; --bs-btn-hover-bg: var(--action);
                       --bs-btn-hover-border-color: var(--action); }
.btn-outline-secondary { --bs-btn-color: #44535F; --bs-btn-border-color: #C9D4DD; --bs-btn-hover-bg: #EEF2F5;
                         --bs-btn-hover-color: var(--text); --bs-btn-hover-border-color: #B6C3CE; }
.btn-link { text-decoration: none; }

/* ---- tables ---- */
.table { --bs-table-hover-bg: #F4F8FB; margin-bottom: .5rem; }
.table > :not(caption) > * > * { padding: .7rem .75rem; border-bottom-color: var(--line-2); }
.table thead th, .table-light th { background: transparent !important; font-size: 12.5px; font-weight: 600; color: var(--muted);
             text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--line) !important; }
.table-hover .row-link:hover td:first-child { box-shadow: inset 3px 0 0 var(--action); }
.table a { text-decoration: none; font-weight: 500; }
.table a:hover { text-decoration: underline; }

/* ---- customer list: the counts are links into the list ---- */
.kpi { border: 1px solid var(--line); background: var(--panel); }
.kpi .card-body { padding: 1rem 1.15rem; }
.kpi .kpi-num { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.kpi .kpi-num.text-success { color: var(--ok) !important; }
.kpi .kpi-lbl { font-size: 13px; color: var(--muted); text-transform: none; letter-spacing: 0; margin-top: .3rem; }
a.kpi-link:hover .kpi { border-color: var(--action); box-shadow: none !important; }

/* ---- pipeline on Overview: done steps solid, the current one ringed in lime on ink ---- */
.pipeline::before { background: var(--line); height: 2px; top: 8px; }
.pipeline .dot { width: 18px; height: 18px; border: 2px solid #C3CFD9; background: var(--panel); }
.pipeline .lbl { font-size: 13px; color: var(--faint); font-weight: 500; }
.pipeline .who { font-size: 12px; color: var(--faint); }
.pipeline .step.done .dot { background: var(--action); border-color: var(--action); }
.pipeline .step.done .lbl { color: var(--muted); font-weight: 500; }
.pipeline .step.current .dot { background: var(--lime); border-color: var(--ink); box-shadow: 0 0 0 4px var(--ink); }
.pipeline .step.current .lbl { color: var(--text); font-weight: 600; }
.pipeline .step.current .who { color: var(--muted); }

/* ---- alerts, notes, preview ---- */
.alert { border-radius: var(--radius); border: 1px solid transparent; }
.alert-success { background: #E3F3E8; color: #1E5B34; border-color: #C3E5CD; }
.alert-danger { background: #FBE6E7; color: #8E1C24; border-color: #F2C4C7; }
.alert-light { background: #F6F8FA; border-color: var(--line) !important; color: var(--muted); }
pre.preview { background: var(--ink); color: #DCE6EE; border-radius: 6px; }
.nav-tabs .nav-link.active { color: var(--action); }
.pk-tag { background: var(--action-soft); color: #075A80; }

.topnav .btn { white-space: nowrap; }
@media (max-width: 767.98px) {
    .topnav .container-fluid { flex-wrap: wrap; row-gap: .35rem; }
    .topnav .container-fluid > .d-flex { flex-wrap: wrap; gap: .15rem !important; }
    .skin-head h1 { font-size: 1.3rem; }
    .topnav .brand-text .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
