/* ============================================================
   KLIMACRM — Design System v2
   Palette: Grafit + Arctic Blue + Clean White
   Signature: Sötét sidebar ↔ légies tartalom
   ============================================================ */

:root {
    --c-ink:        #111827;   /* főszöveg */
    --c-ink-2:      #374151;   /* másodlagos szöveg */
    --c-muted:      #6B7280;   /* halványított szöveg */
    --c-subtle:     #9CA3AF;   /* placeholder, meta */
    --c-line:       #E5E7EB;   /* border */
    --c-line-soft:  #F3F4F6;   /* háttér-border */
    --c-bg:         #F9FAFB;   /* oldal háttér */
    --c-surface:    #FFFFFF;   /* kártya, modal */

    --c-blue:       #2563EB;   /* primary */
    --c-blue-light: #EFF6FF;   /* primary bg */
    --c-blue-dark:  #1D4ED8;   /* primary hover */
    --c-teal:       #0D9488;   /* accent */
    --c-teal-light: #F0FDFA;
    --c-green:      #16A34A;
    --c-green-light:#F0FDF4;
    --c-amber:      #D97706;
    --c-amber-light:#FFFBEB;
    --c-red:        #DC2626;
    --c-red-light:  #FEF2F2;
    --c-purple:     #7C3AED;
    --c-purple-light:#F5F3FF;

    --sidebar-bg:   #0F172A;   /* sötét szilárdan */
    --sidebar-text: rgba(248,250,252,.82);
    --sidebar-muted:rgba(148,163,184,.72);
    --sidebar-line: rgba(30,41,59,.9);
    --sidebar-active:#1E3A5F;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.07), 0 4px 6px rgba(0,0,0,.04);
}

/* ── RESET & BASE ─────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-ink);
    font-size: 15px;
    line-height: 1.6;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg,
canvas,
iframe { max-width: 100%; }

/* ── SHELL ────────────────────────────────────────────── */

.app-shell,
.auth-shell { min-height: 100vh; }

.app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
}

.auth-shell { display: block; }

/* ── SIDEBAR ──────────────────────────────────────────── */

.app-sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.5rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 0 1rem;
    border-bottom: 1px solid rgba(30,41,59,.8);
    margin-bottom: .25rem;
}

.sidebar-logo-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 72px;
    padding: .7rem .85rem;
    overflow: visible;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,250,255,.98));
    box-shadow: 0 16px 34px rgba(0, 0, 0, .18);
    text-decoration: none;
}

.sidebar-logo-frame img {
    display: block;
    width: 100%;
    height: auto;
    transform: none;
    filter: drop-shadow(0 6px 12px rgba(15, 23, 42, .08));
}

.brand-mark {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--c-blue);
    color: #fff;
    font-size: 1rem;
    flex: 0 0 36px;
}

.sidebar-brand strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #F8FAFC;
    line-height: 1.2;
}

.sidebar-brand span {
    display: block;
    font-size: .75rem;
    color: var(--sidebar-muted);
    margin-top: .1rem;
}

.sidebar-nav {
    display: grid;
    gap: 2px;
    flex: 1 1 auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .6rem .75rem;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    transition: background .12s, color .12s;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.06);
    color: #F8FAFC;
}

.sidebar-link.is-active {
    background: var(--c-blue);
    color: #fff;
    font-weight: 600;
}

.sidebar-icon {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,.08);
    font-size: .75rem;
    flex: 0 0 22px;
    font-style: normal;
}

.sidebar-link.is-active .sidebar-icon {
    background: rgba(255,255,255,.2);
}

.sidebar-bottom-card {
    margin-top: auto;
    border-radius: var(--radius-lg);
    background: rgba(37,99,235,.18);
    border: 1px solid rgba(37,99,235,.28);
    padding: .9rem 1rem;
}

.sidebar-bottom-card span,
.sidebar-bottom-card small {
    display: block;
    color: var(--sidebar-muted);
    font-size: .78rem;
}

.sidebar-bottom-card strong {
    display: block;
    color: #93C5FD;
    font-size: .85rem;
    font-weight: 600;
    margin: .2rem 0 .15rem;
}

/* ── MOBILE SIDEBAR ───────────────────────────────────── */

.topbar-mobile-brand {
    display: none;
    align-items: center;
    gap: .75rem;
}

.topbar-mobile-title {
    font-weight: 700;
    color: var(--c-ink);
    font-size: .95rem;
}

.topbar-mobile-logo {
    display: block;
    width: min(220px, 54vw);
    height: auto;
    padding: .45rem .6rem;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    background: var(--c-surface);
    color: var(--c-ink);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.mobile-sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
}

.mobile-sidebar .offcanvas-header,
.mobile-sidebar .offcanvas-body { padding: 1.25rem 1rem; }

.mobile-sidebar .btn-close { filter: invert(1); }

.mobile-sidebar .sidebar-nav { margin-top: .5rem; }

.mobile-sidebar-link { margin-bottom: 2px; }

/* ── TOPBAR ───────────────────────────────────────────── */

.app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: .875rem 1.5rem;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-search {
    flex: 1 1 auto;
    max-width: 480px;
    position: relative;
    display: flex;
    align-items: center;
}

.topbar-search input {
    width: 100%;
    border: 1px solid var(--c-line);
    background: var(--c-bg);
    border-radius: var(--radius-lg);
    padding: .55rem 2.75rem .55rem 2.4rem;
    font-size: .875rem;
    outline: none;
    color: var(--c-ink);
    transition: border-color .14s, box-shadow .14s;
}

.topbar-search input:focus {
    border-color: var(--c-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    background: #fff;
}

.topbar-search-icon {
    position: absolute;
    left: .85rem;
    color: var(--c-muted);
    font-size: 1rem;
    pointer-events: none;
}

.topbar-shortcut {
    position: absolute;
    right: .75rem;
    background: var(--c-line-soft);
    color: var(--c-muted);
    font-size: .72rem;
    font-weight: 700;
    padding: .15rem .4rem;
    border-radius: 4px;
    border: 1px solid var(--c-line);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.topbar-pill {
    text-decoration: none;
    color: var(--c-ink-2);
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    padding: .45rem .85rem;
    font-size: .875rem;
    font-weight: 600;
    transition: background .12s, border-color .12s;
}

.topbar-pill:hover {
    background: var(--c-surface);
    border-color: var(--c-blue);
    color: var(--c-blue);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    background: var(--c-blue);
    color: #fff;
    font-weight: 700;
    font-size: .875rem;
    flex: 0 0 34px;
}

.topbar-user strong {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.2;
}

.topbar-user span {
    display: block;
    color: var(--c-muted);
    font-size: .75rem;
    text-transform: capitalize;
}

.topbar-logout {
    border-radius: var(--radius-md);
    padding: .45rem .85rem;
    font-size: .875rem;
}

.topbar-notify {
    font-size: .8rem;
    padding: .4rem .75rem;
}

/* ── CONTENT AREA ─────────────────────────────────────── */

.auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: var(--c-bg);
}

.login-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.app-content {
    flex: 1 1 auto;
    padding: 1.5rem;
    min-width: 0;
}

.app-content > * { min-width: 0; }

/* ── FOOTER ───────────────────────────────────────────── */

.app-footer {
    margin: 0 1.5rem 1.5rem;
    padding: .85rem 1.25rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-xl);
    background: var(--c-surface);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.mobile-sidebar.offcanvas {
    width: min(88vw, 340px);
    border-right: 1px solid rgba(255,255,255,.08);
}

.app-footer-copy strong,
.app-footer-copy span,
.app-footer-meta span { display: block; }

.app-footer-copy strong { font-size: .875rem; font-weight: 700; }
.app-footer-copy span, .app-footer-meta span { color: var(--c-muted); font-size: .8rem; }
.app-footer-meta { text-align: right; }

/* ── CARD ─────────────────────────────────────────────── */

.card {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-xl);
    background: var(--c-surface);
    box-shadow: var(--shadow-xs);
}

/* ── BUTTONS ──────────────────────────────────────────── */

.btn {
    border-radius: var(--radius-md);
    padding: .55rem 1rem;
    font-weight: 600;
    font-size: .875rem;
    transition: all .14s;
}

.btn-primary {
    background: var(--c-blue);
    border-color: var(--c-blue);
    color: #fff;
    box-shadow: 0 1px 2px rgba(37,99,235,.25);
}

.btn-primary:hover {
    background: var(--c-blue-dark);
    border-color: var(--c-blue-dark);
    color: #fff;
}

.btn-outline-primary {
    border-color: var(--c-line);
    color: var(--c-blue);
    background: var(--c-surface);
}

.btn-outline-primary:hover {
    background: var(--c-blue-light);
    border-color: var(--c-blue);
    color: var(--c-blue-dark);
}

.btn-outline-secondary {
    border-color: var(--c-line);
    color: var(--c-ink-2);
    background: var(--c-surface);
}

.btn-outline-secondary:hover {
    background: var(--c-line-soft);
}

.btn-light {
    background: var(--c-bg);
    border-color: var(--c-line);
    color: var(--c-ink-2);
}

.btn-light:hover { background: var(--c-surface); }

.btn-sm {
    padding: .35rem .7rem;
    font-size: .8rem;
    border-radius: var(--radius-sm);
}

/* ── FORMS ────────────────────────────────────────────── */

.form-control,
.form-select {
    border-radius: var(--radius-md);
    padding: .55rem .85rem;
    border-color: var(--c-line);
    font-size: .875rem;
    color: var(--c-ink);
    box-shadow: none;
    transition: border-color .14s, box-shadow .14s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--c-blue);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
    outline: none;
}

.form-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--c-ink-2);
    margin-bottom: .3rem;
}

/* ── TABLE ────────────────────────────────────────────── */

