/* ChatZap brand v1.0. Original logos; one shared stylesheet for every company. */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter/InterVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand-red: #ed1c24;
    --brand-red-action: #d51921;
    --brand-red-hover: #bc151c;
    --brand-red-text: #bc151c;
    --brand-red-soft: #fff0f1;
    --brand-graphite: #111827;
    --brand-green: #25d366;
    --brand-blue: #00a3ff;
    --brand-link: #0075b8;
    --app-bg: #f5f7fa;
    --app-surface: #ffffff;
    --app-surface-soft: #f5f7fa;
    --app-border: #e2e6ed;
    --app-text: #111827;
    --app-muted: #4b5563;
    --app-subtle: #6b7280;
    --app-primary: var(--brand-red-text);
    --app-focus: rgba(237,28,36,.12);
    --workspace-accent-soft: var(--brand-red-soft);
    --workspace-chart-grid: #e8ecf2;
    --workspace-shadow: 0 3px 16px rgba(17,24,39,.035);
    color-scheme: light;
}

html.dark {
    --brand-red-text: #ff8389;
    --brand-red-soft: #36212b;
    --brand-link: #00a3ff;
    --app-bg: #0f172a;
    --app-surface: #111827;
    --app-surface-soft: #1b2638;
    --app-border: #2b384b;
    --app-text: #e5e7eb;
    --app-muted: #c4cbd6;
    --app-subtle: #9ca8bb;
    --app-primary: var(--brand-red-text);
    --app-focus: rgba(237,28,36,.12);
    --workspace-accent-soft: var(--brand-red-soft);
    --workspace-chart-grid: #29364a;
    --workspace-shadow: none;
    color-scheme: dark;
}

html body.brand-app,html.dark body.brand-app,
html body.brand-public,html.dark body.brand-public,
html body.brand-login,html.dark body.brand-login {
    background: var(--app-bg);
    color: var(--app-text);
    font-family: 'Inter',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
    line-height: 1.5;
    font-optical-sizing: auto;
}

.brand-signature { display: inline-block; width: 228px; max-width: 100%; vertical-align: middle; }
.brand-signature img { display: block; width: 100%; height: auto; object-fit: contain; }
.brand-signature .brand-logo-dark { display: none; }
html.dark .brand-signature .brand-logo-light { display: none; }
html.dark .brand-signature .brand-logo-dark { display: block; }
.brand-public-wordmark { display: inline-block; margin-bottom: 28px; }
.brand-public-wordmark:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 8px; border-radius: 6px; }

