/* Luradesk — 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); }
.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: 1020px) {
  .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); }
.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[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=url], input[type=date], 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); }
.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; }