.table th {
    color: var(--c-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 700;
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.table td { vertical-align: middle; }

/* ── BADGES / STATUS ──────────────────────────────────── */

.badge-status {
    border-radius: 999px;
    padding: .28rem .7rem;
    display: inline-flex;
    align-items: center;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.sla-badge,
.sla-inline {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  width: max-content;
  max-width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .34rem .62rem;
  font-size: .75rem;
  font-weight: 750;
  line-height: 1.1;
  white-space: nowrap;
}

.sla-badge strong { font-variant-numeric: tabular-nums; }
.sla-inline { padding: .16rem .42rem; font-size: .72rem; }
.sla-badge.sla-pending, .sla-inline.sla-pending { color: #0050D6; background: #eff6ff; border-color: #bfdbfe; }
.sla-badge.sla-breached, .sla-inline.sla-breached,
.sla-badge.sla-missed, .sla-inline.sla-missed { color: #b42318; background: #fff1f0; border-color: #fecdca; }
.sla-badge.sla-met, .sla-inline.sla-met { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.sla-badge.sla-not_tracked, .sla-inline.sla-not_tracked { color: #667085; background: #f8fafc; border-color: #e2e8f0; }

.sla-detail-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border-color: #dbe7f5;
}

.sla-detail-card::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #0062FC;
}

.sla-detail-card.sla-met::before { background: #12b76a; }
.sla-detail-card.sla-breached::before,
.sla-detail-card.sla-missed::before { background: #f04438; }
.sla-detail-card.sla-not_tracked::before { background: #98a2b3; }

.sla-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sla-detail-label { color: var(--c-muted); font-size: .86rem; font-weight: 650; }
.sla-status-dot { width: .72rem; height: .72rem; border-radius: 50%; background: #0062FC; box-shadow: 0 0 0 5px #dbeafe; }
.sla-met .sla-status-dot { background: #12b76a; box-shadow: 0 0 0 5px #d1fadf; }
.sla-breached .sla-status-dot, .sla-missed .sla-status-dot { background: #f04438; box-shadow: 0 0 0 5px #fee4e2; }
.sla-not_tracked .sla-status-dot { background: #98a2b3; box-shadow: 0 0 0 5px #f2f4f7; }
.sla-countdown { color: var(--c-ink); font-size: 2rem; line-height: 1; font-weight: 850; font-variant-numeric: tabular-nums; margin-bottom: .55rem; }
.sla-detail-card small { display: block; color: var(--c-muted); line-height: 1.45; }
.stat-accent-danger { border-color: #fecdca; box-shadow: inset 0 3px 0 #f04438, var(--shadow-sm); }

.status-new              { background: var(--c-blue-light); color: var(--c-blue);   border-color: #BFDBFE; }
.status-callback_needed  { background: #EFF6FF; color: #1E40AF; border-color: #BFDBFE; }
.status-survey_scheduled { background: var(--c-amber-light); color: var(--c-amber); border-color: #FDE68A; }
.status-offer_sent       { background: var(--c-purple-light); color: var(--c-purple); border-color: #DDD6FE; }
.status-offer_accepted   { background: var(--c-green-light); color: var(--c-green); border-color: #BBF7D0; }
.status-work_scheduled   { background: var(--c-teal-light); color: var(--c-teal);   border-color: #99F6E4; }
.status-work_done,
.status-won              { background: var(--c-green-light); color: #15803D; border-color: #BBF7D0; }
.status-invoiced         { background: #EEF2FF; color: #4338CA; border-color: #C7D2FE; }
.status-called           { background: var(--c-amber-light); color: #92400E; border-color: #FDE68A; }
.status-lost             { background: var(--c-red-light); color: var(--c-red); border-color: #FECACA; }

/* ── PAGE STRUCTURE HELPERS ───────────────────────────── */

.page-toolbar { padding-top: .5rem; margin-bottom: 1.25rem; }
.back-link { color: var(--c-blue); font-weight: 600; text-decoration: none; font-size: .875rem; }
.back-link:hover { color: var(--c-blue-dark); }

.eyebrow {
    color: var(--c-blue);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.empty-state {
    color: var(--c-muted);
    border: 1px dashed var(--c-line);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--c-bg);
    text-align: center;
    font-size: .875rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .875rem;
    color: var(--c-ink);
}

/* ── DASHBOARD ────────────────────────────────────────── */

.dashboard-shell { display: grid; gap: 1.25rem; }

.dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, .85fr);
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--c-ink);
    color: #fff;
    border-radius: var(--radius-xl);
    border: 0;
}

.dashboard-hero h1 {
    font-size: 1.9rem;
    line-height: 1.1;
    margin: .25rem 0 .6rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.dashboard-hero p {
    color: rgba(255,255,255,.7);
    margin-bottom: .875rem;
    font-size: .9rem;
    max-width: 560px;
}

.dashboard-hero .eyebrow { color: #93C5FD; }

.dashboard-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

.dashboard-actions .btn { min-width: 130px; }

.dashboard-actions .btn-primary {
    background: var(--c-blue);
    border-color: var(--c-blue);
}

.dashboard-actions .btn-outline-primary {
    border-color: rgba(255,255,255,.25);
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.07);
}

.dashboard-actions .btn-outline-primary:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.5);
    color: #fff;
}

.dashboard-hero-side { display: grid; gap: .75rem; }

.dashboard-focus-card {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    background: rgba(255,255,255,.07);
    padding: .9rem 1rem;
}

.dashboard-focus-card span,
.dashboard-focus-card small {
    display: block;
    color: rgba(255,255,255,.6);
    font-size: .78rem;
}

.dashboard-focus-card strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1.1;
    margin: .2rem 0;
    color: #fff;
    font-weight: 700;
}

.dashboard-hero-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}

.mini-stat {
    border-radius: var(--radius-md);
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    padding: .8rem;
}

.mini-stat span {
    display: block;
    color: rgba(255,255,255,.6);
    font-size: .75rem;
}

.mini-stat strong {
    display: block;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: .15rem;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .875rem;
}

.dashboard-stat-card { padding: 1.1rem 1.2rem; }

.dashboard-stat-card span {
    display: block;
    color: var(--c-muted);
    font-size: .72rem;
    margin-bottom: .3rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
}

.dashboard-stat-card strong {
    display: block;
    color: var(--c-ink);
    font-size: 1.75rem;
    line-height: 1.05;
    font-weight: 800;
    margin-bottom: .2rem;
}

.dashboard-stat-card small { color: var(--c-muted); font-size: .82rem; }

.stat-accent-green { border-left: 3px solid var(--c-green); }
.stat-accent-amber { border-left: 3px solid var(--c-amber); }

.dashboard-board {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, .88fr);
    gap: .875rem;
}

.dashboard-main-column,
.dashboard-side-column { display: grid; gap: .875rem; }

.dashboard-panel { padding: 1.15rem; }

.dashboard-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: .875rem;
}

.dashboard-panel-head h2 {
    font-size: .95rem;
    margin: 0 0 .15rem;
    font-weight: 700;
    color: var(--c-ink);
}

.dashboard-panel-head p {
    margin: 0;
    color: var(--c-muted);
    font-size: .82rem;
}

.source-breakdown-panel {
    overflow: hidden;
}

.source-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.source-summary-card {
    min-width: 0;
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg, #ffffff, #eff6ff);
    border-radius: 18px;
    padding: .95rem 1rem;
}

.source-summary-card span,
.source-summary-card small {
    display: block;
    color: var(--c-muted);
    font-size: .78rem;
}

.source-summary-card span {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 800;
}

.source-summary-card strong {
    display: block;
    margin: .25rem 0 .1rem;
    color: var(--c-ink);
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 850;
}

.source-summary-manual {
    border-color: #fed7aa;
    background: linear-gradient(180deg, #ffffff, #fff7ed);
}

.source-summary-customer {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #ffffff, #f0fdf4);
}

.source-breakdown-list {
    display: grid;
    gap: .7rem;
}

.source-breakdown-row {
    display: grid;
    grid-template-columns: minmax(180px, .95fr) minmax(180px, 1.4fr) minmax(72px, auto);
    align-items: center;
    gap: .85rem;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    padding: .78rem .9rem;
}

.source-breakdown-meta {
    min-width: 0;
}

.source-breakdown-meta span {
    display: block;
    color: var(--c-ink);
    font-weight: 800;
}

.source-breakdown-meta small {
    display: block;
    color: var(--c-muted);
    font-size: .78rem;
    line-height: 1.35;
}

.source-breakdown-track {
    height: 11px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf5;
}

.source-breakdown-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0062FC;
}

.source-facebook .source-breakdown-track span { background: #06b6d4; }
.source-other .source-breakdown-track span { background: #8b5cf6; }
.source-manual .source-breakdown-track span { background: #f97316; }
.source-customer .source-breakdown-track span { background: #10b981; }
.source-manual-customer .source-breakdown-track span { background: #84cc16; }

.source-breakdown-number {
    text-align: right;
}

.source-breakdown-number strong {
    display: block;
    color: var(--c-ink);
    font-size: 1.3rem;
    line-height: 1;
}

.source-breakdown-number small {
    display: block;
    margin-top: .2rem;
    color: var(--c-muted);
    font-size: .75rem;
    white-space: nowrap;
}

.panel-link {
    color: var(--c-blue);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-lead-list,
.dashboard-task-list,
.dashboard-quote-list,
.dashboard-health-list,
.client-profit-list { display: grid; gap: .5rem; }

.dashboard-lead-item,
.dashboard-task-item,
.dashboard-quote-item,
.client-profit-item {
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    padding: .8rem .9rem;
    transition: border-color .12s, box-shadow .12s;
}

.dashboard-lead-item:hover,
.dashboard-quote-item:hover,
.client-profit-item:hover {
    border-color: #CBD5E1;
    box-shadow: var(--shadow-sm);
}

.dashboard-lead-top,
.task-title-row,
.quote-item-meta,
.health-row,
.client-profit-head,
.client-profit-meta {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    align-items: center;
}

.dashboard-lead-meta {
    margin-top: .35rem;
    display: flex;
    flex-wrap: wrap;
    gap: .3rem .75rem;
    color: var(--c-muted);
    font-size: .8rem;
}

.dashboard-task-item {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: .75rem;
    align-items: center;
}

.task-date {
    border-radius: var(--radius-md);
    background: var(--c-blue-light);
    padding: .65rem .7rem;
    text-align: center;
}

.task-date strong,
.task-date span { display: block; }
.task-date strong { font-size: .875rem; color: var(--c-ink); font-weight: 700; }
.task-date span, .task-meta { color: var(--c-muted); font-size: .8rem; }

.task-type {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .2rem .6rem;
    font-size: .7rem;
    font-weight: 700;
}

.task-type.type-installation { background: var(--c-green-light); color: #166534; }
.task-type.type-maintenance   { background: var(--c-teal-light);  color: var(--c-teal); }
.task-type.type-cleaning      { background: var(--c-purple-light); color: var(--c-purple); }
.task-type.type-repair        { background: #FFF7ED; color: #C2410C; }
.task-type.type-survey        { background: var(--c-amber-light);  color: var(--c-amber); }

.health-row {
    border-bottom: 1px solid var(--c-line-soft);
    padding-bottom: .6rem;
}

.health-row:last-child { border-bottom: 0; padding-bottom: 0; }

.health-row span,
.dashboard-quote-item span,
.quote-item-meta small,
.client-profit-meta small { color: var(--c-muted); font-size: .82rem; }

.health-row strong,
.dashboard-quote-item strong,
.dashboard-lead-item strong,
.task-body strong,
.client-profit-head strong { color: var(--c-ink); font-weight: 600; }

.client-profit-meta { margin-top: .3rem; }

/* ── REVENUE CHART ────────────────────────────────────── */

.revenue-chart {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .75rem;
    align-items: end;
    min-height: 260px;
    padding-top: .75rem;
}

.revenue-chart-col {
    display: grid;
    gap: .5rem;
    justify-items: center;
}

.revenue-chart-bars {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: .35rem;
}

.revenue-bar-stack { width: 42%; display: grid; justify-items: center; gap: .35rem; }

.revenue-bar {
    width: 100%;
    min-height: 6px;
    border-radius: 4px 4px 2px 2px;
}

.revenue-bar-value {
    color: var(--c-muted);
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}

.revenue-bar-actual   { background: var(--c-green); }
.revenue-bar-expected { background: var(--c-blue); opacity: .65; }

.revenue-chart-label { color: var(--c-muted); font-size: .78rem; font-weight: 600; }

.revenue-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: .875rem;
    color: var(--c-muted);
    font-size: .82rem;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    margin-right: .35rem;
}

.legend-dot.actual   { background: var(--c-green); }
.legend-dot.expected { background: var(--c-blue); opacity: .65; }

/* ── LEAD PAGE ────────────────────────────────────────── */

.lead-page { margin-bottom: 2rem; }
.lead-hero { padding: 0; overflow: hidden; min-height: 0; }
.detail-card, .side-card { padding: 1.35rem; }

.lead-banner {
    background: var(--c-ink);
    color: #fff;
    padding: 1.35rem 1.5rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.lead-banner .eyebrow { color: #93C5FD; }
.lead-banner h1 { margin: .3rem 0 .15rem; font-size: 1.45rem; font-weight: 800; }
.lead-banner div:last-child { color: rgba(255,255,255,.75); font-size: .875rem; }

.lead-name-panel {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin: 1.1rem 1.35rem;
    border-left: 3px solid var(--c-blue);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: var(--c-blue-light);
    padding: .85rem 1rem;
}

.lead-name-panel span:not(.badge) { display: block; color: var(--c-muted); font-size: .8rem; margin-bottom: .2rem; }
.lead-name-panel strong { display: block; color: var(--c-ink); font-size: 1.65rem; font-weight: 800; line-height: 1.1; }
.lead-meta { color: var(--c-muted); font-weight: 500; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .6rem;
    margin: 0 1.35rem 1rem;
}

.contact-tile {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    padding: .85rem;
}

.contact-tile span {
    display: block;
    color: var(--c-muted);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .3rem;
}

.contact-tile a, .contact-tile strong {
    color: var(--c-ink);
    font-size: .95rem;
    font-weight: 600;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.contact-tile a:hover { color: var(--c-blue); }

.quick-actions { display: flex; gap: .6rem; flex-wrap: wrap; padding: 0 1.35rem 1.35rem; }

.answer-list { display: grid; gap: .5rem; }

.answer-row {
    display: grid;
    grid-template-columns: minmax(160px, .5fr) 1fr;
    gap: .875rem;
    align-items: center;
    border: 1px solid var(--c-line-soft);
    border-radius: var(--radius-md);
    background: var(--c-bg);
    padding: .7rem .875rem;
}

.answer-label { color: var(--c-muted); font-size: .8rem; font-weight: 600; }
.answer-value { color: var(--c-ink); font-weight: 500; overflow-wrap: anywhere; font-size: .875rem; }
.sticky-side { position: sticky; top: 4.5rem; }
.notes-list { display: grid; gap: .75rem; }
.note-item { border-top: 1px solid var(--c-line); padding-top: .75rem; line-height: 1.6; font-size: .875rem; }
.note-meta { color: var(--c-muted); font-size: .78rem; margin-bottom: .2rem; }

/* ── APP INSTALL ──────────────────────────────────────── */

.app-install-page {
    min-height: calc(100vh - 140px);
    display: grid;
    place-items: center;
}

.app-install-card {
    max-width: 580px;
    padding: 2rem;
    text-align: center;
}

.app-install-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto .875rem;
}

.app-install-card h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .6rem; }
.app-install-card p  { color: var(--c-muted); font-size: .9rem; }

.install-help {
    margin-top: 1.35rem;
    text-align: left;
    border-top: 1px solid var(--c-line);
    padding-top: 1.1rem;
}

.install-help h2 { font-size: .9rem; font-weight: 700; margin: .875rem 0 .3rem; }

.notification-cron-url {
    margin: .6rem 0;
    padding: .75rem .875rem;
    border-radius: var(--radius-md);
    background: var(--c-blue-light);
    border: 1px solid #BFDBFE;
    color: var(--c-ink-2);
    font-size: .82rem;
    font-weight: 600;
    word-break: break-all;
}

/* ── SETTINGS ─────────────────────────────────────────── */

.settings-shell { display: grid; gap: .875rem; }

.settings-page-head { display: grid; gap: .2rem; padding: .1rem 0 .3rem; }

.settings-page-head h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 800;
    color: var(--c-ink);
    letter-spacing: -.02em;
}

.settings-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .85fr);
    gap: .875rem;
    align-items: start;
}

.settings-column { display: grid; gap: .875rem; }

.settings-card { padding: 1.2rem; border-radius: var(--radius-xl); }

.settings-card-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .875rem;
}

.settings-card-head h2 {
    margin: 0 0 .15rem;
    font-size: .95rem;
    font-weight: 700;
    color: var(--c-ink);
}

.settings-inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
}

.settings-notification-state { color: var(--c-muted); font-weight: 600; font-size: .875rem; }

.settings-notification-banner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .875rem;
    align-items: center;
    padding: .875rem 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-bg);
}

.settings-notification-copy { display: grid; gap: 0; }
.settings-notification-copy strong { color: var(--c-ink); font-size: .9rem; }

.settings-checkbox-list { display: grid; gap: .6rem; }

.settings-feature-card {
    display: grid;
    gap: .6rem;
    padding: .875rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-bg);
}

.settings-toggle-card {
    display: block;
    padding: .875rem 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color .14s, box-shadow .14s;
}

.settings-toggle-card:hover {
    border-color: #CBD5E1;
    box-shadow: var(--shadow-sm);
}

.settings-toggle-card-embedded { background: var(--c-bg); box-shadow: none; }

.settings-toggle-main {
    display: flex;
    justify-content: space-between;
    gap: .875rem;
    align-items: center;
}

.settings-toggle-copy { display: grid; gap: .2rem; }
.settings-toggle-copy strong { color: var(--c-ink); font-size: .9rem; }
.settings-toggle-copy small  { color: var(--c-muted); font-size: .78rem; line-height: 1.5; }

.settings-switch {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 28px;
    flex: 0 0 auto;
}

.settings-switch-sm { width: 40px; height: 24px; }

.settings-switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}

.settings-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: var(--c-line);
    transition: background .14s;
}

.settings-switch-slider::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: transform .14s;
}

.settings-switch-sm .settings-switch-slider::after { width: 18px; height: 18px; }

.settings-switch input:checked + .settings-switch-slider { background: var(--c-blue); }
.settings-switch input:checked + .settings-switch-slider::after { transform: translateX(20px); }
.settings-switch-sm input:checked + .settings-switch-slider::after { transform: translateX(16px); }
.settings-switch input:disabled + .settings-switch-slider { opacity: .5; }

.settings-subgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}

.settings-subgrid-summary { grid-template-columns: repeat(2, minmax(0, 120px)); }

.settings-inline-field {
    display: grid;
    gap: .4rem;
    padding: .75rem .875rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    background: var(--c-bg);
}

.settings-inline-field-toggle { align-content: center; }

.settings-inline-check { display: flex; align-items: center; gap: .5rem; }
.settings-inline-check strong { margin: 0; font-size: .875rem; }

.settings-checkbox-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    padding: .875rem 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    cursor: pointer;
    transition: border-color .14s;
}

.settings-checkbox-item input {
    margin-top: .15rem;
    width: 16px;
    height: 16px;
    accent-color: var(--c-blue);
    cursor: pointer;
}

.settings-checkbox-item:hover { border-color: #CBD5E1; }

.settings-checkbox-item strong { display: block; color: var(--c-ink); font-size: .9rem; }
.settings-checkbox-item small  { display: block; margin-top: .15rem; color: var(--c-muted); font-size: .78rem; line-height: 1.5; }

.settings-device-list { display: grid; gap: .6rem; }

.settings-device-item,
.settings-empty-state,
.settings-logo-preview {
    padding: .875rem 1rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-bg);
}

.settings-device-meta,
.settings-device-times {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    align-items: center;
}

.settings-device-meta strong { color: var(--c-ink); font-size: .875rem; }
.settings-device-meta span, .settings-device-times small { color: var(--c-muted); font-size: .8rem; }
.settings-device-times { margin-top: .35rem; flex-wrap: wrap; }

.settings-empty-state strong, .settings-logo-preview strong { display: block; margin-bottom: .2rem; color: var(--c-ink); font-size: .875rem; }
.settings-empty-state p,    .settings-logo-preview p   { margin: 0; color: var(--c-muted); font-size: .82rem; }

.settings-logo-preview {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: .875rem;
    align-items: center;
}

.settings-logo-preview img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--c-surface);
    padding: .4rem;
    border: 1px solid var(--c-line);
}

/* ── QUOTES ───────────────────────────────────────────── */

.quote-print { max-width: 900px; margin: 0 auto 2rem; }
.quote-list-grid { display: grid; gap: 1rem; }
.quote-list-card { display: grid; gap: 1rem; }
.quote-list-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}
.quote-list-head-copy {
    min-width: 0;
    flex: 1 1 320px;
}
.quote-list-head-side {
    display: grid;
    gap: .9rem;
    justify-items: end;
    flex: 0 1 auto;
}
.quote-list-head h2 {
    margin: .2rem 0 .35rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--c-ink);
}
.quote-list-head p {
    margin: 0;
    color: var(--c-muted);
}
.quote-list-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--c-blue);
    white-space: nowrap;
}
.quote-list-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}
.quote-list-meta-item {
    padding: .9rem 1rem;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 16px;
    background: rgba(248, 250, 252, .88);
    display: grid;
    gap: .2rem;
}
.quote-list-meta-item span {
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #94a3b8;
}
.quote-list-meta-item strong {
    font-size: .98rem;
    color: var(--c-ink);
}
.quote-list-meta-item small {
    color: var(--c-muted);
    font-size: .8rem;
}
.quote-list-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}
.quote-list-actions-inline {
    justify-content: flex-end;
}
.quote-list-actions form { margin: 0; }
.quote-list-actions .btn { min-height: 44px; }

.quote-brand { display: flex; align-items: center; gap: .875rem; }

.quote-logo, .client-logo-preview, .client-logo-thumb {
    object-fit: contain;
    background: var(--c-surface);
    border: 1px solid var(--c-line);
}

.quote-logo        { width: 72px; height: 72px; border-radius: var(--radius-md); padding: .5rem; }
.client-logo-preview { width: 100px; height: 100px; border-radius: var(--radius-lg); padding: .6rem; }
.client-logo-thumb   { width: 44px;  height: 44px; border-radius: var(--radius-md); padding: .3rem; }

/* ── CALENDAR ─────────────────────────────────────────── */

.calendar-toolbar { border-radius: var(--radius-lg); }
.calendar-title  { font-size: 1rem; font-weight: 700; color: var(--c-ink); }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--c-line);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.calendar-head {
    background: var(--c-line-soft);
    padding: .65rem .75rem;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-muted);
}