/* Graphite navigation, red selection and the original negative signature. */
html .app-sidebar,html.dark .app-sidebar { background: var(--brand-graphite); border-color: #283345; color: #e5e7eb; box-shadow: none; }
.app-sidebar .sidebar-brand,.app-sidebar .sidebar-footer { border-color: #283345; }
.app-sidebar .sidebar-brand-copy { width: 160px; min-width: 0; gap: 7px; }
.app-sidebar .sidebar-brand-copy .brand-signature { width: 160px; }
.app-sidebar .brand-signature .brand-logo-light,html.dark .app-sidebar .brand-signature .brand-logo-light { display: none; }
.app-sidebar .brand-signature .brand-logo-dark { display: block; }
.app-sidebar .brand-slogan { color: #a9b4c5; font-size: 10px; font-weight: 400; line-height: 1.4; }
.brand-sidebar-symbol { display: none; width: 36px; height: 36px; object-fit: contain; flex: 0 0 36px; }
.app-sidebar .sidebar-footer-mark { background: transparent; }
.app-sidebar .sidebar-footer-mark img { width: 24px; height: 24px; object-fit: contain; }
.app-sidebar .sidebar-footer-copy strong { color: #e5e7eb; }
.app-sidebar .sidebar-footer-copy small { color: #a9b4c5; }
html .app-sidebar .sidebar-link,html .app-sidebar .sidebar-group-toggle,
html.dark .app-sidebar .sidebar-link,html.dark .app-sidebar .sidebar-group-toggle { color: #c4cbd6; font-size: 13px; }
html .app-sidebar .sidebar-link:hover,html .app-sidebar .sidebar-group-toggle:hover,
html.dark .app-sidebar .sidebar-link:hover,html.dark .app-sidebar .sidebar-group-toggle:hover { background: #1e293b; color: #fff; outline-color: rgba(237,28,36,.4); }
html .app-sidebar .sidebar-link.is-active,html .app-sidebar .sidebar-group.is-current>.sidebar-group-toggle,
html.dark .app-sidebar .sidebar-link.is-active,html.dark .app-sidebar .sidebar-group.is-current>.sidebar-group-toggle { background: #30232d; color: #fff; box-shadow: inset 3px 0 0 var(--brand-red); }
.app-sidebar .sidebar-link:focus-visible,.app-sidebar .sidebar-group-toggle:focus-visible { outline: 2px solid #ff8389; outline-offset: -2px; }
.app-sidebar .sidebar-submenu { border-color: #334155; }
.app-sidebar .sidebar-divider { background: #283345; }
.app-sidebar .sidebar-collapse,.app-sidebar .sidebar-mobile-close { color: #c4cbd6; }
.app-sidebar .sidebar-collapse:hover,.app-sidebar .sidebar-mobile-close:hover { background: #1e293b; color: #fff; }
.sidebar-badge { background: var(--brand-red-action); }
.brand-navbar { background: var(--app-surface); border-color: var(--app-border); backdrop-filter: none; }
html.dark .brand-navbar { background: var(--app-surface); border-color: var(--app-border); }
.brand-navbar-main { flex: 1; min-width: 0; }
.brand-mobile-mark { display: none; flex: 0 0 36px; width: 36px; height: 40px; align-items: center; justify-content: center; }
.brand-mobile-mark img { width: 28px; height: 28px; object-fit: contain; }
.brand-navbar .brand-account-avatar { background: var(--brand-red-soft); color: var(--brand-red-text); }
.brand-footer { color: var(--app-subtle); }
.brand-footer>div { border-color: var(--app-border); }

/* Primary actions are branded; success/availability indicators remain green. */
html body .cz-button.cz-primary,html body .help-button.help-primary,
html body .ops-page .btn-primary,html body .tasks-primary,
html body :is(button,a,input[type=submit]):is(.bg-emerald-500,.bg-emerald-600,.bg-emerald-700) {
    background: var(--brand-red-action);
    border-color: var(--brand-red-action);
    color: #fff;
    box-shadow: none;
}
html body .cz-button.cz-primary:hover,html body .help-button.help-primary:hover,
html body .ops-page .btn-primary:hover,
html body :is(button,a,input[type=submit]):is(.bg-emerald-500,.bg-emerald-600,.bg-emerald-700):hover {
    background: var(--brand-red-hover);
    border-color: var(--brand-red-hover);
    color: #fff;
}
html body .cz-button.cz-danger { background: var(--brand-red-soft); color: var(--brand-red-text); border-color: var(--brand-red-text); }
html body :is(button,a,input,select,textarea,summary):focus-visible { outline-color: var(--brand-red); }
html body .cz-workspace .cz-field :is(input,select,textarea):focus,
.brand-login input:focus { border-color: var(--brand-red); box-shadow: 0 0 0 3px rgba(237,28,36,.1); }
input[type=checkbox],input[type=radio],progress { accent-color: var(--brand-red-action); }
main input[type=file] { min-height: 44px; height: 44px; padding: 0 !important; overflow: hidden; background: var(--app-surface); color: var(--app-muted); border: 1px solid var(--app-border); border-radius: 8px; font-size: 13px; }
main input[type=file]::file-selector-button { height: 42px; margin: 0 12px 0 0; padding: 0 14px; border: 0; border-right: 1px solid var(--app-border); background: var(--app-surface-soft); color: var(--app-text); font: inherit; font-weight: 600; cursor: pointer; }
main input[type=file]::file-selector-button:hover { background: var(--brand-red-soft); color: var(--brand-red-text); }
.brand-file-control { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; width: 100%; height: 44px; overflow: hidden; border: 1px solid var(--app-border); border-radius: 8px; background: var(--app-surface); color: var(--app-muted); box-sizing: border-box; cursor: pointer; }
.brand-file-button { display: flex; align-items: center; height: 42px; padding: 0 14px; border-right: 1px solid var(--app-border); background: var(--app-surface-soft); color: var(--app-text); font-size: 13px; font-weight: 600; white-space: nowrap; }
.brand-file-control:hover .brand-file-button { background: var(--brand-red-soft); color: var(--brand-red-text); }
main .brand-file-control input[type=file] { position: absolute; inset: 0; z-index: 2; width: 100% !important; height: 100%; min-height: 0; padding: 0 !important; border: 0; opacity: 0; cursor: pointer; }
.brand-file-name { min-width: 0; padding: 0 12px; overflow: hidden; color: var(--app-muted); font-size: 13px; line-height: 42px; text-overflow: ellipsis; white-space: nowrap; }
@media(max-width:420px) { .brand-file-button { padding: 0 10px; font-size: 12px; } .brand-file-name { padding: 0 9px; font-size: 12px; } }
html body .ops-tabs a[aria-current=page],html body .cz-quick-tabs a[aria-current=page] { background: var(--brand-red-soft); color: var(--brand-red-text); border-color: transparent; }
html body .ops-tabs a:not([aria-current=page]):hover { background: var(--app-surface-soft); color: var(--app-text); }
html body .ops-help-link,html body .workspace-text-link { color: var(--brand-link); }
.workspace-eyebrow { color: var(--brand-red-text); }
html.dark main :is(h1,.dashboard-metric strong,.report-summary-grid strong) { color: #fff; }
.presence-dot { background: var(--brand-green); }
.presence-dot.is-offline { background: #6b7280; }
.team-avatar { background: var(--brand-red-soft); color: var(--brand-red-text); }
.metric-symbol { background: #e9f6ff; color: #0075b8; }
.metric-open { background: #eaf9ef; color: #14763b; }
.metric-pending { background: #eef5fa; color: #0075b8; }
.metric-closed { background: #eef0f4; color: #4b5563; }
html.dark .metric-symbol { background: #1b334c; color: var(--brand-blue); }
html.dark .metric-open { background: #17352a; color: var(--brand-green); }
html.dark .metric-pending { background: #1b334c; color: var(--brand-blue); }
html.dark .metric-closed { background: #283345; color: #c4cbd6; }
.brand-app .ops-page { --ops-border: var(--app-border); --ops-surface: var(--app-surface); --ops-muted: var(--app-subtle); }
.cz-queue-item.is-selected { box-shadow: inset 3px 0 0 var(--brand-red); }
.cz-unread { background: var(--brand-red-action); color: #fff; }
.cz-message:target { outline-color: var(--brand-blue); }

/* Public entrance uses the existing login endpoint, fields and theme control. */
.brand-login-shell { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); min-height: 100vh; }
.brand-login-hero { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; background: #111827; color: #e5e7eb; overflow: hidden; }
.brand-login-hero::after { content: ''; position: absolute; width: 170px; height: 6px; left: 48px; bottom: 110px; background: var(--brand-red); border-radius: 6px; }
.brand-login-hero .brand-signature { width: 280px; }
.brand-login-hero .brand-signature .brand-logo-light { display: none; }
.brand-login-hero .brand-signature .brand-logo-dark { display: block; }
.brand-login-copy { max-width: 520px; margin: 48px 0 88px; }
.brand-login-kicker { display: inline-block; font-size: 12px; font-weight: 600; color: #c4cbd6; margin-bottom: 20px; }
.brand-login-copy h1 { font-size: clamp(34px,3.2vw,48px); font-weight: 650; letter-spacing: -1.6px; line-height: 1.17; color: #fff; }
.brand-login-copy p { max-width: 450px; margin-top: 24px; font-size: 15px; line-height: 1.65; color: #b6c0cf; }
.brand-login-hero small { color: #9ca8bb; font-size: 11px; }
.brand-login-entry { display: flex; align-items: center; justify-content: center; padding: 80px 40px 48px; }
.brand-login-card { width: 100%; max-width: 410px; }
.brand-login-mobile-logo { display: none; margin-bottom: 34px; }
.brand-login-card header { margin-bottom: 30px; }
.brand-login-card header>p:first-child { color: var(--brand-red-text); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.brand-login-card h2 { font-size: 29px; font-weight: 650; letter-spacing: -.8px; color: var(--app-text); margin-top: 8px; line-height: 1.25; }
.brand-login-card header>p:last-child { margin-top: 12px; color: var(--app-subtle); font-size: 13px; }
.brand-login-form { display: grid; gap: 20px; }
.brand-login-form label { min-width: 0; display: grid; gap: 9px; color: var(--app-muted); font-size: 13px; font-weight: 500; }
.brand-login-form input:not([type=hidden]) { min-width: 0; box-sizing: border-box; width: 100%; height: 48px; padding: 0 14px; background: var(--app-surface); color: var(--app-text); border: 1px solid var(--app-border); border-radius: 9px; font-size: 14px; outline: none; }
.brand-login-form input::placeholder { color: var(--app-subtle); }
.brand-login-form button { display: block; width: 100%; height: 48px; background: var(--brand-red-action); color: #fff; border: 1px solid var(--brand-red-action); border-radius: 9px; font-size: 14px; font-weight: 600; }
.brand-login-form button:hover { background: var(--brand-red-hover); }
.brand-login-theme { position: absolute; right: 24px; top: 24px; z-index: 10; }
.brand-login-signup { margin-top: 24px; text-align: center; font-size: 13px; }
.brand-login-signup a { color: var(--brand-link); }
.brand-login-legal { margin-top: 40px; color: var(--app-subtle); text-align: center; font-size: 11px; }
.brand-login-notice { padding: 14px; border: 1px solid var(--app-border); border-radius: 9px; margin-bottom: 20px; font-size: 13px; line-height: 1.6; background: var(--app-surface); color: var(--app-text); }
.brand-login-notice.is-error { background: var(--brand-red-soft); color: var(--brand-red-text); border-color: var(--brand-red-text); }
.brand-login-notice.is-success { border-color: #25d366; }

/* Public forms retain their business markup and always use the same brand. */
.brand-public .signup-shell { max-width: 980px; }
.brand-public .signup-shell>.brand-public-wordmark { margin-bottom: 6px; }
.brand-rating-panel>header { padding-bottom: 22px; margin-bottom: 24px; border-bottom: 1px solid var(--app-border); }
.brand-rating-panel .brand-signature { width: 220px; }
.brand-rating-panel h1 { margin: 0 0 18px; font-size: 23px; color: var(--app-text); font-weight: 650; }
.brand-rating-panel p { color: var(--app-muted); line-height: 1.6; }
.brand-rating-panel button { margin-top: 20px; height: 44px; padding: 0 24px; border: 0; border-radius: 8px; background: var(--brand-red-action); color: #fff; font-weight: 600; }
.brand-rating-panel button:hover { background: var(--brand-red-hover); }

@media(min-width:1024px) {
    html[data-menu=closed] .brand-sidebar-symbol { display: block; }
    html[data-menu=closed] .app-sidebar .sidebar-brand-copy { display: none; }
}
@media(max-width:1023px) {
    .brand-mobile-mark { display: inline-flex; }
    .brand-login-shell { grid-template-columns: minmax(0,1fr); }
    .brand-login-hero { display: none; }
    .brand-login-mobile-logo { display: block; }
    .brand-login-entry { padding: 96px 24px 44px; }
}
@media(max-width:540px) {
    .brand-login-entry { padding-inline: 22px; }
    .brand-login-card h2 { font-size: 26px; }
    .brand-login-mobile-logo .brand-signature { width: 228px; }
    .brand-navbar-main { gap: 8px; }
}
@media(prefers-reduced-motion:reduce) {
    .brand-app .app-sidebar,.brand-app .app-content { transition: none; }
}

.viz-axis,.viz-total,.viz-caption{font-family:Inter,ui-sans-serif,sans-serif}.cz-attachment{color:var(--brand-link)}
/* Override the older focus rule too when a browser still has app.css cached. */
body:is(.brand-app,.brand-public,.brand-login) main input:not([type=checkbox]):not([type=radio]):not([type=hidden]):focus,
body:is(.brand-app,.brand-public,.brand-login) main select:focus,
body:is(.brand-app,.brand-public,.brand-login) main textarea:focus{border-color:var(--brand-red)!important;box-shadow:0 0 0 3px rgba(237,28,36,.12)}
html body.brand-app .cz-attachment{color:var(--brand-link)}

.brand-login-form input[type=hidden]{display:none}.brand-login-card{min-width:0}.app-sidebar .sidebar-group-toggle .sidebar-label{white-space:normal;line-height:1.4;text-overflow:clip}
.brand-app input[type=hidden],.brand-public input[type=hidden]{display:none}

.brand-navbar-main>div{flex:1;min-width:0}.brand-navbar-main>div>div:first-child{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(max-width:540px){.brand-navbar-main>div>div:first-child{display:none}}

.brand-public .brand-signup-form{display:block}.brand-signup-row{display:flex;gap:16px;align-items:flex-start;margin-bottom:18px}.brand-signup-row>.cz-field{flex:1;min-width:0}.brand-signup-form>.brand-signup-company,.brand-signup-form>.brand-signup-policy{margin-bottom:18px}.brand-signup-form>.brand-signup-trial{display:block;margin-bottom:18px}.brand-signup-trial>label{margin-top:12px}.brand-signup-submit{display:flex;justify-content:flex-end}
@media(max-width:767px){.brand-signup-row{flex-direction:column}.brand-signup-row>.cz-field{flex-basis:auto;width:100%}}
.brand-public .brand-signup-row>.cz-field{display:block}.brand-signup-row>.cz-field>label{display:block;margin-bottom:8px}.brand-signup-row input,.brand-signup-row select{max-width:100%;box-sizing:border-box}
@media(max-width:540px){.brand-mobile-mark{display:none}}
.brand-public .brand-signup-quote{margin:0 0 18px;color:var(--app-text);border-color:var(--app-border)}
.brand-signup-submit>.cz-button{height:44px;min-height:44px}

/* Attendance reports reuse the shared surface, typography and responsive tables. */
.attendance-reports .workspace-disclosure, .attendance-reports [data-attendance-detail] { margin-top: 20px; }
.attendance-row-details { min-width: 140px; }
.attendance-row-details summary { cursor: pointer; color: var(--brand-link, #0075b8); }
.attendance-row-details dl { min-width: 220px; margin: 12px 0; }
.attendance-row-details dt { font-size: 12px; color: var(--app-muted, #6b7280); margin-top: 8px; }
.attendance-row-details dd { margin: 2px 0 0; overflow-wrap: anywhere; }

/* Authorized-number selection stays within the same responsive app surface. */
.help-page.waba-selection { display: block; width: 100%; max-width: 100%; }
.waba-selection > .help-card { margin-top: 20px; width: 100%; }
.waba-selection .help-card,.waba-selection form,.waba-selection fieldset { min-width: 0; }
.waba-selection select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }
.help-page .waba-queue-choice { display: flex; flex-direction: row; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; }
html body.brand-app .help-page .waba-queue-choice input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; max-width: 18px; padding: 0; flex: 0 0 18px; accent-color: var(--brand-red); }
.waba-selection .help-muted,.waba-selection p { overflow-wrap: anywhere; }
