/* Cadensy — single stylesheet for website, admin, dashboard and portal.
   Brand: navy #0C2D56 · orange #FF831C · blue #2563A6 · light blue #EAF3FC · white · gray #64748B */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/inter-700.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("/static/fonts/inter-800.woff2") format("woff2"); }

:root {
  --navy: #0C2D56;
  --navy-2: #123B6E;
  --orange: #FF831C;
  --orange-hover: #F27207;
  --blue: #2563A6;
  --blue-soft: #EAF3FC;
  --white: #FFFFFF;
  --gray: #64748B;

  --bg: #FFFFFF;
  --bg-soft: #EAF3FC;
  --bg-muted: #F5F8FC;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --text: #0F1F33;
  --text-muted: #64748B;
  --heading: #0C2D56;
  --link: #2563A6;
  --border: #D9E3EF;
  --border-strong: #B9C8DA;
  --focus: #2563A6;
  --on-orange: #0C2D56;
  --success: #15803D;
  --success-bg: #E7F6EC;
  --warning: #A15C00;
  --warning-bg: #FFF4E5;
  --danger: #B42318;
  --danger-bg: #FDECEA;
  --info-bg: #EAF3FC;
  --shadow: 0 1px 2px rgba(12, 45, 86, .06), 0 4px 16px rgba(12, 45, 86, .06);
  --radius: 10px;
  --radius-sm: 6px;
  --max: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #081A31;
    --bg-soft: #0D2442;
    --bg-muted: #0B2039;
    --surface: #0F2747;
    --surface-2: #12304F;
    --text: #E4ECF6;
    --text-muted: #9FB0C6;
    --heading: #F2F6FB;
    --link: #8DBDF3;
    --border: #22426A;
    --border-strong: #31587F;
    --focus: #8DBDF3;
    --success: #6FD69A; --success-bg: #12341F;
    --warning: #FFC27A; --warning-bg: #3A2A10;
    --danger: #FF9A90; --danger-bg: #3B1714;
    --info-bg: #102C4D;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #081A31;
  --bg-soft: #0D2442;
  --bg-muted: #0B2039;
  --surface: #0F2747;
  --surface-2: #12304F;
  --text: #E4ECF6;
  --text-muted: #9FB0C6;
  --heading: #F2F6FB;
  --link: #8DBDF3;
  --border: #22426A;
  --border-strong: #31587F;
  --focus: #8DBDF3;
  --success: #6FD69A; --success-bg: #12341F;
  --warning: #FFC27A; --warning-bg: #3A2A10;
  --danger: #FF9A90; --danger-bg: #3B1714;
  --info-bg: #102C4D;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg); text-rendering: optimizeLegibility; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--orange); color: var(--on-orange); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 700; }
.skip-link:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.muted { color: var(--text-muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--orange); color: var(--on-orange); }
.btn-primary:hover { background: var(--orange-hover); color: var(--on-orange); }
.btn-secondary { background: transparent; color: var(--heading); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--link); color: var(--link); }
.btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-light:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn-ghost { background: transparent; color: var(--link); padding-inline: .6rem; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { min-height: 34px; padding: .4rem .8rem; font-size: .875rem; }
.btn-block { width: 100%; }
button[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; line-height: 1; }
.logo svg { width: 32px; height: 32px; flex: none; }
.logo .lura { color: var(--blue); }
.logo .desk { color: var(--orange); }
.logo .brand-name { color: inherit; }
.site-header .logo .lura, .site-footer .logo .lura, .app-sidebar .logo .lura { color: #fff; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header .bar { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }
.main-nav { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.main-nav a, .main-nav summary { color: #DCE7F5; text-decoration: none; padding: .5rem .7rem; border-radius: var(--radius-sm); font-weight: 550; font-size: .95rem; cursor: pointer; }
.main-nav a:hover, .main-nav summary:hover, .main-nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.main-nav details { position: relative; }
.main-nav summary { list-style: none; }
.main-nav summary::-webkit-details-marker { display: none; }
.main-nav summary::after { content: ""; display: inline-block; margin-left: .35rem; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.dropdown { position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem; display: grid; }
.dropdown a { color: var(--text); padding: .55rem .75rem; }
.dropdown a:hover { background: var(--bg-soft); color: var(--heading); }
.header-actions { display: flex; align-items: center; gap: .5rem; }
.header-actions .btn { min-height: 40px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; }
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
.lang-select { position: relative; }
.lang-select summary { list-style: none; display: inline-flex; align-items: center; gap: .35rem; color: #DCE7F5; padding: .45rem .6rem; border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-sm); cursor: pointer; font-size: .9rem; font-weight: 600; }
.lang-select summary::-webkit-details-marker { display: none; }
.lang-select .dropdown { right: 0; left: auto; min-width: 170px; }
.menu-toggle { display: none; }
.icon-btn { flex: none; }
.header-actions .btn { white-space: nowrap; }
.main-nav .mobile-only { display: none; }
@media (max-width: 1200px) {
  .menu-toggle { display: inline-grid; margin-left: auto; }
  .main-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: stretch; padding: .75rem 20px 1.25rem; border-top: 1px solid rgba(255,255,255,.1); max-height: calc(100vh - 68px); overflow-y: auto; }
  .main-nav.open { display: flex; }
  .main-nav details .dropdown { position: static; box-shadow: none; background: transparent; border: 0; padding: 0 0 0 .75rem; }
  .main-nav details .dropdown a { color: #DCE7F5; }
  .header-actions .hide-mobile { display: none; }
  .main-nav .mobile-only { display: block; }
  .main-nav .mobile-only.btn { display: inline-flex; justify-content: center; margin-top: .5rem; color: var(--navy); }
}
@media (max-width: 560px) {
  .header-actions .hide-xs { display: none; }
  .header-actions { gap: .4rem; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-soft { background: var(--bg-soft); }
.section-navy { background: var(--navy); color: #DCE7F5; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-navy a:not(.btn) { color: #A9CCF5; }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head.center { margin-inline: auto; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: .75rem; }
.section-navy .eyebrow { color: var(--orange); }
.lead { font-size: 1.15rem; color: var(--text-muted); }
.section-navy .lead { color: #C3D3E8; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }
.section-navy .card { background: var(--navy-2); border-color: rgba(255,255,255,.1); color: #DCE7F5; }
.icon-badge { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: var(--bg-soft); color: var(--blue); margin-bottom: .9rem; }
.icon-badge svg { width: 22px; height: 22px; }
.section-soft .icon-badge { background: var(--surface); }
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split.reverse > :first-child { order: 0; } }
.checklist { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .6rem; }
.checklist li { position: relative; padding-left: 1.8rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%230C2D56' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M5 10.5l3.2 3.2L15 6.8'/%3E%3C/svg%3E") center/80% no-repeat; }
.problem-list { counter-reset: p; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--bg-soft); color: var(--blue); white-space: nowrap; }
.badge-soon { background: var(--warning-bg); color: var(--warning); }
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: var(--bg-muted); color: var(--text-muted); border: 1px solid var(--border); }
.badge-orange { background: var(--orange); color: var(--on-orange); }

/* ---------- Hero ---------- */
.hero { background: var(--navy); color: #DCE7F5; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--orange); }
.hero .lead { color: #C3D3E8; font-size: 1.2rem; max-width: 600px; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.08fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.75rem 0 1rem; }
.hero-note { font-size: .9rem; color: #A9BBD3; }

/* Illustrative dashboard */
.demo { background: #F7FAFD; color: #0F1F33; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; border: 1px solid rgba(255,255,255,.15); font-size: .8rem; }
.demo-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .9rem; background: #fff; border-bottom: 1px solid #E3EAF3; }
.demo-dots { display: flex; gap: 6px; }
.demo-dots i { width: 9px; height: 9px; border-radius: 50%; background: #D6DEE9; display: block; }
.demo-label { font-size: .7rem; font-weight: 700; color: #7A4A00; background: #FFF1DD; padding: .15rem .5rem; border-radius: 999px; }
.demo-body { display: grid; grid-template-columns: 120px 1fr; min-height: 340px; }
.demo-side { background: #0C2D56; padding: .8rem .6rem; display: grid; gap: .3rem; align-content: start; }
.demo-side span { color: #BFD0E6; padding: .35rem .5rem; border-radius: 5px; font-weight: 600; }
.demo-side span.on { background: rgba(255,255,255,.12); color: #fff; }
.demo-main { padding: .9rem; display: grid; gap: .75rem; align-content: start; }
.demo-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.demo-kpi { background: #fff; border: 1px solid #E3EAF3; border-radius: 8px; padding: .5rem .6rem; }
.demo-kpi b { display: block; font-size: 1.15rem; color: #0C2D56; }
.demo-kpi small { color: #64748B; }
.demo-sla { background: #fff; border: 1px solid #E3EAF3; border-radius: 8px; padding: .55rem .7rem; }
.demo-bar { height: 7px; background: #E6EDF6; border-radius: 99px; overflow: hidden; margin-top: .35rem; }
.demo-bar i { display: block; height: 100%; background: #2563A6; border-radius: 99px; }
.demo-table { background: #fff; border: 1px solid #E3EAF3; border-radius: 8px; overflow: hidden; }
.demo-row { display: grid; grid-template-columns: 52px 1fr 70px 78px; gap: .4rem; padding: .45rem .6rem; border-top: 1px solid #EEF2F7; align-items: center; }
.demo-row:first-child { border-top: 0; color: #64748B; font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.demo-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pri { font-weight: 700; font-size: .7rem; padding: .1rem .4rem; border-radius: 99px; text-align: center; }
.pri-urgent { background: #FDECEA; color: #B42318; }
.pri-high { background: #FFF1DD; color: #8A4B00; }
.pri-normal { background: #EAF3FC; color: #1D4F86; }
.pri-low { background: #EEF2F6; color: #475569; }
.demo-msg { background: #fff; border: 1px solid #E3EAF3; border-radius: 8px; padding: .55rem .7rem; display: grid; gap: .35rem; }
.demo-msg p { margin: 0; color: #334155; }
@media (max-width: 520px) { .demo-body { grid-template-columns: minmax(0, 1fr); } .demo-side { display: none; } .demo-kpis { grid-template-columns: repeat(2, 1fr); } .demo-row { grid-template-columns: 44px 1fr 64px; } .demo-row span:nth-child(4) { display: none; } }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { position: relative; padding-top: 3rem; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 2.2rem; height: 2.2rem; display: grid; place-items: center; border-radius: 50%; background: var(--orange); color: var(--on-orange); font-weight: 800; }

/* ---------- Pricing ---------- */
.billing-toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); gap: 4px; }
.billing-toggle button { border: 0; background: transparent; font: inherit; font-weight: 650; padding: .45rem 1rem; border-radius: 999px; color: var(--text-muted); cursor: pointer; min-height: 38px; }
.billing-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--heading); box-shadow: var(--shadow), 0 12px 28px rgba(12, 45, 86, .14); }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .plans { grid-template-columns: minmax(0, 1fr); } }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; position: relative; }
.plan.highlight { border: 2px solid var(--orange); }
.plan .badge-orange { position: absolute; top: -12px; left: 1.5rem; }
.plan h3 { font-size: 1.25rem; margin-bottom: .25rem; }
.plan .desc { color: var(--text-muted); font-size: .92rem; min-height: 3em; }
.price { display: flex; align-items: baseline; gap: .3rem; margin: .75rem 0 .25rem; color: var(--heading); }
.price .cur { font-size: 1rem; font-weight: 700; }
.price .amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; }
.price .per { color: var(--text-muted); }
.billing-note { font-size: .85rem; color: var(--text-muted); min-height: 2.6em; }
.plan .checklist { font-size: .93rem; margin-top: 1rem; }
.plan .btn { margin-top: auto; }
.plan .limits { font-weight: 650; color: var(--heading); font-size: .95rem; display: grid; gap: .2rem; margin: .5rem 0 0; }
.notice { border-radius: var(--radius); padding: 1rem 1.2rem; background: var(--info-bg); border: 1px solid var(--border); }
.notice-warn { background: var(--warning-bg); border-color: transparent; color: var(--text); }
.notice strong { color: var(--heading); }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.25rem 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-2); color: var(--heading); font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.yes { color: var(--success); font-weight: 800; }
.no { color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .75rem; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 1.2rem; }
.faq summary { cursor: pointer; padding: 1rem 0; font-weight: 700; color: var(--heading); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--blue); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--text); }

/* ---------- CTA ---------- */
.cta-band { background: var(--navy); color: #DCE7F5; border-radius: 18px; padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; margin-bottom: .35rem; }
.cta-band p { margin: 0; color: #C3D3E8; max-width: 620px; }

/* ---------- Page header & breadcrumbs ---------- */
.page-hero { background: var(--bg-soft); padding: clamp(2.2rem, 5vw, 3.6rem) 0; border-bottom: 1px solid var(--border); }
.page-hero .lead { max-width: 760px; }
.breadcrumbs { font-size: .85rem; margin-bottom: 1rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: .35rem; color: var(--text-muted); }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--link); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--heading); font-weight: 600; }

/* ---------- Prose (pages & articles) ---------- */
.prose { font-size: 1.06rem; line-height: 1.75; }
.prose h2 { margin-top: 2.2em; font-size: 1.6rem; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.7em; font-size: 1.25rem; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.5em 0; padding: .8em 1.2em; border-left: 4px solid var(--orange); background: var(--bg-muted); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose img { border-radius: var(--radius); border: 1px solid var(--border); display: block; margin: 1.5em auto; }
.prose figure { margin: 1.8em 0; }
.prose figcaption { font-size: .88rem; color: var(--text-muted); text-align: center; margin-top: .5em; }
.prose code { background: var(--bg-muted); padding: .1em .35em; border-radius: 4px; font-size: .92em; }
.prose pre { background: #0B1F3A; color: #E4ECF6; padding: 1rem; border-radius: var(--radius); overflow-x: auto; font-size: .9rem; }
.prose pre code { background: none; padding: 0; }
.prose .table-wrap table { font-size: .95rem; }
.prose .callout { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.5em 0; }
.prose .callout p:last-child { margin: 0; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 3rem; align-items: start; }
@media (max-width: 980px) { .content-layout { grid-template-columns: minmax(0, 1fr); } }
.aside-box { position: sticky; top: 90px; display: grid; gap: 1rem; }
.toc { font-size: .92rem; }
.toc ol { padding-left: 1.1rem; margin: .5rem 0 0; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }
.article-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--text-muted); font-size: .9rem; margin-top: 1rem; }
.article-cover { margin: 0 0 2rem; }
.article-cover img { border-radius: 14px; width: 100%; border: 1px solid var(--border); }
.references { font-size: .92rem; }
.references li { word-break: break-word; }

/* ---------- Article list ---------- */
.article-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.3rem; height: 100%; }
.article-card h3 { font-size: 1.12rem; margin: .5rem 0; }
.article-card h3 a { color: var(--heading); text-decoration: none; }
.article-card h3 a:hover { color: var(--link); text-decoration: underline; }
.article-card p { color: var(--text-muted); font-size: .95rem; flex: 1; }
.article-card .meta { font-size: .82rem; color: var(--text-muted); }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0 2rem; }
.chip { display: inline-flex; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 600; background: var(--surface); }
.chip:hover { border-color: var(--link); color: var(--link); }
.chip[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.search-form { display: flex; gap: .5rem; max-width: 560px; }
.search-form input { flex: 1; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2.5rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: minmax(0, 1fr); } }
label { font-weight: 650; color: var(--heading); font-size: .93rem; display: block; margin-bottom: .3rem; }
.hint { font-size: .83rem; color: var(--text-muted); margin-top: .25rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=date], input[type=time], input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: .6rem .75rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); border-color: var(--focus); }
.field-error { color: var(--danger); font-size: .85rem; margin-top: .25rem; font-weight: 600; }
.input-error { border-color: var(--danger) !important; }
.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; color: var(--text); }
.checkbox input { width: 18px; height: 18px; margin-top: .2rem; flex: none; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: .85rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 550; }
.alert-ok { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--info-bg); color: var(--heading); }
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 2.5rem 20px; background: var(--bg-soft); }
.auth-card { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: clamp(1.5rem, 4vw, 2.2rem); box-shadow: var(--shadow), 0 12px 28px rgba(12, 45, 86, .14); }
.auth-card.wide { max-width: 720px; }
.auth-card h1 { font-size: 1.7rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #BFD0E6; padding: 3.5rem 0 2rem; font-size: .93rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 2rem; }
@media (max-width: 900px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer h2 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: .9rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { color: #BFD0E6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-langs { display: flex; gap: .75rem; flex-wrap: wrap; }
.footer-langs a[aria-current] { color: #fff; font-weight: 700; }

/* ---------- Error pages ---------- */
.error-page { text-align: center; padding: 6rem 0; }
.error-page .code { font-size: 5rem; font-weight: 800; color: var(--orange); line-height: 1; }

/* ============================================================
   Application (dashboard, admin, portal)
   ============================================================ */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; background: var(--bg-muted); }
.app-sidebar { background: var(--navy); color: #DCE7F5; padding: 1.1rem .8rem; display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-sidebar .logo { padding: .2rem .5rem .6rem; font-size: 1.3rem; }
.app-sidebar nav { display: grid; gap: .15rem; }
.app-sidebar nav a { display: flex; align-items: center; gap: .65rem; color: #C9D8EA; text-decoration: none; padding: .55rem .7rem; border-radius: 7px; font-weight: 560; font-size: .94rem; }
.app-sidebar nav a svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.app-sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.app-sidebar nav a[aria-current="page"] { background: rgba(255,255,255,.13); color: #fff; box-shadow: inset 3px 0 0 var(--orange); }
.app-sidebar .nav-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8EA6C4; padding: .8rem .7rem .3rem; }
.app-sidebar .tenant { margin-top: auto; font-size: .85rem; color: #A9BBD3; padding: .6rem .7rem; border-top: 1px solid rgba(255,255,255,.1); }
.app-main { min-width: 0; display: flex; flex-direction: column; }
.app-topbar { display: flex; align-items: center; gap: 1rem; padding: .7rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.app-topbar .spacer { flex: 1; }
.app-topbar .who { font-size: .9rem; color: var(--text-muted); }
.app-topbar .icon-btn { border-color: var(--border); color: var(--text); }
.app-topbar .icon-btn:hover { background: var(--bg-soft); }
.app-content { padding: 1.5rem; max-width: 1320px; width: 100%; }
.app-menu-toggle { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .app-sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .app-menu-toggle { display: inline-grid; }
  .app-content { padding: 1rem; }
}
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.page-head h1 { font-size: 1.6rem; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; }
.kpi .label { color: var(--text-muted); font-size: .85rem; font-weight: 600; }
.kpi .value { font-size: 1.9rem; font-weight: 800; color: var(--heading); line-height: 1.15; margin-top: .2rem; }
.kpi .sub { font-size: .8rem; color: var(--text-muted); }
.kpi.alert-kpi .value { color: var(--danger); }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 1.25rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 1.05rem; margin: 0; }
.panel-body { padding: 1.1rem; }
.panel .table-wrap { margin: 0; border: 0; border-radius: 0 0 var(--radius) var(--radius); }
.panel table td, .panel table th { font-size: .9rem; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.cols-main { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
@media (max-width: 1000px) { .cols-2, .cols-main { grid-template-columns: minmax(0, 1fr); } }
.bars { display: grid; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 44px; gap: .6rem; align-items: center; font-size: .88rem; }
.bar-row .track { height: 9px; background: var(--bg-soft); border-radius: 99px; overflow: hidden; }
.bar-row .fill { display: block; height: 100%; background: var(--blue); border-radius: 99px; min-width: 2px; }
.bar-row .n { text-align: right; font-weight: 700; color: var(--heading); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); }
.empty h3 { color: var(--heading); }
.status { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.st-new { background: #EAF3FC; color: #1D4F86; }
.st-open { background: #FFF1DD; color: #8A4B00; }
.st-pending_customer, .st-pending_third_party { background: #F1ECFB; color: #5B3A9E; }
.st-resolved { background: #E7F6EC; color: #15703A; }
.st-closed { background: #EEF2F6; color: #475569; }
:root[data-theme="dark"] .status, :root[data-theme="dark"] .pri { filter: saturate(1.1) brightness(.95); }
.timeline { display: grid; gap: 1rem; }
.msg { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.msg-head { display: flex; justify-content: space-between; gap: .75rem; padding: .6rem .9rem; border-bottom: 1px solid var(--border); font-size: .85rem; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.msg-body { padding: .9rem; white-space: pre-wrap; word-wrap: break-word; }
.msg.internal { border-color: #F0C36D; }
.msg.internal .msg-head { background: var(--warning-bg); }
.event { font-size: .82rem; color: var(--text-muted); padding-left: .9rem; border-left: 2px solid var(--border); }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: .45rem .8rem; font-size: .9rem; margin: 0; }
.dl dt { color: var(--text-muted); font-weight: 600; }
.dl dd { margin: 0; color: var(--text); }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.toolbar > * { flex: 0 1 auto; }
.toolbar select, .toolbar input { min-height: 38px; padding: .4rem .6rem; width: auto; }
.wizard-steps { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.wizard-steps li { padding: .35rem .8rem; border-radius: 999px; background: var(--bg-soft); color: var(--text-muted); font-size: .85rem; font-weight: 650; }
.wizard-steps li.on { background: var(--navy); color: #fff; }
.wizard-steps li.done { background: var(--success-bg); color: var(--success); }
.inline-form { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; word-break: break-all; }
.portal-header { background: var(--navy); color: #fff; }
.portal-header .bar { display: flex; align-items: center; gap: 1rem; min-height: 62px; }
.portal-header nav { margin-left: auto; display: flex; gap: .25rem; flex-wrap: wrap; }
.portal-header nav a { color: #DCE7F5; text-decoration: none; padding: .45rem .7rem; border-radius: 6px; font-weight: 600; font-size: .93rem; }
.portal-header nav a:hover, .portal-header nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.portal-title { font-weight: 800; color: #fff; text-decoration: none; font-size: 1.15rem; }
.portal-main { padding: 2rem 0 4rem; min-height: 70vh; }

/* ---------- List pages (dashboard) ---------- */
.page-sub { margin: .2rem 0 0; color: var(--text-muted); font-size: .9rem; }
.back-link { display: inline-block; font-size: .85rem; font-weight: 600; text-decoration: none; margin-bottom: .35rem; }
.page-head h1 .badge { vertical-align: middle; margin-left: .4rem; font-size: .75rem; }
.list-toolbar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .6rem; align-items: center; }
.list-toolbar .search-field { flex: 1 1 280px; max-width: 520px; }
.list-toolbar .search-field input { width: 100%; }
.list-table tbody tr { transition: background .12s; }
.list-table tbody tr:hover { background: var(--surface-2); }
.list-table td { vertical-align: middle; }
.list-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.list-table .actions-col { width: 1%; white-space: nowrap; text-align: right; }
.row-title { font-weight: 650; text-decoration: none; color: var(--heading); }
.row-title:hover { color: var(--link); text-decoration: underline; }
.row-sub { display: block; font-size: .8rem; color: var(--text-muted); margin-top: .1rem; }
.cell-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.cell-actions .btn-sm { min-height: 28px; padding: .2rem .5rem; font-size: .8rem; }
.empty .btn { margin-top: .5rem; }
.note-box { margin-bottom: 1.25rem; }
.note-box p { margin: .3rem 0 0; white-space: pre-wrap; }
.req { color: var(--danger); }

/* ---------- Side drawer (create / edit forms) ---------- */
.drawer-layer { position: fixed; inset: 0; z-index: 100; }
.drawer-layer[hidden] { display: none; }
body:has(.drawer-layer:not([hidden])) { overflow: hidden; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(8, 26, 49, .5); animation: drawer-fade .18s ease-out; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 50vw; height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); box-shadow: -12px 0 40px rgba(8, 26, 49, .25); animation: drawer-in .22s ease-out; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border); }
.drawer-head h2 { margin: 0; font-size: 1.25rem; }
.drawer-close { display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: var(--radius-sm); color: var(--text-muted); }
.drawer-close:hover { background: var(--bg-soft); color: var(--heading); }
.drawer-close svg { width: 20px; height: 20px; }
.drawer-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.5rem; display: grid; gap: 1.25rem; align-content: start; }
.drawer-foot { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-2); }
.drawer-alert { margin: 0; }
.drawer-alert ul { margin: .3rem 0 0; padding-left: 1.1rem; font-weight: 500; }
.form-section { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem 1.15rem; margin: 0; display: grid; gap: 1rem; min-width: 0; }
.form-section legend { font-weight: 700; color: var(--heading); padding: 0 .35rem; }
.form-section .hint { margin: 0; }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawer-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 960px) { .drawer { width: 100vw; border-left: 0; } }
@media (max-width: 640px) { .drawer-head, .drawer-body, .drawer-foot { padding-inline: 1rem; } }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-backdrop { animation: none; } }
.text-danger { color: var(--danger); }
.btn-ghost.text-danger { color: var(--danger); }
.role-help { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.actions-col .cell-actions { flex-wrap: nowrap; justify-content: flex-end; }

/* ---------- Wide drawer (tickets) ---------- */
.drawer.drawer-wide { width: 80vw; }
@media (max-width: 960px) { .drawer.drawer-wide { width: 100vw; } }
.drawer-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.drawer-side { display: grid; gap: 1.25rem; }
@media (max-width: 1100px) { .drawer-cols { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Rich-text editor ---------- */
.rte { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.rte:focus-within { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); border-color: var(--focus); }
.rte.input-error { border-color: var(--danger); }
.rte.rte-drop { border-style: dashed; border-color: var(--link); background: var(--bg-soft); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem; padding: .35rem; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; position: sticky; top: 0; z-index: 1; }
.rte-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); cursor: pointer; padding: 0; }
.rte-btn svg { width: 17px; height: 17px; }
.rte-btn:hover { background: var(--bg-soft); }
.rte-btn[aria-pressed="true"] { background: var(--blue-soft); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
:root[data-theme="dark"] .rte-btn[aria-pressed="true"] { background: var(--bg-soft); color: var(--link); }
.rte-select { width: auto !important; min-height: 32px !important; height: 32px; padding: 0 .4rem !important; font-size: .85rem; border-radius: 6px !important; }
.rte-sep { width: 1px; height: 22px; background: var(--border); margin: 0 .25rem; }
.rte-color input[type=color] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.rte-swatch { position: absolute; left: 7px; right: 7px; bottom: 4px; height: 3px; border-radius: 2px; }
.rte-color svg { margin-bottom: 3px; }
.rte-area { min-height: 280px; max-height: 60vh; overflow-y: auto; padding: .8rem .9rem; outline: none; line-height: 1.55; resize: vertical; }
.rte-area:empty::before, .rte-area.rte-empty > p:first-child::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }
.rte-area img, .rich img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--border); }
.rte-area img.rte-uploading { opacity: .45; outline: 2px dashed var(--link); }
.rte-status { margin: 0; padding: 0 .9rem; font-size: .83rem; color: var(--text-muted); }
.rte-status:empty { display: none; }
.rte-status.rte-error { color: var(--danger); font-weight: 600; padding-bottom: .5rem; }
.rte-area blockquote, .rich blockquote { margin: .5rem 0; padding: .4rem .9rem; border-left: 4px solid var(--border-strong); color: var(--text-muted); }
.rte-area pre, .rich pre { background: var(--bg-muted); padding: .6rem .8rem; border-radius: 6px; overflow-x: auto; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
.rte-area p, .rich p { margin: 0 0 .5rem; }
.rte-area h2, .rich h2 { font-size: 1.3rem; margin: .6rem 0 .4rem; }
.rte-area h3, .rich h3 { font-size: 1.1rem; margin: .5rem 0 .3rem; }
.msg-body .rich { white-space: normal; }
.msg-body .rich > :last-child { margin-bottom: 0; }
.rte-compact .rte-area { min-height: 160px; }
.rte-files { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.rte-files li { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .4rem .25rem .6rem; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); font-size: .83rem; }
.rte-file-x { border: 0; background: transparent; color: var(--text-muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .2rem; border-radius: 50%; }
.rte-file-x:hover { color: var(--danger); }
.reply-panel { margin-bottom: 1.25rem; }
.timeline-title { font-size: 1.05rem; margin: 0 0 .75rem; }
.timeline + .panel { margin-top: 1.25rem; }
.contact-info { margin-top: .5rem; padding: .6rem .75rem; border-radius: var(--radius-sm); background: var(--info-bg); border: 1px solid var(--border); font-size: .88rem; }
.contact-info p { margin: 0; }
.contact-info p + p { margin-top: .2rem; }

/* ---------- Avatar and account menu ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; }
.avatar-initials { background: var(--navy); color: #fff; font-weight: 700; font-size: .82rem; letter-spacing: .02em; }
:root[data-theme="dark"] .avatar-initials { background: var(--blue); }
.avatar-xl { width: 88px; height: 88px; font-size: 1.6rem; }
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: flex; align-items: center; gap: .55rem; padding: .25rem .5rem .25rem .3rem; border: 1px solid transparent; border-radius: 999px; cursor: pointer; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: var(--bg-soft); border-color: var(--border); }
.user-menu-name { display: grid; line-height: 1.15; text-align: left; }
.user-menu-name strong { font-size: .9rem; color: var(--heading); }
.user-menu-name span { font-size: .75rem; color: var(--text-muted); }
.user-menu-caret { width: 16px; height: 16px; color: var(--text-muted); transition: transform .15s; }
.user-menu[open] .user-menu-caret { transform: rotate(180deg); }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 270px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .4rem; z-index: 50; }
.user-menu-head { display: flex; gap: .65rem; align-items: center; padding: .6rem .6rem .75rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.user-menu-head div { display: grid; min-width: 0; }
.user-menu-head strong { color: var(--heading); font-size: .92rem; }
.user-menu-head span { color: var(--text-muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-panel a, .user-menu-panel button { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .6rem; border: 0; background: transparent; border-radius: 7px; color: var(--text); text-decoration: none; font: inherit; font-size: .92rem; cursor: pointer; text-align: left; }
.user-menu-panel a:hover, .user-menu-panel button:hover, .user-menu-panel a:focus-visible, .user-menu-panel button:focus-visible { background: var(--bg-soft); color: var(--heading); }
.user-menu-panel svg { width: 18px; height: 18px; color: var(--text-muted); flex: none; }
.user-menu-panel .badge { margin-left: auto; }
.user-menu-panel form { margin: .3rem 0 0; padding-top: .3rem; border-top: 1px solid var(--border); }
@media (max-width: 640px) { .user-menu-name { display: none; } }

/* ---------- Profile ---------- */
.avatar-field { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }

/* ---------- Plan ---------- */
.plan-current h2 { margin: .1rem 0 .2rem; font-size: 1.5rem; }
.plan-current-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.billing-toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0 .9rem; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: .4rem .9rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .88rem; color: var(--text-muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; display: flex; flex-direction: column; gap: .6rem; }
.plan-card.is-current { border-color: var(--success); box-shadow: 0 0 0 1px var(--success) inset; }
.plan-card.is-highlight:not(.is-current) { border-color: var(--orange); }
.plan-card header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.plan-card h3 { margin: 0; font-size: 1.1rem; }
.plan-price { margin: 0; font-size: 1.6rem; font-weight: 800; color: var(--heading); line-height: 1.2; }
.plan-price small { font-size: .85rem; font-weight: 600; }
.plan-limits { list-style: none; padding: 0; margin: 0 0 .4rem; display: grid; gap: .3rem; align-content: start; font-size: .9rem; flex: 1; }
.plan-limits li::before { content: "✓ "; color: var(--success); font-weight: 800; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.danger-zone h2 { font-size: 1.05rem; margin: 0 0 .3rem; color: var(--danger); }

/* ---------- Usage ---------- */
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.usage-card .panel-body { display: grid; gap: .35rem; }
.usage-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.usage-head h2 { font-size: .95rem; margin: 0; color: var(--text-muted); }
.usage-value { margin: 0; font-size: 1.05rem; }
.usage-value strong { font-size: 1.8rem; color: var(--heading); }
.meter { height: 10px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--blue); border-radius: 99px; min-width: 3px; }
.meter.is-warn span { background: var(--orange); }
.meter.is-max span { background: var(--danger); }
.dl dd { overflow-wrap: anywhere; min-width: 0; }
.trial-box { margin: 1rem 0 0; }
.card-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.card-info { font-weight: 600; color: var(--heading); }
.card-chip { display: inline-block; padding: .1rem .5rem; border-radius: 5px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 700; margin-right: .35rem; }
.list-table .num, .list-table td.small { white-space: nowrap; }
/* ---------- Agents ---------- */
.agent-cell { display: flex; align-items: center; gap: .6rem; }
.presence { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; vertical-align: middle; }
.presence.is-on { background: var(--success); box-shadow: 0 0 0 2px color-mix(in srgb, var(--success) 25%, transparent); }
.presence.is-away { background: var(--orange); }
.role-options { display: grid; gap: .5rem; }
.role-option { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; margin: 0; }
.role-option:has(input:checked) { border-color: var(--link); background: var(--bg-soft); }
.role-option input { margin-top: .25rem; }
.role-option strong { display: block; color: var(--heading); }
.role-option small { color: var(--text-muted); font-size: .83rem; }
.dept-grid { display: grid; gap: .35rem; }
.dept-row { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; align-items: center; }
.dept-row .checkbox { margin: 0; }
.hours-grid { display: grid; grid-template-columns: minmax(120px, auto) 1fr auto 1fr; gap: .45rem .6rem; align-items: center; }
.hours-grid .hours-day { margin: 0; }
.hours-grid input[type=time] { min-height: 38px; padding: .35rem .5rem; }
.user-menu-panel form.menu-inline { margin: 0; padding: 0; border: 0; }
/* ---------- Live chat console ---------- */
.nav-badge { margin-left: auto; background: var(--orange); color: var(--navy); border-radius: 999px; font-size: .72rem; font-weight: 800; padding: 0 .45rem; line-height: 1.35rem; min-width: 1.35rem; text-align: center; }
.chat-head { margin-bottom: .75rem; }
.chat-stats { margin-bottom: 1rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.chat-me { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; background: var(--warning-bg); color: var(--warning); border-radius: var(--radius-sm); padding: .6rem .9rem; margin-bottom: 1rem; font-weight: 600; font-size: .92rem; }
.chat-console { display: grid; grid-template-columns: 300px minmax(0, 1fr) 280px; gap: 1rem; height: calc(100vh - 290px); min-height: 520px; }
.chat-console > * { min-height: 0; }
.chat-lists { overflow-y: auto; display: grid; align-content: start; gap: 1rem; padding-right: .25rem; }
.chat-lists h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 0 0 .45rem; display: flex; align-items: center; gap: .4rem; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.chat-cards { display: grid; gap: .45rem; }
.chat-card { text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .7rem; cursor: pointer; display: grid; gap: .15rem; position: relative; color: var(--text); font: inherit; }
.chat-card:hover { border-color: var(--border-strong); }
.chat-card.is-open { border-color: var(--link); box-shadow: 0 0 0 2px color-mix(in srgb, var(--link) 25%, transparent); }
.chat-card-top { display: flex; justify-content: space-between; gap: .5rem; }
.chat-card-top strong { color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-since { font-size: .78rem; color: var(--text-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.chat-since.wait { color: var(--warning); font-weight: 700; }
.chat-card-sub { font-size: .78rem; color: var(--text-muted); }
.chat-card-msg { font-size: .84rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-unread { position: absolute; right: .6rem; bottom: .55rem; background: var(--orange); color: var(--navy); font-size: .68rem; font-weight: 800; border-radius: 999px; padding: 0 .4rem; text-transform: uppercase; }
.chat-stars { color: #F59E0B; letter-spacing: .05em; }
.chat-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--text-muted); }
.chat-empty svg { width: 48px; height: 48px; opacity: .45; }
.chat-conv { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.chat-conv[hidden] { display: none; }
.chat-conv-head { display: flex; justify-content: space-between; gap: .75rem; align-items: center; padding: .7rem .9rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.chat-who { display: flex; gap: .6rem; align-items: center; min-width: 0; }
.chat-who strong { color: var(--heading); }
.chat-conv-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.chat-timer { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: .85rem; margin-right: .25rem; }
.chat-panel { border-bottom: 1px solid var(--border); background: var(--bg-muted); padding: .75rem .9rem; }
.chat-transfer { display: grid; gap: .5rem; }
.chat-transfer select { max-width: 100%; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .55rem; background: var(--bg-muted); }
.chat-log.drag { outline: 2px dashed var(--orange); outline-offset: -8px; }
.chat-row { display: flex; }
.chat-row.out { justify-content: flex-end; }
.chat-bubble { max-width: 72%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: .45rem .75rem .35rem; overflow-wrap: anywhere; }
.chat-row.out .chat-bubble { background: var(--blue-soft); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.chat-row.bot .chat-bubble { background: #F3E8FF; }
:root[data-theme="dark"] .chat-row.out .chat-bubble { background: #17406E; }
:root[data-theme="dark"] .chat-row.bot .chat-bubble { background: #3B2466; }
.chat-author { display: block; font-size: .74rem; font-weight: 700; color: var(--heading); }
.chat-text { white-space: pre-wrap; }
.chat-time { display: block; text-align: right; font-size: .7rem; color: var(--text-muted); }
.chat-img img { display: block; max-width: 280px; max-height: 240px; border-radius: 8px; margin-top: .3rem; }
.chat-sys { align-self: center; font-size: .78rem; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: .15rem .75rem; text-align: center; }
.chat-typing { padding: .25rem 1rem; font-size: .8rem; color: var(--text-muted); font-style: italic; background: var(--bg-muted); }
.chat-compose { border-top: 1px solid var(--border); padding: .7rem .8rem; position: relative; }
.chat-input { display: flex; gap: .5rem; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; }
.icon-btn { background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); padding: .55rem; cursor: pointer; display: inline-flex; }
.icon-btn:hover { color: var(--heading); border-color: var(--border-strong); }
.chat-accept, .chat-closed { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.chat-accept p, .chat-closed p { margin: 0; }
.quick-pop { position: absolute; left: .8rem; right: .8rem; bottom: calc(100% - .2rem); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-height: 260px; overflow-y: auto; z-index: 5; }
.quick-opt { display: block; width: 100%; text-align: left; background: none; border: 0; padding: .5rem .75rem; cursor: pointer; color: var(--text); font: inherit; }
.quick-opt.on, .quick-opt:hover { background: var(--bg-soft); }
.chat-info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem; overflow-y: auto; }
.chat-info h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 0 0 .5rem; }
.chat-info .dl { margin-bottom: 1rem; }
.chat-info dd { overflow-wrap: anywhere; }
.chat-toast { position: fixed; right: 1.25rem; bottom: 1.25rem; background: var(--navy); color: #fff; padding: .65rem 1rem; border-radius: var(--radius-sm); box-shadow: var(--shadow); z-index: 1000; max-width: 360px; }
.chat-toast.bad { background: var(--danger); }
.qr-list { display: grid; gap: .6rem; margin-top: 1.25rem; }
.qr-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.qr-item p { margin: .3rem 0; white-space: pre-wrap; }
.qr-head { display: flex; gap: .5rem; align-items: center; justify-content: space-between; }
@media (max-width: 1200px) { .chat-console { grid-template-columns: 280px minmax(0, 1fr); } .chat-info { display: none; } }
@media (max-width: 800px) { .chat-console { grid-template-columns: 1fr; height: auto; } .chat-main { min-height: 70vh; } }
/* Ticket view: chat transcript */
.chat-transcript { display: grid; gap: .45rem; padding: .9rem 1rem; background: var(--bg-muted); max-height: 520px; overflow-y: auto; }
.chat-transcript .chat-bubble { max-width: 80%; }
/* Chat settings */
.channel-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; gap: .6rem; background: var(--surface); }
.channel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; }
.channel-head h3 { margin: 0; color: var(--heading); font-size: 1.05rem; display: flex; gap: .5rem; align-items: center; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--border); }
.code-box { background: #0F1F33; color: #E4ECF6; border-radius: var(--radius-sm); padding: .6rem .75rem; font: .8rem/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0; }
.channel-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.channels { display: grid; gap: 1rem; }
.chat-console [hidden], .chat-me[hidden], .chat-console[hidden] { display: none !important; }
.chat-console:has(> .chat-info[hidden]) { grid-template-columns: 300px minmax(0, 1fr); }
.chat-info .dl { grid-template-columns: 88px 1fr; font-size: .85rem; }
/* ---------- Data import ---------- */
.import-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.import-card .panel-body { display: grid; gap: .5rem; }
.import-steps { margin: .25rem 0 .75rem; padding-left: 1.25rem; }
.import-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: .5rem 1.25rem; margin-bottom: 1rem; }
.import-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr); gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--border); }
.import-row label { margin: 0; }
.import-preview-title { font-size: .95rem; color: var(--heading); margin: 1rem 0 .4rem; }
.import-preview td, .import-preview th { white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.import-errors { margin: .4rem 0 0; padding-left: 1rem; font-size: .8rem; max-height: 220px; overflow-y: auto; }
/* ---------- Promotion (Black Friday) ---------- */
.promo-banner { display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; background: #0F1F33; color: #fff; border-radius: var(--radius); padding: .8rem 1.1rem; margin: 0 auto 1.5rem; max-width: 900px; text-align: center; font-weight: 600; }
.promo-tag { background: var(--orange); color: var(--navy); border-radius: 999px; padding: .2rem .75rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
.promo-badge { background: #0F1F33; color: #fff; width: fit-content; align-self: flex-start; }
.old-price { color: var(--text-muted); font-size: 1.05rem; font-weight: 600; margin-bottom: -.35rem; }
.old-price s { text-decoration-thickness: 2px; text-decoration-color: var(--danger); }
.plan-old { display: block; color: var(--text-muted); font-size: .95rem; font-weight: 600; }
.plan-old s { text-decoration-color: var(--danger); text-decoration-thickness: 2px; }
/* ---------- Ticket list signals ---------- */
.quick-views { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .85rem; }
.qv { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: .88rem; }
.qv:hover { border-color: var(--border-strong); }
.qv.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.qv-count { background: var(--bg-muted); color: var(--text-muted); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; line-height: 1.35rem; min-width: 1.35rem; text-align: center; }
.qv-count.is-hot { background: var(--orange); color: var(--navy); }
.qv.is-active .qv-count { background: rgba(255,255,255,.18); color: #fff; }
.sig { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; flex-shrink: 0; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px rgba(12,45,86,.12); }
.sig-late { background: #DC2626; }
.sig-replied { background: #F97316; }
.sig-new { background: #2563EB; }
.sig-waiting { background: #EAB308; }
.sig-answered { background: #16A34A; }
.sig-done { background: #94A3B8; }
.sig-mine { background: var(--orange); border-radius: 3px; }
.sig-unread { background: var(--link); }
.sig-col { width: 28px; padding-right: 0 !important; text-align: center; }
tr.is-unread td { background: color-mix(in srgb, var(--blue-soft) 55%, transparent); }
tr.is-unread .t-subject { font-weight: 800; }
tr.is-mine td:first-child { box-shadow: inset 4px 0 0 var(--orange); }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--link); margin-right: .4rem; vertical-align: middle; }
.badge-replied { background: #FFEDD5; color: #9A3412; }
.badge-new { background: #DBEAFE; color: #1E40AF; }
.badge-mine { background: var(--orange); color: var(--navy); }
:root[data-theme="dark"] .badge-replied { background: #5A2A0A; color: #FED7AA; }
:root[data-theme="dark"] .badge-new { background: #1E3A8A; color: #DBEAFE; }
.sig-legend { display: flex; flex-wrap: wrap; gap: .45rem 1.1rem; padding: .75rem 1rem; border-top: 1px solid var(--border); font-size: .8rem; color: var(--text-muted); }
.sig-legend > span { display: inline-flex; align-items: center; gap: .4rem; }
.transfer-pick { margin-top: .6rem; padding: .65rem .75rem; border: 1px solid var(--border); border-left: 3px solid var(--orange); border-radius: var(--radius-sm); background: var(--bg-muted); }
.transfer-pick label { margin-top: 0; }
.svc-tag { display: inline-block; background: var(--blue-soft); color: var(--heading); border-radius: 4px; padding: 0 .35rem; font-weight: 600; font-size: .76rem; }
.svc-bar { display: flex; align-items: center; gap: .5rem; min-width: 140px; }
.svc-bar .track { flex: 1; height: 8px; background: var(--bg-muted); border-radius: 4px; overflow: hidden; display: block; }
.svc-bar .fill { display: block; height: 100%; background: var(--blue); border-radius: 4px; }

/* Combobox (requester search in the new ticket form) */
.combo { position: relative; }
.combo-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: .25rem; list-style: none; max-height: 18rem; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow), 0 12px 28px rgba(12, 45, 86, .14); }
.combo-list[hidden] { display: none; }
.combo-list li[role=option] { display: grid; grid-template-columns: 1fr auto; gap: .1rem .5rem; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; }
.combo-list li[role=option]:hover, .combo-list li[aria-selected=true] { background: var(--info-bg); }
.combo-name { font-weight: 600; font-size: .9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-sub { grid-column: 1 / -1; font-size: .8rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-tag { font-size: .7rem; padding: .05rem .4rem; border-radius: 999px; border: 1px solid var(--border); color: var(--text-muted); align-self: center; }
.combo-list mark { background: transparent; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.combo-empty { padding: .5rem .6rem; font-size: .85rem; color: var(--text-muted); }

/* Receive e-mail (settings) and e-mails under review */
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 .75rem; font-size: .9rem; }
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; }
.form-inline { display: flex; gap: .5rem; align-items: center; }
.form-inline input { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.block-list { list-style: none; margin: .75rem 0 0; padding: 0; }
.block-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.block-list .mono { word-break: break-all; }
.mail-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 1rem 1.1rem; }
.mail-card + .mail-card { margin-top: .75rem; }
.mail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; }
.mail-from { font-weight: 600; color: var(--heading); }
.mail-subject { margin: .35rem 0 .25rem; font-size: 1rem; }
.mail-body { margin: .5rem 0 0; white-space: pre-wrap; font: inherit; font-size: .9rem; max-height: 14rem; overflow: auto; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.mail-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; align-items: center; }
.mail-actions form { margin: 0; }
.review-banner { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin: 0 0 1rem; }
.form-row-imap { grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, .8fr); }
@media (max-width: 640px) { .form-row-imap { grid-template-columns: minmax(0, 1fr); } }