.calendar-day {
    min-height: 148px;
    background: var(--c-surface);
    padding: .7rem;
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.calendar-day.is-muted { background: var(--c-bg); }
.calendar-day.is-today { background: #EFF6FF; }
.calendar-day-number   { font-weight: 700; color: var(--c-ink); font-size: .875rem; }

.calendar-events { display: grid; gap: .35rem; }

.calendar-event {
    display: grid;
    gap: .05rem;
    text-decoration: none;
    color: var(--c-ink);
    border-radius: var(--radius-sm);
    padding: .4rem .55rem;
    border-left: 3px solid var(--c-blue);
    background: var(--c-blue-light);
    font-size: .75rem;
}

.calendar-event strong { font-size: .75rem; font-weight: 600; }
.calendar-event span, .calendar-event small { overflow-wrap: anywhere; color: var(--c-muted); font-size: .7rem; }

.calendar-event.type-installation { border-left-color: var(--c-green); background: var(--c-green-light); }
.calendar-event.type-maintenance  { border-left-color: var(--c-teal);  background: var(--c-teal-light); }
.calendar-event.type-cleaning     { border-left-color: var(--c-purple); background: var(--c-purple-light); }
.calendar-event.type-repair       { border-left-color: #C2410C; background: #FFF7ED; }
.calendar-event.type-survey       { border-left-color: var(--c-amber);  background: var(--c-amber-light); }

.calendar-pending-item {
    height: 100%;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    padding: .875rem;
}

.calendar-shell { display: grid; gap: 1rem; }

.calendar-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1.35rem 1.5rem;
    background: var(--c-ink);
    color: #fff;
    border-radius: var(--radius-xl);
    border: 0;
}

.calendar-hero h1 { margin: .25rem 0 .5rem; font-size: 1.75rem; line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.calendar-hero p  { color: rgba(255,255,255,.7); max-width: 680px; margin: 0; font-size: .875rem; }
.calendar-hero .eyebrow { color: #93C5FD; }

.calendar-hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; }

.calendar-hero-actions .btn-outline-primary {
    border-color: rgba(255,255,255,.22);
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.9);
}

.calendar-hero-actions .btn-outline-primary:hover {
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.45);
    color: #fff;
}

.calendar-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .875rem;
}

.calendar-stat-card { padding: 1rem 1.1rem; }

.calendar-stat-card span, .calendar-stat-card small { display: block; color: var(--c-muted); font-size: .78rem; }
.calendar-stat-card strong { display: block; margin: .25rem 0; font-size: 1.65rem; line-height: 1; font-weight: 800; color: var(--c-ink); }

.calendar-toolbar { padding: 1rem 1.15rem; }

.calendar-toolbar-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(240px, .88fr) minmax(200px, .75fr);
    gap: .875rem;
    align-items: center;
}

.calendar-toolbar-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.calendar-title-block { text-align: center; }
.calendar-subtitle { color: var(--c-muted); font-size: .85rem; }

.calendar-platform-pill {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-bg);
    padding: .75rem .875rem;
}

.calendar-platform-pill strong,
.calendar-platform-pill span { display: block; }
.calendar-platform-pill span { color: var(--c-muted); font-size: .8rem; }

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: .875rem;
    color: var(--c-muted);
    font-size: .82rem;
}

.calendar-dot-cleaning { background: var(--c-purple); }
.calendar-dot-repair   { background: #C2410C; }
.calendar-dot-survey   { background: var(--c-amber); }

.calendar-pending-panel { padding: 1.1rem; }

.calendar-section-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: .875rem;
}

.calendar-section-head h2 { margin: 0 0 .2rem; font-size: .95rem; font-weight: 700; }
.calendar-section-head p  { margin: 0; color: var(--c-muted); font-size: .82rem; }

.calendar-pending-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .875rem;
}

.calendar-pending-actions, .calendar-add-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.calendar-board {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, .85fr);
    gap: .875rem;
    align-items: start;
}

.calendar-main, .calendar-side { min-width: 0; }

.calendar-grid.card { padding: 0; margin-bottom: 0; background: transparent; }

.calendar-day-top {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    align-items: center;
}

.calendar-day-meta { color: var(--c-muted); font-size: .7rem; font-weight: 700; }

.calendar-empty-day {
    color: var(--c-muted);
    font-size: .78rem;
    border: 1px dashed var(--c-line);
    border-radius: var(--radius-sm);
    padding: .5rem;
}

.calendar-side-panel { padding: 1.1rem; }

.calendar-agenda-list { display: grid; gap: .75rem; }

.calendar-agenda-item {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-surface);
    padding: .875rem;
}

.calendar-agenda-top {
    display: flex;
    justify-content: space-between;
    gap: .5rem;
    align-items: center;
    margin-bottom: .6rem;
}

.calendar-agenda-date { color: var(--c-muted); font-size: .78rem; font-weight: 600; }
.calendar-agenda-item strong { display: block; color: var(--c-ink); margin-bottom: .3rem; font-size: .9rem; }

.calendar-agenda-meta {
    display: grid;
    gap: .2rem;
    color: var(--c-muted);
    font-size: .8rem;
    margin-bottom: .75rem;
}

.schedule-card {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-xl);
    background: var(--c-surface);
    padding: 1.1rem;
}

.schedule-card-head { margin-bottom: .875rem; }

.schedule-mode-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
    margin-bottom: .875rem;
}

.schedule-mode-option {
    display: flex;
    align-items: center;
    gap: .6rem;
    border: 1px solid var(--c-line);
    border-radius: var(--radius-md);
    background: var(--c-surface);
    padding: .8rem .875rem;
    font-weight: 600;
    font-size: .875rem;
    color: var(--c-ink);
    cursor: pointer;
    transition: border-color .12s;
}

.schedule-mode-option input { margin: 0; }
.schedule-mode-option:hover { border-color: var(--c-blue); }

.schedule-panel { margin-top: .15rem; }

.callback-scheduler {
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    background: var(--c-bg);
    padding: .875rem;
    margin-bottom: .875rem;
}

.callback-scheduler-title { font-weight: 700; color: var(--c-ink); margin-bottom: .75rem; font-size: .9rem; }

/* ── PRINT ────────────────────────────────────────────── */

@media print {
    body { background: #fff; }
    .app-sidebar, .app-topbar, .no-print, .btn, .back-link { display: none !important; }
    .app-content { padding: 0 !important; }
    .card, .quote-print {
        border: 0;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 0 !important;
        background: #fff;
    }
}

/* ── RESPONSIVE ───────────────────────────────────────── */

@media (max-width: 1200px) {
    .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-stat-grid, .calendar-pending-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-board, .calendar-toolbar-row { grid-template-columns: 1fr; }
    .calendar-title-block { text-align: left; }
    .settings-grid { grid-template-columns: 1fr; }
    .revenue-chart { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .app-shell { grid-template-columns: 1fr; }
    .desktop-sidebar { display: none; }

    .app-topbar {
        flex-direction: column;
        align-items: stretch;
        padding: .875rem 1.25rem;
        gap: .6rem;
    }

    .topbar-mobile-brand {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: .75rem;
    }
    .topbar-search {
        max-width: none;
        width: 100%;
        order: 3;
    }
    .topbar-actions {
        justify-content: space-between;
        flex-wrap: wrap;
        width: 100%;
        gap: .65rem;
    }
    .topbar-user { min-width: 0; }
    .topbar-user strong,
    .topbar-user span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar-notify,
    .topbar-logout,
    .topbar-pill {
        min-height: 40px;
    }

    .calendar-grid { grid-template-columns: 1fr; background: transparent; border: 0; gap: .6rem; }
    .calendar-head { display: none; }
    .calendar-day  { border: 1px solid var(--c-line); border-radius: var(--radius-lg); min-height: 0; }

    .calendar-hero, .calendar-section-head, .calendar-agenda-top { flex-direction: column; align-items: flex-start; }
    .calendar-stat-grid, .calendar-pending-grid { grid-template-columns: 1fr; }

    .dashboard-hero, .dashboard-board, .dashboard-stat-grid { grid-template-columns: 1fr; }
    .dashboard-actions, .dashboard-hero-grid, .contact-grid, .answer-row { grid-template-columns: 1fr; }
    .dashboard-actions { display: grid; }

    .lead-name-panel, .dashboard-panel-head, .dashboard-lead-top,
    .task-title-row, .quote-item-meta, .health-row,
    .client-profit-head, .client-profit-meta { flex-direction: column; align-items: flex-start; }

    .lead-name-panel strong { font-size: 1.35rem; }
    .quick-actions { flex-direction: column; }
    .quick-actions .btn { width: 100%; }

    .card.p-4, .detail-card, .side-card { padding: 1rem !important; }

    .app-footer {
        margin-left: 1.25rem;
        margin-right: 1.25rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .app-footer-meta { text-align: left; }
    .quote-brand,
    .quote-print .d-flex.justify-content-between.align-items-start,
    .quote-print .row.g-4,
    .lead-name-panel,
    .contact-card,
    .detail-card-head,
    .page-head {
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .app-content, .app-topbar { padding-left: 1rem; padding-right: 1rem; }

    .app-content { padding-top: 1rem; padding-bottom: 1rem; }

    .app-footer { margin: 0 1rem 1rem; padding: .85rem 1rem; border-radius: var(--radius-lg); }

    .dashboard-hero { padding: 1rem; }
    .dashboard-hero h1 { font-size: 1.5rem; }

    .calendar-hero { padding: 1rem; }
    .calendar-hero h1 { font-size: 1.4rem; }

    .calendar-toolbar, .calendar-pending-panel, .calendar-side-panel { padding: .875rem; }
    .calendar-add-actions .btn, .calendar-pending-actions .btn, .calendar-hero-actions .btn { width: 100%; }
    .schedule-mode-group { grid-template-columns: 1fr; }

    .dashboard-panel, .dashboard-stat-card, .dashboard-lead-item,
    .dashboard-task-item, .dashboard-quote-item, .client-profit-item { padding: .875rem; }

    .dashboard-task-item { grid-template-columns: 1fr; }

    .topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        width: 100%;
    }
    .topbar-user {
        padding-left: 0;
        width: 100%;
        grid-column: 1 / -1;
        min-width: 0;
    }
    .topbar-notify,
    .topbar-logout,
    .topbar-pill,
    [data-install-app] {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .topbar-search input { padding: .55rem 1rem .55rem 2.25rem; }
    .topbar-shortcut { display: none; }
    .mobile-menu-btn { width: 38px; height: 38px; }
    .topbar-mobile-title {
        font-size: .9rem;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .sidebar-brand strong { font-size: .95rem; }

    .lead-banner, .lead-name-panel, .contact-grid, .quick-actions { margin-left: 0; margin-right: 0; }
    .lead-banner { padding: 1rem; }
    .lead-banner h1 { font-size: 1.2rem; }
    .lead-name-panel { margin: .875rem .875rem .7rem; padding: .75rem; }
    .contact-grid, .quick-actions { padding-left: .875rem; padding-right: .875rem; }

    .answer-row { gap: .3rem; }
    .answer-label { font-size: .75rem; }
    .table-responsive {
        margin-left: -.25rem;
        margin-right: -.25rem;
        padding-bottom: .25rem;
        -webkit-overflow-scrolling: touch;
    }
    .table {
        font-size: .88rem;
    }
    .card,
    .dashboard-panel,
    .settings-card,
    .detail-card,
    .side-card,
    .schedule-card,
    .calendar-side-panel,
    .calendar-pending-panel {
        border-radius: 16px;
    }
    .btn,
    .form-control,
    .form-select {
        min-height: 44px;
    }
    .quote-print {
        padding: 1rem !important;
    }
    .quote-print .h2,
    .quote-print h1 {
        font-size: 1.2rem;
    }
    .quote-print .display-6 {
        font-size: 1.8rem;
    }
    .revenue-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .revenue-bar { min-height: 40px; }

    .settings-page-head, .settings-card { padding: 1rem; border-radius: var(--radius-lg); }
    .settings-device-meta, .settings-device-times,
    .settings-inline-actions, .settings-logo-preview,
    .settings-notification-banner { grid-template-columns: 1fr; display: grid; }
    .settings-toggle-main { align-items: start; }
    .settings-subgrid, .settings-subgrid-summary { grid-template-columns: 1fr; }
    .settings-logo-preview { justify-items: start; }
}

@media (max-width: 420px) {
    .app-topbar {
        padding-left: .875rem;
        padding-right: .875rem;
    }
    .app-content {
        padding-left: .875rem;
        padding-right: .875rem;
    }
    .topbar-actions {
        grid-template-columns: 1fr;
    }
    .topbar-user {
        grid-column: auto;
    }
    .app-footer {
        margin-left: .875rem;
        margin-right: .875rem;
    }
    .dashboard-hero h1,
    .calendar-hero h1 {
        font-size: 1.25rem;
    }
}

/* ============================================================
   2026-06-19 DESIGN REFRESH
   Clean app shell, stronger mobile UX, premium CRM polish
   ============================================================ */

body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 26%),
        radial-gradient(circle at top right, rgba(13, 148, 136, 0.06), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 45%, #eef4fb 100%);
    color: #0f172a;
}

.app-shell {
    position: relative;
    grid-template-columns: 272px minmax(0, 1fr);
}

.app-sidebar {
    padding: 1.25rem 1rem 1rem;
    background:
        linear-gradient(180deg, rgba(21, 30, 54, 0.98) 0%, rgba(11, 20, 40, 0.98) 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

.sidebar-brand {
    padding: 0.15rem 0.15rem 1rem;
    margin-bottom: 0.5rem;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2970ff 0%, #155eef 100%);
    box-shadow: 0 12px 28px rgba(21, 94, 239, 0.35);
    font-size: 1rem;
}

.sidebar-link {
    min-height: 46px;
    padding: 0.72rem 0.8rem;
    border-radius: 14px;
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, #2970ff 0%, #155eef 100%);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.sidebar-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    font-size: 0.78rem;
}

.sidebar-bottom-card {
    border-radius: 18px;
    padding: 1rem 1rem 1.05rem;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.2), rgba(37, 99, 235, 0.08));
    border: 1px solid rgba(96, 165, 250, 0.2);
}

.app-topbar {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.topbar-search {
    max-width: 620px;
}

.topbar-search input {
    height: 50px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.96);
    border-color: rgba(203, 213, 225, 0.9);
    font-size: 0.92rem;
}

.topbar-shortcut {
    min-width: 28px;
    text-align: center;
    border-radius: 10px;
    background: #e9eef7;
}

.topbar-pill,
.topbar-notify,
.topbar-logout,
[data-install-app] {
    min-height: 44px;
    border-radius: 14px;
    padding-inline: 0.95rem;
}

.topbar-user {
    padding: 0.3rem 0.2rem;
}

.topbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2970ff 0%, #155eef 100%);
    box-shadow: 0 10px 24px rgba(21, 94, 239, 0.24);
}

.app-content {
    padding: 1.5rem;
}

.app-content > * {
    max-width: 1480px;
}

.card {
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.app-footer {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px);
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 1.75rem;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.22), transparent 22%),
        linear-gradient(135deg, #0f172a 0%, #132744 55%, #155eef 130%);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.22);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    inset: auto -80px -80px auto;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 65%);
    pointer-events: none;
}

.dashboard-stat-card,
.dashboard-panel,
.detail-card,
.side-card,
.settings-card,
.calendar-toolbar,
.calendar-pending-panel,
.calendar-side-panel,
.app-install-card {
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.05);
}

.dashboard-stat-card {
    padding: 1.25rem 1.25rem 1.1rem;
}

.dashboard-stat-card strong {
    font-size: clamp(1.65rem, 2vw, 2rem);
}

.dashboard-panel-head h2,
.section-title,
.settings-card-head h2,
.calendar-section-head h2 {
    letter-spacing: -0.01em;
}

.table {
    margin-bottom: 0;
}

.table th {
    color: #94a3b8;
    font-size: 0.72rem;
}

.table td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
}

.table tbody tr {
    transition: background-color 0.12s ease;
}

.table tbody tr:hover {
    background: rgba(248, 250, 252, 0.9);
}

.lead-banner,
.calendar-hero {
    position: relative;
    overflow: hidden;
}

.lead-banner {
    background:
        radial-gradient(circle at top right, rgba(147, 197, 253, 0.18), transparent 26%),
        linear-gradient(135deg, #143256 0%, #155eef 120%);
}

.lead-name-panel {
    border-left-width: 4px;
    box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.9);
}

.contact-tile,
.answer-row,
.settings-toggle-card,
.settings-feature-card,
.settings-inline-field,
.calendar-pending-item,
.calendar-event,
.dashboard-lead-item,
.dashboard-task-item,
.dashboard-quote-item,
.client-profit-item {
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.contact-tile:hover,
.answer-row:hover,
.settings-toggle-card:hover,
.calendar-pending-item:hover,
.dashboard-lead-item:hover,
.dashboard-quote-item:hover,
.client-profit-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.calendar-hero {
    padding: 1.4rem 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.16), transparent 25%),
        linear-gradient(135deg, #ffffff 0%, #f6f9ff 55%, #edf4ff 100%);
}

.calendar-toolbar,
.calendar-grid,
.calendar-side-panel,
.calendar-pending-panel {
    overflow: hidden;
}

.calendar-grid {
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.05);
}

.calendar-day {
    min-height: 165px;
}

.calendar-event {
    border-radius: 10px;
}

.auth-main {
    min-height: 100vh;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
}

.is-guest .auth-main {
    align-items: flex-start;
    padding: 0;
}

.login-wrap {
    width: 100%;
    max-width: 1220px;
}

.auth-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
    gap: 1.25rem;
    align-items: stretch;
}

.auth-copy {
    padding: 2.2rem;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(147, 197, 253, 0.14), transparent 25%),
        linear-gradient(135deg, #0f172a 0%, #132744 52%, #155eef 135%);
    color: #fff;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.2);
}

.auth-copy h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.02;
    margin: 0.4rem 0 0.95rem;
    font-weight: 800;
    max-width: 10ch;
}

.auth-copy p {
    max-width: 560px;
    color: rgba(255,255,255,0.76);
    font-size: 1rem;
    margin-bottom: 1.25rem;
}

.auth-copy-points {
    display: grid;
    gap: 0.7rem;
    margin-top: 1.5rem;
}

.auth-copy-points span {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255,255,255,0.9);
    font-weight: 600;
}

.auth-copy-points span::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #93c5fd;
    box-shadow: 0 0 0 6px rgba(147, 197, 253, 0.14);
}

.auth-card {
    padding: 1.8rem;
    border-radius: 28px;
    align-self: center;
}

.auth-card-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.7rem;
    font-weight: 800;
}

.auth-card-head p {
    margin: 0 0 1.25rem;
    color: var(--c-muted);
}

.auth-form .form-control {
    height: 50px;
}

/* Public landing/login page */
.landing-auth {
    display: grid;
    gap: 1.35rem;
    width: 100%;
    max-width: none;
    padding: 1.25rem clamp(1rem, 3.5vw, 3rem) 1.5rem;
}

.login-wrap.landing-auth {
    max-width: none;
}

.landing-auth > .public-site-header,
.landing-auth > .landing-auth-panel,
.landing-auth > section,
.landing-auth > .public-site-footer {
    width: min(100%, 1560px);
    margin-left: auto;
    margin-right: auto;
}

.public-site-header {
    position: sticky;
    top: 1rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: .75rem .9rem;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .18), transparent 32%),
        linear-gradient(180deg, rgba(21, 30, 54, .98) 0%, rgba(11, 20, 40, .98) 100%);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
    backdrop-filter: blur(16px);
    animation: publicHeaderDrop .42s ease both;
}

.public-logo {
    position: relative;
    display: inline-flex;
    align-items: center;
    color: var(--c-ink);
    text-decoration: none;
    min-width: 0;
}

.public-logo-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(250px, 22vw, 360px);
    padding: .82rem 1.15rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,251,255,.99));
    box-shadow: 0 16px 34px rgba(0, 0, 0, .18);
}

.public-logo-frame::after {
    content: "";
    position: absolute;
    inset: -60% auto -60% -45%;
    width: 42%;
    transform: rotate(18deg);
    background: linear-gradient(90deg, transparent, rgba(14, 165, 233, .16), transparent);
    animation: logoShine 4.8s ease-in-out infinite;
}

.public-logo-frame img {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(15, 23, 42, .08));
    transform: translateZ(0);
    transition: transform .24s ease, filter .24s ease;
}

.public-logo:hover .public-logo-frame img {
    transform: scale(1.018);
    filter: drop-shadow(0 10px 22px rgba(14, 165, 233, .16));
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
    flex-wrap: wrap;
}

.public-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: .55rem .8rem;
    border-radius: 14px;
    color: rgba(226, 232, 240, .88);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 800;
}

.public-nav a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.public-nav-login,
.public-nav-contact {
    background: #155eef;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(21, 94, 239, .2);
}

.public-nav-contact:hover {
    background: #0f4ed8 !important;
    color: #fff !important;
}

.landing-auth-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(360px, 520px);
    gap: 1.15rem;
    align-items: stretch;
}

.landing-auth-panel,
.landing-feature-section,
.landing-flow-section,
.landing-showcase-section,
.landing-audience-section,
.landing-application-section,
.landing-login-section,
.landing-final-cta {
    scroll-margin-top: 6.5rem;
}

.landing-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    padding: 2rem;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, .18), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #132744 54%, #155eef 135%);
    box-shadow: 0 28px 70px rgba(15, 23, 42, .16);
}

.landing-brand-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 2rem;
}

.landing-brand-row strong,
.landing-brand-row span {
    display: block;
}

.landing-brand-row strong {
    font-size: 1.05rem;
    font-weight: 850;
}

.landing-brand-row span {
    color: rgba(226, 232, 240, .78);
    font-size: .82rem;
}

.landing-hero-copy {
    max-width: 760px;
}

.landing-hero-copy .eyebrow,
.landing-section-head .eyebrow,
.landing-login-card .eyebrow {
    color: #93c5fd;
}

.landing-hero-copy h1 {
    margin: .35rem 0 .9rem;
    max-width: 860px;
    font-size: clamp(2.15rem, 5vw, 4.15rem);
    line-height: 1.02;
    font-weight: 900;
}

.landing-hero-copy p {
    max-width: 680px;
    color: rgba(226, 232, 240, .82);
    font-size: 1.04rem;
    line-height: 1.65;
}

.landing-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin: 1.45rem 0 1.75rem;
}

.landing-action-row .btn {
    border-radius: 16px;
    font-weight: 800;
}

.landing-action-row .btn-outline-light {
    border-color: rgba(255,255,255,.24);
    color: #fff;
    background: rgba(255,255,255,.07);
}

.landing-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .7rem;
}

.landing-metric-grid div {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    padding: .9rem;
    background: rgba(255,255,255,.07);
}

.landing-metric-grid span,
.landing-metric-grid strong {
    display: block;
}

.landing-metric-grid span {
    color: rgba(226, 232, 240, .72);
    font-size: .74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.landing-metric-grid strong {
    margin-top: .18rem;
    color: #fff;
    font-size: .95rem;
}

.landing-login-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 30px;
}

.landing-access-card {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    border-radius: 30px;
    padding: 1.6rem;
}

.landing-access-card .btn {
    border-radius: 16px;
    font-weight: 900;
}

.landing-access-card .auth-card-head h2 {
    margin: .3rem 0 .55rem;
    color: var(--c-ink);
    font-size: clamp(1.55rem, 2.4vw, 2.15rem);
    line-height: 1.08;
    font-weight: 900;
}

.landing-access-card .auth-card-head p {
    margin: 0;
    color: var(--c-muted);
    line-height: 1.6;
}

.landing-access-steps {
    display: grid;
    gap: .75rem;
}

.landing-access-steps div {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: .15rem .75rem;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: .9rem;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.landing-access-steps span {
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #155eef;
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(21, 94, 239, .2);
}

.landing-access-steps strong {
    color: var(--c-ink);
    font-weight: 900;
}

.landing-access-steps small {
    color: var(--c-muted);
    line-height: 1.35;
}

.landing-login-note {
    display: grid;
    gap: .2rem;
    margin-top: 1rem;
    padding: .9rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #eff6ff;
}

.landing-login-note strong {
    color: var(--c-ink);
    font-size: .9rem;
}

.landing-login-note span {
    color: var(--c-muted);
    font-size: .82rem;
    line-height: 1.45;
}

.landing-feature-section,
.landing-flow-section {
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 28px;
    padding: 1.45rem;
    background: rgba(255,255,255,.86);
    box-shadow: 0 22px 56px rgba(15, 23, 42, .08);
}

.landing-section-head {
    max-width: 760px;
    margin-bottom: 1.05rem;
}

.landing-section-head h2 {
    margin: .25rem 0 .45rem;
    color: var(--c-ink);
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.08;
    font-weight: 900;
}

.landing-section-head p {
    margin: 0;
    color: var(--c-muted);
    line-height: 1.6;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

.landing-feature-card {
    min-width: 0;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.landing-feature-card i,
.landing-feature-card svg {
    width: 24px;
    height: 24px;
    color: #155eef;
}

.landing-feature-card h3 {
    margin: .7rem 0 .4rem;
    color: var(--c-ink);
    font-size: 1rem;
    font-weight: 850;
}

.landing-feature-card p {
    margin: 0;
    color: var(--c-muted);
    font-size: .88rem;
    line-height: 1.55;
}

.landing-flow-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
}

.landing-flow-grid div {
    display: grid;
    gap: .25rem;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    padding: 1rem;
    background: linear-gradient(180deg, #fff, #eff6ff);
}

.landing-flow-grid span {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 12px;
    background: #155eef;
    color: #fff;
    font-weight: 850;
}

.landing-flow-grid strong {
    color: var(--c-ink);
    font-size: .95rem;
}

.landing-flow-grid small {
    color: var(--c-muted);
    line-height: 1.4;
}

.landing-showcase-section,
.landing-audience-section,
.landing-login-section {
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 28px;
    padding: 1.45rem;
    background: rgba(255,255,255,.86);
    box-shadow: 0 22px 56px rgba(15, 23, 42, .08);
}

.landing-login-section .landing-login-card {
    padding: 1rem;
    border-radius: 22px;
}

.landing-inline-login {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: .85rem;
    align-items: end;
}

.landing-inline-login .btn {
    min-width: 180px;
}

.landing-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 1rem;
    align-items: stretch;
}

.landing-preview-card {
    border-radius: 24px;
    padding: 1.1rem;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(96,165,250,.2), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #132744 58%, #155eef 140%);
}

.landing-preview-top {
    display: grid;
    gap: .15rem;
    margin-bottom: .9rem;
}

.landing-preview-top span {
    color: #93c5fd;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.landing-preview-top strong {
    font-size: 1.45rem;
    line-height: 1.1;
    font-weight: 900;
}

.landing-preview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
    margin-bottom: .8rem;
}

.landing-preview-stats div,
.landing-preview-list div {
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    border-radius: 18px;
    padding: .75rem;
}

.landing-preview-stats small,
.landing-preview-stats strong {
    display: block;
}

.landing-preview-stats small {
    color: rgba(226,232,240,.72);
    font-weight: 750;
}

.landing-preview-stats strong {
    margin-top: .12rem;
    font-size: 1.65rem;
    line-height: 1;
}

.landing-preview-list {
    display: grid;
    gap: .55rem;
}

.landing-preview-list div {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    column-gap: .65rem;
    align-items: center;
}

.landing-preview-list div > span {
    width: 10px;
    height: 10px;
    border-radius: 99px;
    background: #60a5fa;
    box-shadow: 0 0 0 5px rgba(96,165,250,.14);
}

.landing-preview-list strong,
.landing-preview-list small {
    grid-column: 2;
    display: block;
}

.landing-preview-list strong {
    color: #fff;
    font-size: .92rem;
}

.landing-preview-list small {
    color: rgba(226,232,240,.72);
}

.landing-benefit-list {
    display: grid;
    gap: .75rem;
}

.landing-benefit-list div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: .9rem;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.landing-benefit-list svg {
    width: 22px;
    height: 22px;
    color: #10b981;
}

.landing-benefit-list span {
    color: var(--c-ink-2);
    font-weight: 700;
    line-height: 1.45;
}

.landing-audience-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .85rem;
}

.landing-audience-grid article {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 1rem;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.landing-audience-grid strong {
    display: block;
    color: var(--c-ink);
    font-size: 1rem;
    font-weight: 900;
    margin-bottom: .35rem;
}

.landing-audience-grid p {
    margin: 0;
    color: var(--c-muted);
    line-height: 1.55;
}

.landing-application-section {
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 28px;
    padding: 1.45rem;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .08), transparent 34%),
        rgba(255,255,255,.9);
    box-shadow: 0 22px 56px rgba(15, 23, 42, .08);
}

.landing-application-grid {
    display: grid;
    grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: start;
}

.landing-application-copy {
    display: grid;
    gap: .75rem;
    position: sticky;
    top: 1rem;
}

.landing-application-copy div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: .9rem;
    background: linear-gradient(180deg, #fff, #eff6ff);
}

.landing-application-copy svg {
    width: 22px;
    height: 22px;
    color: #10b981;
}

.landing-application-copy span {
    color: var(--c-ink-2);
    font-weight: 750;
    line-height: 1.45;
}

.landing-application-form {
    display: grid;
    gap: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 1.15rem;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .07);
}

.landing-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.landing-form-wide {
    grid-column: 1 / -1;
}

.landing-application-form .form-control,
.landing-application-form .form-select {
    min-height: 50px;
    border-radius: 16px;
}

.landing-application-form textarea.form-control {
    min-height: 118px;
    resize: vertical;
}

.landing-application-form .btn {
    border-radius: 16px;
    font-weight: 900;
}

.landing-form-note {
    margin: -.15rem 0 0;
    color: var(--c-muted);
    font-size: .88rem;
    line-height: 1.5;
    text-align: center;
}

.landing-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.landing-final-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 28px;
    padding: 1.45rem;
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #132744 58%, #155eef 130%);
    box-shadow: 0 22px 56px rgba(15, 23, 42, .12);
}

.landing-final-cta .eyebrow {
    color: #93c5fd;
}

.landing-final-cta h2 {
    margin: .25rem 0 0;
    max-width: 780px;
    font-size: clamp(1.35rem, 3vw, 2.2rem);
    line-height: 1.1;
    font-weight: 900;
}

.public-site-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.05rem .25rem .35rem;
    color: var(--c-muted);
}

.public-site-footer div {
    display: grid;
    gap: .15rem;
}

.public-site-footer div:last-child {
    text-align: right;
}

.public-site-footer strong {
    color: var(--c-ink);
    font-weight: 900;
}

.public-site-footer span {
    font-size: .86rem;
}

@keyframes publicHeaderDrop {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes logoShine {
    0%, 58% {
        left: -48%;
        opacity: 0;
    }
    66% {
        opacity: .9;
    }
    82%, 100% {
        left: 112%;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .public-site-header,
    .public-logo-frame::after {
        animation: none;
    }

    .public-logo-frame img {
        transition: none;
    }
}

@media (max-width: 992px) {
    .landing-auth-panel,
    .landing-feature-grid,
    .landing-flow-grid,
    .landing-showcase-grid,
    .landing-audience-grid,
    .landing-application-grid,
    .landing-inline-login {
        grid-template-columns: 1fr;
    }

    .landing-hero-card,
    .landing-access-card,
    .landing-login-card,
    .landing-feature-section,
    .landing-flow-section,
    .landing-showcase-section,
    .landing-audience-section,
    .landing-application-section,
    .landing-login-section,
    .landing-final-cta {
        border-radius: 24px;
    }

    .landing-application-copy {
        position: static;
    }

    .landing-inline-login .btn {
        width: 100%;
        min-width: 0;
    }

    .landing-final-cta,
    .public-site-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-site-footer div:last-child {
        text-align: left;
    }
}

@media (max-width: 576px) {
    .landing-auth {
        gap: .9rem;
        padding: .85rem;
    }

    .landing-hero-card,
    .landing-feature-section,
    .landing-flow-section,
    .landing-showcase-section,
    .landing-audience-section,
    .landing-application-section,
    .landing-login-section,
    .landing-final-cta {
        padding: 1rem;
    }

    .landing-access-card,
    .landing-login-card {
        padding: 1rem;
    }

    .landing-form-grid {
        grid-template-columns: 1fr;
    }

    .landing-action-row,
    .landing-action-row .btn {
        width: 100%;
    }

    .landing-metric-grid {
        grid-template-columns: 1fr;
    }

    .public-site-header {
        top: .65rem;
        align-items: stretch;
        flex-direction: column;
        border-radius: 20px;
    }

    .public-logo {
        justify-content: center;
    }

    .public-logo-frame {
        width: 100%;
        max-width: 340px;
        padding: .75rem .95rem;
    }

    .public-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .public-nav a {
        width: 100%;
    }

    .public-nav-contact {
        grid-column: 1 / -1;
    }

    .landing-preview-stats {
        grid-template-columns: 1fr;
    }

    .landing-final-cta .btn {
        width: 100%;
    }

    .landing-hero-copy h1 {
        font-size: 2rem;
    }
}

@media (max-width: 1200px) {
    .app-shell {
        grid-template-columns: 248px minmax(0, 1fr);
    }
}

@media (max-width: 992px) {
    .app-content > * {
        max-width: none;
    }

    .auth-panel {
        grid-template-columns: 1fr;
    }

    .auth-copy {
        padding: 1.6rem;
        min-height: 0;
    }

    .auth-copy h1 {
        max-width: none;
        font-size: 2rem;
    }

    .app-topbar {
        padding: 0.9rem 1.15rem;
    }

    .topbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .topbar-user {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .table-stack-mobile thead {
        display: none;
    }

    .table-stack-mobile,
    .table-stack-mobile tbody,
    .table-stack-mobile tr,
    .table-stack-mobile td {
        display: block;
        width: 100%;
    }

    .table-stack-mobile tbody {
        display: grid;
        gap: 0.9rem;
    }

    .table-stack-mobile tr {
        padding: 0.95rem 1rem;
        border: 1px solid rgba(226, 232, 240, 0.95);
        border-radius: 18px;
        background: rgba(255,255,255,0.92);
        box-shadow: 0 14px 28px rgba(15, 23, 42, 0.04);
    }

    .table-stack-mobile td {
        border: 0 !important;
        padding: 0.4rem 0 !important;
        text-align: left !important;
    }

    .table-stack-mobile td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.18rem;
        color: #94a3b8;
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .table-stack-mobile td:last-child {
        padding-top: 0.7rem !important;
    }

    .table-stack-mobile td:last-child .btn,
    .table-stack-mobile td:last-child form,
    .table-stack-mobile td:last-child a {
        margin-bottom: 0.45rem;
    }
}

@media (max-width: 576px) {
    .app-topbar,
    .app-content {
        padding-left: 0.95rem;
        padding-right: 0.95rem;
    }

    .topbar-actions {
        grid-template-columns: 1fr;
    }

    .topbar-user {
        grid-column: auto;
        width: 100%;
    }

    .quote-list-meta {
        grid-template-columns: 1fr;
    }

    .quote-list-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .quote-list-actions .btn,
    .quote-list-actions form,
    .quote-list-actions form .btn {
        width: 100%;
    }

    .topbar-pill,
    .topbar-notify,
    .topbar-logout,
    [data-install-app] {
        width: 100%;
        justify-content: center;
    }

    .dashboard-hero,
    .calendar-hero,
    .auth-copy,
    .auth-card {
        border-radius: 22px;
    }

    .dashboard-hero,
    .calendar-hero,
    .card.p-4,
    .dashboard-panel,
    .settings-card,
    .detail-card,
    .side-card {
        padding: 1rem !important;
    }

    .lead-banner h1 {
        font-size: 1.15rem;
    }

    .lead-name-panel strong {
        font-size: 1.28rem;
    }

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

    .calendar-grid {
        margin-bottom: 1rem;
    }

    .calendar-day {
        min-height: 0;
    }
}

.dashboard-side-column {
    display: grid;
    gap: 1.1rem;
    align-content: start;
}

/* Unified navigation and global search */
.sidebar-section-label {
    margin: 1.05rem .8rem .35rem;
    color: rgba(191, 219, 254, .62);
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.sidebar-nav .sidebar-section-label:first-child { margin-top: .15rem; }
.sidebar-icon svg { width: 17px; height: 17px; }
.brand-mark svg { width: 23px; height: 23px; }
.topbar-search-icon { display: inline-flex; align-items: center; justify-content: center; }
.topbar-search-icon svg { width: 17px; height: 17px; }

.compact-page-hero { min-height: 0; }
.global-search-form {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: 1rem;
}
.global-search-form > svg { width: 20px; height: 20px; color: #64748b; }
.global-search-form .form-control { border: 0; box-shadow: none; padding-left: .25rem; }
.search-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.search-result-section { padding: 1rem; min-width: 0; }
.search-result-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.search-result-head > div { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.search-result-head svg { width: 19px; height: 19px; color: #0062FC; }
.search-result-head h2 { margin: 0; font-size: 1rem; }
.search-result-head a { color: #0062FC; font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.search-result-list { display: grid; gap: .5rem; }
.search-result-list > a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; padding: .8rem; color: inherit; text-decoration: none; border: 1px solid #e2e8f0; border-radius: 10px; transition: border-color .16s ease, background .16s ease; }
.search-result-list > a:hover { border-color: #93c5fd; background: #f8fbff; }
.search-result-list > a > div { min-width: 0; }
.search-result-list strong, .search-result-list span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-list strong { font-size: .86rem; }
.search-result-list span, .search-result-list small { color: #64748b; font-size: .73rem; }
.search-result-list small { flex: 0 0 auto; text-align: right; }
.search-empty-state { display: grid; justify-items: center; gap: .45rem; padding: 3rem 1rem; text-align: center; }
.search-empty-state svg { width: 32px; height: 32px; color: #0062FC; }
.search-empty-state strong { color: #04173A; }
.search-empty-state span { color: #64748b; font-size: .84rem; }

.crm-filter-panel { padding: 1rem; }
.btn > svg { width: 16px; height: 16px; margin-right: .28rem; vertical-align: -3px; }
.table-empty-state { display: grid; justify-items: center; gap: .4rem; padding: 2rem 1rem; text-align: center; }
.table-empty-state strong { color: #04173A; }
.table-empty-state span { color: #64748b; font-size: .82rem; }
.table-empty-state .btn { margin-top: .35rem; }
.table a[href^="tel:"], .table a[href^="mailto:"] { color: #0050D6; text-decoration: none; font-weight: 600; }
.table a[href^="tel:"]:hover, .table a[href^="mailto:"]:hover { text-decoration: underline; }

.work-status { display: inline-flex; align-items: center; min-height: 26px; padding: 4px 9px; border-radius: 999px; color: #334155; background: #f1f5f9; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.work-status-new { color: #0050D6; background: #dbeafe; }
.work-status-negotiating { color: #7c3aed; background: #ede9fe; }
.work-status-scheduled { color: #0369a1; background: #e0f2fe; }
.work-status-in_progress { color: #b45309; background: #fef3c7; }
.work-status-done, .work-status-invoiced { color: #047857; background: #d1fae5; }
.work-status-cancelled { color: #b91c1c; background: #fee2e2; }
.app-advanced-settings { margin-top: 1.25rem; padding: 1rem; border: 1px solid #e2e8f0; border-radius: 10px; background: #f8fafc; text-align: left; }
.app-advanced-settings summary { cursor: pointer; color: #334155; font-weight: 700; }
.app-advanced-settings[open] summary { margin-bottom: .75rem; }

@media (max-width: 900px) {
    .search-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .global-search-form { grid-template-columns: 20px minmax(0, 1fr); }
    .global-search-form .btn { grid-column: 1 / -1; width: 100%; }
    .search-result-list > a { align-items: flex-start; }
    .search-result-list small { white-space: nowrap; }
}

.dashboard-main-column {
    align-content: start;
}

.pipeline-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.pipeline-card {
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.92));
    border-radius: 22px;
    padding: 1rem;
    display: grid;
    gap: 0.35rem;
}

.pipeline-card span {
    color: var(--c-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.pipeline-card strong {
    font-size: 2rem;
    line-height: 1;
}

.pipeline-insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr);
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e8eef5;
}

.pipeline-chart {
    min-width: 0;
    padding: 1.1rem;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.pipeline-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.pipeline-chart-head h3 {
    margin: .15rem 0 0;
    font-size: 1rem;
}

.pipeline-chart-head > strong {
    color: #0062FC;
    font-size: .88rem;
    white-space: nowrap;
}

.pipeline-bars {
    display: grid;
    gap: .78rem;
}

.pipeline-bar-row {
    display: grid;
    gap: .35rem;
}

.pipeline-bar-label {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
}

.pipeline-bar-label strong { color: #04173A; }

.pipeline-bar-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf5;
}

.pipeline-bar {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    transition: width .35s ease;
}

.pipeline-bar-0 { background: #0062FC; }
.pipeline-bar-1 { background: #06b6d4; }
.pipeline-bar-2 { background: #8b5cf6; }
.pipeline-bar-3 { background: #10b981; }
.pipeline-bar-4 { background: #f97316; }

.pipeline-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.pipeline-kpi {
    min-width: 0;
    padding: .9rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.pipeline-kpi span,
.pipeline-kpi small {
    display: block;
    color: #64748b;
}

.pipeline-kpi span { font-size: .75rem; font-weight: 700; }
.pipeline-kpi strong { display: block; margin: .25rem 0; color: #04173A; font-size: 1.45rem; line-height: 1; }
.pipeline-kpi small { font-size: .7rem; line-height: 1.35; }
.pipeline-kpi-primary { border-color: #bfdbfe; background: #eff6ff; }
.pipeline-kpi-primary strong { color: #0050D6; }
.pipeline-kpi-warning { border-color: #fed7aa; background: #fff7ed; }
.pipeline-kpi-warning strong { color: #c2410c; }

.quick-list,
.timeline-list {
    display: grid;
    gap: 0.9rem;
}

.quick-list-item,
.timeline-item {
    display: block;
    border: 1px solid rgba(226, 232, 240, 0.96);
    border-radius: 20px;
    padding: 0.95rem 1rem;
    background: rgba(255,255,255,0.92);
    color: inherit;
    text-decoration: none;
}

.quick-list-item strong,
.timeline-item strong {
    display: block;
    margin-bottom: 0.2rem;
}

.quick-list-item span,
.timeline-item span {
    display: block;
    color: var(--c-muted);
}

.quick-list-item small,
.timeline-item small {
    display: block;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.quick-list-link:hover,
.timeline-item:hover {
    border-color: rgba(96, 165, 250, 0.75);
    transform: translateY(-1px);
}

.timeline-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.9rem;
    align-items: start;
}

.timeline-badge {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(180deg, #0062FC, #0050D6);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (max-width: 1100px) {
    .pipeline-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pipeline-insight-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .pipeline-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }

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

    .source-breakdown-row {
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .source-breakdown-number {
        text-align: left;
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: .75rem;
    }

    .timeline-item {
        grid-template-columns: 1fr;
    }

    .timeline-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

@media (max-width: 480px) {
    .pipeline-chart { padding: .9rem; }
    .pipeline-chart-head { align-items: flex-start; }
    .pipeline-kpis { grid-template-columns: 1fr; }
}

/* 2026-06-19 usability polish */
.topbar-profile { min-width: 0; }
.topbar-profile-trigger { display:inline-flex; align-items:center; gap:.7rem; min-height:44px; padding:.35rem .7rem; border:1px solid rgba(203,213,225,.9); border-radius:16px; background:rgba(255,255,255,.92); color:#0f172a; text-align:left; box-shadow:0 10px 24px rgba(15,23,42,.05); }
.topbar-profile-trigger:hover { border-color:rgba(96,165,250,.9); background:#fff; }
.topbar-profile-copy { min-width:0; display:grid; }
.topbar-profile-copy strong, .topbar-profile-copy span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.topbar-profile-copy strong { font-size:.875rem; line-height:1.2; }
.topbar-profile-copy span { color:var(--c-muted); font-size:.74rem; }
.topbar-profile-chevron { color:var(--c-muted); font-size:.9rem; line-height:1; }
.topbar-profile-menu { min-width:240px; border:1px solid rgba(226,232,240,.95); border-radius:18px; padding:.5rem; box-shadow:0 20px 44px rgba(15,23,42,.12); }
.topbar-profile-menu-head { display:grid; gap:.1rem; padding:.55rem .7rem .65rem; }
.topbar-profile-menu-head strong { font-size:.92rem; }
.topbar-profile-menu-head span { font-size:.76rem; color:var(--c-muted); }
.topbar-profile-menu .dropdown-item { border-radius:12px; padding:.65rem .8rem; font-weight:600; }
.mobile-sidebar-actions { display:grid; gap:.75rem; }
@media (max-width: 992px) { .app-topbar { display:grid; grid-template-columns:1fr; gap:.75rem; align-items:stretch; } .topbar-mobile-brand { display:flex; justify-content:space-between; align-items:center; } .topbar-search { order:2; max-width:none; width:100%; } .topbar-actions { order:3; display:grid; grid-template-columns:auto 1fr; gap:.65rem; align-items:stretch; width:100%; } .topbar-pill { min-width:72px; justify-content:center; display:inline-flex; align-items:center; } .topbar-notify { width:100%; } .topbar-profile { grid-column:1 / -1; } .topbar-profile-trigger { width:100%; justify-content:space-between; } }
@media (max-width: 576px) { .app-topbar, .app-content { padding-left:.9rem; padding-right:.9rem; } .topbar-mobile-title { font-size:1.05rem; font-weight:800; } .topbar-actions { grid-template-columns:1fr; } .topbar-pill, .topbar-notify, [data-install-app] { width:100%; } .topbar-search input { height:48px; font-size:.9rem; } }

/* 2026-06-19 mobile ux cleanup */
@media (max-width: 992px) {
    .app-shell {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .app-main {
        min-width: 0;
        width: 100%;
    }

    .topbar-mobile-brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.85rem;
    }

    .topbar-mobile-title {
        flex: 1 1 auto;
        text-align: center;
    }

    .topbar-search {
        max-width: none !important;
        width: 100%;
    }

    .topbar-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
    }

    .topbar-profile,
    .topbar-profile-trigger {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .topbar-pill-desktop,
    .topbar-notify-desktop,
    .topbar-install-desktop {
        display: none !important;
    }

    .app-topbar,
    .app-content {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .topbar-mobile-title {
        font-size: 1.02rem;
        line-height: 1.2;
    }

    .topbar-profile-trigger {
        padding: 0.7rem 0.8rem;
        border-radius: 18px;
    }

    .dashboard-hero {
        padding: 1rem !important;
    }

    .dashboard-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

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

    .dashboard-hero-grid,
    .dashboard-stat-grid,
    .dashboard-board,
    .pipeline-grid {
        grid-template-columns: 1fr !important;
    }

    .quick-list-item,
    .timeline-item,
    .pipeline-card,
    .dashboard-panel,
    .dashboard-stat-card {
        border-radius: 18px;
    }
}
/* 2026-06-19 header interaction fixes */
.topbar-profile { position: relative; min-width: 0; }
.topbar-profile-menu { display: none; position: absolute; top: calc(100% + 0.55rem); right: 0; z-index: 1200; background: #fff; }
.topbar-profile.is-open .topbar-profile-menu { display: block; }
.mobile-profile-btn { display: none; width: 42px; height: 42px; border: 1px solid rgba(203,213,225,.9); border-radius: 14px; background: rgba(255,255,255,.94); align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(15,23,42,.06); }
.mobile-profile-btn .topbar-avatar { width: 34px; height: 34px; }
.mobile-sidebar-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.42); backdrop-filter: blur(2px); z-index: 1190; }
.mobile-sidebar.offcanvas { transition: transform .24s ease, visibility .24s ease; }
body.mobile-sidebar-open { overflow: hidden; }
@media (max-width: 992px) {
  .mobile-sidebar.offcanvas { transform: translateX(-100%); visibility: hidden; display: block; z-index: 1201; }
  .mobile-sidebar.offcanvas.is-open { transform: translateX(0); visibility: visible; }
}
@media (max-width: 576px) {
  .topbar-actions { display: none !important; }
  .mobile-profile-btn { display: inline-flex; }
  .topbar-mobile-brand { grid-template-columns: 42px minmax(0,1fr) 42px; }
  .topbar-mobile-title { text-align: center; padding: 0 .35rem; }
  .topbar-search { order: 2; }
  .dashboard-hero-copy > p { font-size: 1rem; line-height: 1.55; }
}
/* 2026-06-19 hamburger final fix */
.mobile-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(86vw, 340px);
  max-width: 340px;
  height: 100dvh;
  background: linear-gradient(180deg, rgba(15,23,42,.985) 0%, rgba(11,20,40,.985) 100%);
  color: var(--sidebar-text);
  border-right: 1px solid rgba(255,255,255,.08);
  transform: translateX(-104%);
  visibility: hidden;
  pointer-events: none;
  z-index: 1201;
  transition: transform .22s ease, visibility .22s ease;
  display: flex;
  flex-direction: column;
}
.mobile-sidebar.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.mobile-sidebar-head,
.mobile-sidebar-body {
  padding: 1.15rem 1rem;
}
.mobile-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mobile-sidebar-body {
  overflow-y: auto;
  flex: 1 1 auto;
}
@media (min-width: 993px) {
  .mobile-sidebar,
  .mobile-sidebar-backdrop,
  .mobile-profile-btn,
  .topbar-mobile-brand .mobile-menu-btn {
    display: none !important;
  }
}
@media (max-width: 992px) {
  .mobile-sidebar {
    display: flex !important;
  }
}
/* AC unit registry and maintenance automation */
.registry-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px;
    margin-bottom: 22px;
    color: #fff;
    background: linear-gradient(110deg, #04173A 0%, #0050D6 62%, #00C8FD 100%);
    border: 0;
    border-radius: 8px;
}
.registry-hero h1 { margin: 4px 0 8px; color: #fff; font-size: 30px; }
.registry-hero p { margin: 0; color: #d7e5f4; }
.registry-code { min-width: 190px; padding: 16px 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 8px; }
.registry-code span { display: block; color: #bdd2e7; font-size: 12px; text-transform: uppercase; font-weight: 700; }
.registry-code strong { display: block; margin-top: 5px; font-size: 22px; }
.registry-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .75fr); gap: 22px; align-items: start; }
.registry-main, .registry-side { display: grid; gap: 18px; }
.registry-side { position: sticky; top: 96px; }
.registry-section { padding: 24px; border-radius: 8px; }
.registry-history { display: grid; gap: 10px; margin-top: 14px; }
.registry-history-item { display: grid; gap: 2px; padding: 12px; border: 1px solid #e2e8f0; border-left: 3px solid #00C8FD; border-radius: 6px; }
.registry-history-item span, .registry-history-item small { color: #64748b; }
.registry-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.registry-metric { display: block; padding: 18px 20px; color: inherit; text-decoration: none; border-radius: 8px; transition: transform .16s ease, border-color .16s ease; }
.registry-metric:hover { transform: translateY(-2px); border-color: #93c5fd; }
.registry-metric span { display: block; color: #64748b; font-size: 13px; font-weight: 700; }
.registry-metric strong { display: block; margin-top: 4px; font-size: 28px; color: #04173A; }
.registry-metric-danger { border-left: 4px solid #dc2626; }
.registry-metric-warning { border-left: 4px solid #d97706; }
.registry-filter { padding: 20px; margin-bottom: 18px; border-radius: 8px; }
.registry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.registry-unit-card { padding: 22px; border-radius: 8px; min-width: 0; }
.registry-unit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.registry-unit-head h2 { margin: 4px 0 2px; font-size: 21px; }
.registry-unit-head p { margin: 0; color: #64748b; }
.registry-unit-code { color: #0062FC; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.unit-status { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.unit-status-active { color: #047857; background: #d1fae5; }
.unit-status-out_of_service { color: #b45309; background: #fef3c7; }
.unit-status-replaced { color: #64748b; background: #e2e8f0; }
.registry-unit-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0 12px; }
.registry-unit-specs > div { padding: 10px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; min-width: 0; }
.registry-unit-specs span, .maintenance-due span { display: block; color: #64748b; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.registry-unit-specs strong { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.maintenance-due { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 13px 14px; border: 1px solid #dbeafe; border-left: 4px solid #0062FC; background: #eff6ff; border-radius: 6px; }
.maintenance-due time { font-weight: 800; white-space: nowrap; }
.maintenance-due-overdue { color: #991b1b; background: #fef2f2; border-color: #fecaca; border-left-color: #dc2626; }
.maintenance-due-due { color: #9a3412; background: #fff7ed; border-color: #fed7aa; border-left-color: #ea580c; }
.maintenance-due-soon { color: #854d0e; background: #fefce8; border-color: #fde68a; border-left-color: #ca8a04; }
.maintenance-due-none { color: #475569; background: #f8fafc; border-color: #e2e8f0; border-left-color: #94a3b8; }
.registry-unit-meta { display: flex; justify-content: space-between; gap: 14px; margin: 12px 0 18px; color: #64748b; font-size: 13px; }
.registry-unit-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.registry-unit-actions form { margin-left: auto; }
.registry-empty { grid-column: 1 / -1; padding: 44px; }

@media (max-width: 1100px) {
    .registry-layout { grid-template-columns: 1fr; }
    .registry-side { position: static; }
    .registry-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .registry-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .registry-hero { align-items: stretch; padding: 22px 18px; flex-direction: column; }
    .registry-hero h1 { font-size: 25px; }
    .registry-code { min-width: 0; }
    .registry-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .registry-metric { padding: 14px; }
    .registry-metric strong { font-size: 23px; }
    .registry-section, .registry-unit-card, .registry-filter { padding: 17px; }
    .registry-unit-head { flex-direction: column; }
    .registry-unit-specs { grid-template-columns: 1fr 1fr; }
    .registry-unit-specs > div:first-child { grid-column: 1 / -1; }
    .maintenance-due { align-items: flex-start; flex-direction: column; gap: 5px; }
    .registry-unit-meta { flex-direction: column; gap: 4px; }
    .registry-unit-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .registry-unit-actions .btn { width: 100%; }
    .registry-unit-actions form { margin: 0; grid-column: 1 / -1; }
}
/* Customer portal administration */
.customer-portal-admin { padding: 24px; border-radius: 8px; }
.customer-portal-admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.customer-portal-admin-head h2 { margin: 4px 0 5px; font-size: 21px; }
.customer-portal-admin-head p { margin: 0; color: #64748b; }
.portal-admin-status { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.portal-admin-status.is-active { color: #047857; background: #d1fae5; }
.portal-admin-status.is-disabled { color: #991b1b; background: #fee2e2; }
.portal-link-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; }
.portal-admin-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }

@media (max-width: 720px) {
    .customer-portal-admin { padding: 17px; }
    .customer-portal-admin-head { flex-direction: column; }
    .portal-link-row { grid-template-columns: 1fr; }
    .portal-link-row .btn, .portal-admin-actions, .portal-admin-actions form, .portal-admin-actions .btn { width: 100%; }
}
/* E-mail automation */
.email-client-filter { display: grid; grid-template-columns: 160px minmax(260px, 420px); gap: 12px; align-items: end; padding: 16px 20px; margin-bottom: 18px; }
.email-automation-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .65fr); gap: 18px; align-items: start; }
.email-automation-main { display: grid; gap: 18px; }
.email-rule-list { position: sticky; top: 92px; }
.email-rule-list > .card, .email-rule-editor, .email-log-panel { padding: 22px; border-radius: 8px; }
.email-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
.email-editor-head h2 { margin: 4px 0 0; font-size: 22px; }
.email-timing-panel { display: grid; grid-template-columns: 120px 150px 150px minmax(140px, 1fr); gap: 12px; align-items: end; padding: 15px; background: #f8fafc; border: 1px solid #dce5ee; border-radius: 7px; }
.email-timing-panel > strong { padding-bottom: 11px; color: #0050D6; }
.email-timing-panel.is-immediate > div { opacity: .45; pointer-events: none; }
.email-timing-panel.is-immediate > strong { grid-column: 1 / -1; padding: 0; }
.email-body-editor { min-height: 250px; line-height: 1.6; }
.email-placeholder-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; padding: 14px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 7px; }
.email-placeholder-list strong { width: 100%; font-size: 13px; }
.email-placeholder-list button { padding: 5px 8px; border: 1px solid #bfdbfe; border-radius: 5px; background: #eff6ff; color: #0050D6; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.email-editor-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.email-rules { display: grid; gap: 10px; }
.email-rule-item { padding: 13px; border: 1px solid #e2e8f0; border-left: 3px solid #94a3b8; border-radius: 7px; }
.email-rule-item.is-active { border-left-color: #10b981; }
.email-rule-item > a { display: grid; gap: 3px; color: inherit; text-decoration: none; }
.email-rule-item > a span, .email-rule-item > a small { color: #64748b; font-size: 11px; }
.email-rule-item > a strong { font-size: 15px; }
.email-rule-item > div { margin-top: 10px; }
.email-rule-item form { display: flex; gap: 6px; }
.email-log-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.email-log-sent { color: #047857; background: #d1fae5; }
.email-log-failed { color: #991b1b; background: #fee2e2; }
.email-log-pending { color: #92400e; background: #fef3c7; }

@media (max-width: 1100px) {
    .email-automation-layout { grid-template-columns: 1fr; }
    .email-rule-list { position: static; }
}
@media (max-width: 700px) {
    .email-client-filter { grid-template-columns: 1fr; }
    .email-rule-list > .card, .email-rule-editor, .email-log-panel { padding: 17px; }
    .email-timing-panel { grid-template-columns: 1fr 1fr; }
    .email-timing-panel > strong { grid-column: 1 / -1; padding: 0; }
    .email-editor-actions { display: grid; }
    .email-editor-actions .btn { width: 100%; }
}

/* Guided next steps */
.next-actions-panel { padding: 24px; border-radius: 8px; }
.next-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.next-action-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-height: 150px;
    padding: 18px;
    color: #04173A;
    text-decoration: none;
    border: 1px solid #dbeafe;
    border-left: 4px solid #0062FC;
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.next-action-card:hover {
    color: #04173A;
    transform: translateY(-2px);
    border-color: #93c5fd;
    box-shadow: 0 16px 35px rgba(15, 35, 63, .08);
}
.next-action-card span,
.next-action-card small {
    display: block;
    color: #64748b;
}
.next-action-card span {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.next-action-card strong {
    display: block;
    font-size: 18px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.next-action-card small {
    margin-top: 6px;
    font-size: 13px;
}
.next-action-card em {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 34px;
    padding: 7px 11px;
    color: #0050D6;
    background: #eff6ff;
    border-radius: 999px;
    font-style: normal;
    font-size: 12px;
    font-weight: 800;
}
.next-action-quote { border-left-color: #7c3aed; }
.next-action-quote em { color: #6d28d9; background: #f3e8ff; }
.next-action-job { border-left-color: #059669; }
.next-action-job em { color: #047857; background: #d1fae5; }
.ai-score-line,
.ai-mini-hint {
    margin-top: 8px;
    color: #0062FC !important;
    font-weight: 800;
}
.ai-mini-hint {
    padding-top: 8px;
    border-top: 1px solid #e0edff;
    line-height: 1.35;
}

/* Local assistant */
.ai-assistant-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #cfe2ff;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, .12), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.ai-card-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.ai-card-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
}
.ai-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #0062FC, #06b6d4);
    font-weight: 900;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .24);
}
.ai-rating {
    display: grid;
    gap: 5px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: rgba(255,255,255,.74);
}
.ai-rating strong {
    color: #0f172a;
    font-size: 18px;
}
.ai-rating span,
.ai-next-step p {
    margin: 0;
    color: #64748b;
    line-height: 1.5;
}
.ai-next-step {
    margin-top: 12px;
    padding: 14px;
    border-left: 4px solid #0062FC;
    border-radius: 12px;
    background: #eff6ff;
}
.ai-next-step span {
    display: block;
    margin-bottom: 5px;
    color: #0050D6;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.assistant-checklist {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
}
.assistant-checklist > span {
    display: block;
    margin-bottom: 8px;
    color: #0050D6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.assistant-checklist ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding-left: 18px;
    color: #334155;
}
.assistant-checklist li {
    line-height: 1.45;
}
.ai-draft summary {
    cursor: pointer;
    color: #0050D6;
    font-weight: 900;
}
.ai-daily-focus {
    display: grid;
    gap: 4px;
    margin: 14px 0;
    padding: 14px 16px;
    color: #0f172a;
    text-decoration: none;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #0062FC;
    border-radius: 14px;
    background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%);
}
.ai-daily-focus:hover {
    color: #0f172a;
    border-color: #60a5fa;
    box-shadow: 0 12px 24px rgba(37, 99, 235, .10);
}
.ai-daily-focus span {
    color: #0062FC;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.ai-daily-focus strong {
    font-size: 16px;
    line-height: 1.35;
}
.ai-daily-focus small {
    color: #64748b;
    line-height: 1.45;
}

@media (max-width: 1280px) {
    .next-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .next-actions-panel { padding: 17px; }
    .next-action-grid { grid-template-columns: 1fr; gap: 10px; }
    .next-action-card { min-height: 0; padding: 16px; }
    .next-action-card strong { font-size: 16px; }
    .ai-card-head { flex-direction: column; }
    .ai-score-badge { width: fit-content; }
}

.app-footer-links {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.app-footer a,
.public-site-footer a {
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

.app-footer a:hover,
.public-site-footer a:hover {
    color: #0062FC;
}

.legal-page .legal-section {
    padding: clamp(28px, 4vw, 54px);
}

.legal-content {
    display: grid;
    gap: 16px;
    margin-top: 26px;
}

.legal-content article {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 32px rgba(15, 23, 42, .05);
}

.legal-content h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.legal-content p {
    margin: 0 0 10px;
    color: #475569;
    line-height: 1.7;
}

.legal-content p:last-child {
    margin-bottom: 0;
}

.legal-content a {
    color: #0062FC;
    font-weight: 850;
    text-decoration: none;
}

.legal-updated {
    color: #64748b;
    font-weight: 800;
}

@media (max-width: 640px) {
    .app-footer-links {
        justify-content: flex-start;
    }

    .legal-content article {
        padding: 16px;
        border-radius: 14px;
    }
}
