/* ============================================================
   RenewBuddy OS — Design System  (LIGHT · clinical)
   Deep healthcare blue · emerald · teal accent
   Type: Schibsted Grotesk (display) · Hanken Grotesk (body) · JetBrains Mono (data)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700;800;900&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* surfaces */
  --bg:        #F6F8FC;
  --bg-2:      #FFFFFF;
  --surface:   #FFFFFF;
  --surface-2: #F3F6FB;
  --surface-3: #E9EFF7;
  --border:        #E3EAF3;
  --border-strong: #CFDAE8;

  /* text */
  --text:       #0C1B33;
  --text-muted: #51617A;
  --text-faint: #8593A8;

  /* brand */
  --blue:    #1A5FE0;
  --blue-700:#0E47B8;
  --blue-50: #EAF1FF;
  --teal:    #0FB3C2;
  --teal-700:#0A8C99;
  --teal-300:#B9F0F5;
  --teal-50: #E4F7F9;
  --emerald: #0FA968;
  --emerald-50:#E4F6EE;
  --amber:   #D98613;
  --amber-50:#FBF1DF;
  --red:     #E5484D;
  --red-50:  #FCEBEB;
  --violet:  #6D5FE0;
  --violet-50:#EEEBFB;

  /* icon chip colours */
  --ic-blue-bg:    var(--blue-50);    --ic-blue-fg:    var(--blue);
  --ic-teal-bg:    var(--teal-50);    --ic-teal-fg:    var(--teal-700);
  --ic-emerald-bg: var(--emerald-50); --ic-emerald-fg: var(--emerald);
  --ic-violet-bg:  var(--violet-50);  --ic-violet-fg:  var(--violet);
  --ic-amber-bg:   var(--amber-50);   --ic-amber-fg:   var(--amber);
  --ic-red-bg:     var(--red-50);     --ic-red-fg:     var(--red);

  /* gradients */
  --grad-brand: linear-gradient(120deg, var(--blue) 0%, var(--teal) 100%);
  --grad-soft:  linear-gradient(135deg, var(--blue-50), var(--teal-50));

  /* radii */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* shadows */
  --shadow-sm: 0 1px 2px rgba(16,42,77,.06), 0 1px 1px rgba(16,42,77,.04);
  --shadow:    0 14px 34px -16px rgba(16,42,77,.22);
  --shadow-lg: 0 36px 80px -36px rgba(16,42,77,.34);
  --glow-blue: 0 24px 60px -30px rgba(26,95,224,.45);

  /* layout */
  --maxw:  1200px;
  --nav-h: 70px;

  --font-display: 'Schibsted Grotesk', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ================================================================
   RESET
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* ambient background */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(900px 540px at 82% -10%, rgba(26,95,224,.08), transparent 60%),
    radial-gradient(720px 460px at 4% 2%, rgba(15,179,194,.07), transparent 58%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(16,42,77,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,42,77,.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 72%);
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.06; letter-spacing: -.02em; color: var(--text); }
::selection { background: rgba(26,95,224,.18); color: var(--blue-700); }

/* ================================================================
   LAYOUT
   ================================================================ */
.container  { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section    { padding-block: 104px; position: relative; }
.section-sm { padding-block: 70px; }
.bg-tint    { background: linear-gradient(180deg,#fff,var(--bg)); border-block: 1px solid var(--border); }

/* ================================================================
   TYPOGRAPHY UTILITIES
   ================================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--teal-700);
  display: inline-flex; align-items: center; gap: 9px; font-weight: 600;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--teal); display: inline-block; border-radius: 2px; }
.section-head { max-width: 680px; }
.section-head h2 { font-size: clamp(30px,4vw,46px); margin: 16px 0; }
.section-head p { color: var(--text-muted); font-size: 18px; line-height: 1.6; }
.gradient-text { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 20px; border-radius: var(--r); border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
  white-space: nowrap; cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 10px 22px -10px rgba(26,95,224,.6); }
.btn-primary:hover { background: var(--blue-700); box-shadow: 0 14px 30px -10px rgba(26,95,224,.7); transform: translateY(-1px); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-700); }
.btn-lg { padding: 15px 26px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn svg { width: 17px; height: 17px; }

/* ================================================================
   CHIPS / BADGES / TAGS
   ================================================================ */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .02em;
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px solid var(--border-strong); background: #fff; color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-green  { background: var(--emerald); box-shadow: 0 0 0 3px var(--emerald-50); }
.dot-amber  { background: var(--amber);   box-shadow: 0 0 0 3px var(--amber-50); }
.dot-red    { background: var(--red);     box-shadow: 0 0 0 3px var(--red-50); }
.dot-blue   { background: var(--blue);    box-shadow: 0 0 0 3px var(--blue-50); }

.tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .03em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; font-weight: 500; white-space: nowrap; }
.tag-green { color: var(--emerald); background: var(--emerald-50); }
.tag-amber { color: var(--amber);   background: var(--amber-50); }
.tag-red   { color: var(--red);     background: var(--red-50); }
.tag-blue  { color: var(--blue);    background: var(--blue-50); }
.tag-violet{ color: var(--violet);  background: var(--violet-50); }

/* ================================================================
   CARDS
   ================================================================ */
.card     { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card-pad { padding: 26px; }

/* ================================================================
   ICON CHIPS
   ================================================================ */
.ic-blue    { background: var(--blue-50);    color: var(--blue); }
.ic-teal    { background: var(--teal-50);    color: var(--teal-700); }
.ic-emerald { background: var(--emerald-50); color: var(--emerald); }
.ic-violet  { background: var(--violet-50);  color: var(--violet); }
.ic-amber   { background: var(--amber-50);   color: var(--amber); }
.ic-red     { background: var(--red-50);     color: var(--red); }

/* ================================================================
   MARKETING NAVBAR
   ================================================================ */
.nav {
  position: sticky; top: 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.82); backdrop-filter: blur(16px) saturate(140%);
}
.nav .container { display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 11px; flex: none; }
.brand img { height: 30px; width: auto; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; color: var(--text); }
.brand-name b { color: var(--teal-700); font-weight: 800; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--text-muted); padding: 8px 13px; border-radius: 9px; transition: color .15s, background .15s; }
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--blue-700); font-weight: 600; }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-cta .btn { padding: 9px 16px; font-size: 14px; }
.menu-toggle { display: none; background: #fff; border: 1px solid var(--border-strong); border-radius: 9px; width: 40px; height: 40px; color: var(--text); align-items: center; justify-content: center; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer { border-top: 1px solid var(--border); background: #fff; padding-block: 62px 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4,1fr); gap: 40px; }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 14.5px; max-width: 280px; }
.footer-col h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; color: var(--text-muted); font-size: 14.5px; padding: 6px 0; transition: color .15s; }
.footer-col a:hover { color: var(--blue-700); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 46px; padding-top: 26px; border-top: 1px solid var(--border); color: var(--text-faint); font-size: 13px; }
.footer-bottom .badges { display: flex; gap: 10px; flex-wrap: wrap; }

/* ================================================================
   KPI WIDGET
   ================================================================ */
.kpi { padding: 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.kpi-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.kpi-value { font-family: var(--font-display); font-weight: 700; font-size: 30px; margin-top: 8px; letter-spacing: -.02em; }
.kpi-delta { font-family: var(--font-mono); font-size: 12px; margin-top: 4px; }
.up { color: var(--emerald); }
.down { color: var(--red); }

/* ================================================================
   CTA BAND
   ================================================================ */
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.cta-band {
  border-radius: var(--r-xl); padding: 58px; text-align: center;
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(600px 300px at 80% 120%, rgba(15,179,194,.55), transparent 60%),
              linear-gradient(135deg, #0E47B8, #1A5FE0 55%, #0E8F9C);
  box-shadow: var(--glow-blue);
}
.cta-band .eyebrow { color: #B9F0F5; justify-content: center; }
.cta-band .eyebrow::before { background: #B9F0F5; }
.cta-band h2 { font-size: clamp(30px,4vw,44px); margin-bottom: 16px; color: #fff; }
.cta-band p  { color: rgba(255,255,255,.86); font-size: 18px; max-width: 560px; margin: 0 auto 30px; }
.cta-band .hero-cta { justify-content: center; }
.cta-band .btn-ghost   { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); color: #fff; box-shadow: none; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.2); color: #fff; }
.cta-band .btn-primary { background: #fff; color: var(--blue-700); }
.cta-band .btn-primary:hover { background: #fff; }

/* ================================================================
   FORMS
   ================================================================ */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color: var(--text); }
.input, .textarea, select.input {
  width: 100%; padding: 12px 14px;
  font-family: var(--font-body); font-size: 14.5px;
  color: var(--text); background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  transition: border-color .15s, box-shadow .15s; outline: none;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.input:focus, .textarea:focus, select.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
.input.is-invalid { border-color: var(--red); }
.input.is-invalid:focus { box-shadow: 0 0 0 4px var(--red-50); }
.field-error { font-size: 12.5px; color: var(--red); margin-top: 6px; font-weight: 500; }
.textarea { resize: vertical; min-height: 130px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.input-wrap { position: relative; }
.input-wrap .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); width: 17px; height: 17px; pointer-events: none; }
.input-wrap .input { padding-left: 40px; }
.input-wrap .toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-faint); font-size: 12px; font-family: var(--font-mono); font-weight: 600; letter-spacing: .04em; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-muted); cursor: pointer; }
.checkbox input { margin-top: 3px; accent-color: var(--blue); width: 16px; height: 16px; flex-shrink: 0; }
.form-divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--text-faint); font-size: 12px; font-family: var(--font-mono); }
.form-divider::before, .form-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.social-btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 11px; border-radius: var(--r); background: #fff; border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; font-size: 14px; transition: .15s; box-shadow: var(--shadow-sm); cursor: pointer; }
.social-btn:hover { background: var(--surface-2); border-color: var(--blue); }

/* ================================================================
   AUTH LAYOUT
   ================================================================ */
.auth { min-height: calc(100vh - var(--nav-h)); display: grid; grid-template-columns: 1.05fr 1fr; }
.auth-aside {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(700px 420px at 80% 110%, rgba(15,179,194,.5), transparent 60%),
    linear-gradient(160deg, #0E47B8 0%, #1A5FE0 48%, #0E8F9C 110%);
  padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-aside::after {
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 70% 30%, #000, transparent 75%);
}
.auth-aside .a-top { position: relative; z-index: 1; }
.auth-aside .a-top .brand { margin-bottom: 40px; }
.auth-aside .brand-name { color: #fff; }
.auth-aside .brand-name b { color: #B9F0F5; }
.auth-aside h2 { font-size: 34px; line-height: 1.12; margin-bottom: 16px; color: #fff; }
.auth-aside .lede { color: rgba(255,255,255,.82); font-size: 16px; max-width: 420px; }
.auth-feature { display: flex; gap: 13px; align-items: flex-start; margin-top: 18px; position: relative; z-index: 1; }
.auth-feature .chk { width: 24px; height: 24px; border-radius: 8px; background: rgba(255,255,255,.16); color: #fff; display: grid; place-items: center; flex: none; }
.auth-feature .chk svg { width: 13px; height: 13px; }
.auth-feature h4 { font-size: 14.5px; font-family: var(--font-body); font-weight: 700; color: #fff; margin-bottom: 3px; }
.auth-feature p { font-size: 13px; color: rgba(255,255,255,.72); }
.auth-quote { position: relative; z-index: 1; border-left: 3px solid rgba(255,255,255,.5); padding-left: 16px; color: rgba(255,255,255,.9); font-size: 14.5px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 28px; background: var(--bg); }
.auth-card { width: 100%; max-width: 412px; }
.auth-card .a-h { margin-bottom: 24px; }
.auth-card .a-h h1 { font-size: 28px; margin-bottom: 8px; }
.auth-card .a-h p { color: var(--text-muted); font-size: 14.5px; }
.auth-foot { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--text-muted); }
.auth-foot a { color: var(--blue-700); font-weight: 600; }
.mobile-brand { display: none; }

/* password strength */
.strength { display: flex; gap: 5px; margin-top: 9px; }
.strength .seg { flex: 1; height: 4px; border-radius: 3px; background: var(--surface-3); transition: background .2s; }
.strength-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-top: 7px; }

/* role picker */
.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
.role-opt { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; transition: .15s; font-size: 13.5px; font-weight: 600; color: var(--text); }
.role-opt:hover { border-color: var(--blue); background: var(--blue-50); }
.role-opt.sel { border-color: var(--blue); background: linear-gradient(180deg,rgba(26,95,224,.08),transparent); }
.role-opt .ri { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.role-opt .ri svg { width: 16px; height: 16px; }

/* ================================================================
   PRICING
   ================================================================ */
.bill-toggle { display: inline-flex; align-items: center; gap: 8px; padding: 5px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: #fff; box-shadow: var(--shadow-sm); }
.bill-toggle button { border: none; background: none; color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; letter-spacing: .03em; padding: 8px 16px; border-radius: var(--r-pill); transition: .15s; }
.bill-toggle button.active { background: var(--blue); color: #fff; font-weight: 600; }
.price-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 44px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; padding: 30px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); position: relative; }
.price-card.featured { border-color: var(--blue); box-shadow: var(--glow-blue); }
.price-card .ribbon { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: var(--r-pill); background: var(--blue); color: #fff; font-weight: 600; }
.price-card .plan { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-700); }
.price-card .amt { font-family: var(--font-display); font-weight: 800; font-size: 46px; letter-spacing: -.03em; margin: 16px 0 2px; }
.price-card .amt small { font-size: 15px; font-weight: 500; color: var(--text-faint); font-family: var(--font-body); }
.price-feats { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 8px; }
.price-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--text-muted); }
.price-feats li svg { width: 16px; height: 16px; color: var(--emerald); flex: none; margin-top: 2px; }

/* ================================================================
   PAGE HERO (inner pages)
   ================================================================ */
.page-hero { padding-block: 76px 52px; text-align: center; position: relative; }
.page-hero .eyebrow { justify-content: center; }
.page-hero h1 { font-size: clamp(36px,5vw,56px); font-weight: 800; letter-spacing: -.035em; margin: 16px 0 18px; }
.page-hero p { color: var(--text-muted); font-size: 19px; max-width: 620px; margin: 0 auto; line-height: 1.6; }

/* ================================================================
   ABOUT
   ================================================================ */
.stat-band { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat-band .s { text-align: center; padding: 28px 18px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-band .s .v { font-family: var(--font-display); font-weight: 800; font-size: 42px; letter-spacing: -.03em; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-band .s .l { font-size: 13.5px; color: var(--text-muted); margin-top: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.value-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: 44px; }
.value { padding: 26px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.value .vi { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 16px; }
.value .vi svg { width: 22px; height: 22px; }
.value h3 { font-size: 18px; margin-bottom: 9px; }
.value p { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ================================================================
   CONTACT
   ================================================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: start; }
.contact-method { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.contact-method .ci { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.contact-method .ci svg { width: 20px; height: 20px; }
.contact-method h4 { font-size: 15px; font-weight: 700; }
.contact-method p,a { color: var(--text-muted); font-size: 13.5px; }
.contact-method a { color: var(--blue-700); }

/* ================================================================
   REVEAL ANIMATION
   ================================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ================================================================
   TOAST NOTIFICATIONS
   ================================================================ */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; min-width: 300px; max-width: 400px; }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); pointer-events: all; animation: toast-in .3s cubic-bezier(.34,1.56,.64,1); }
.toast.toast-success { border-left: 3px solid var(--emerald); }
.toast.toast-error   { border-left: 3px solid var(--red); }
.toast.toast-warning { border-left: 3px solid var(--amber); }
.toast.toast-info    { border-left: 3px solid var(--blue); }
.toast-body { flex: 1; }
.toast-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.toast-msg { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.toast-close { background: none; border: none; color: var(--text-faint); font-size: 16px; line-height: 1; padding: 0; }
@keyframes toast-in { from { transform: translateX(110%) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }

/* ================================================================
   APP SHELL (Sidebar + Topbar)
   ================================================================ */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }

/* sidebar */
.side { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow-y: auto; z-index: 50; }
.side::-webkit-scrollbar { width: 0; }
.side-top { padding: 18px 18px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.side-top .brand img { height: 28px; }
.side-top .brand-name { font-size: 18px; }
.org-switch { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 9px 11px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: border-color .15s; }
.org-switch:hover { border-color: var(--border-strong); }
.org-switch .av { width: 30px; height: 30px; border-radius: 8px; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.org-switch .nm { font-size: 13px; font-weight: 600; line-height: 1.2; min-width: 0; flex: 1; }
.org-switch .nm small { display: block; font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); font-weight: 400; }
.org-switch svg { width: 15px; height: 15px; color: var(--text-faint); flex-shrink: 0; }

.side-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.side-nav::-webkit-scrollbar { width: 0; }
.nav-group { margin-bottom: 16px; }
.nav-group h6 { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); padding: 0 10px 8px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 10px; color: var(--text-muted); font-size: 14px; font-weight: 500; cursor: pointer; transition: .14s; position: relative; border: none; background: none; width: 100%; text-align: left; font-family: inherit; text-decoration: none; }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--blue-50); color: var(--blue-700); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
.nav-item .badge { margin-left: auto; font-family: var(--font-mono); font-size: 10px; padding: 2px 7px; border-radius: 999px; background: var(--red-50); color: var(--red); }
.nav-item .badge.b-amber { background: var(--amber-50); color: var(--amber); }

.side-foot { padding: 14px; border-top: 1px solid var(--border); flex-shrink: 0; }
.plan-card { padding: 14px; border-radius: var(--r); background: linear-gradient(135deg,var(--blue-50),var(--teal-50)); border: 1px solid var(--border); }
.plan-card .t { font-size: 13px; font-weight: 700; }
.plan-card .s { font-size: 12px; color: var(--text-muted); margin: 3px 0 10px; }
.plan-bar { height: 6px; border-radius: 6px; background: rgba(16,42,77,.1); overflow: hidden; margin-bottom: 10px; }
.plan-bar i { display: block; height: 100%; background: var(--grad-brand); border-radius: 6px; }

/* topbar */
.main { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.topbar { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(255,255,255,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar .page-t { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.topbar .search { display: flex; align-items: center; gap: 9px; flex: 1; max-width: 340px; padding: 8px 13px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-faint); font-size: 13px; cursor: pointer; }
.topbar .search svg { width: 15px; height: 15px; flex-shrink: 0; }
.topbar .t-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; color: var(--text-muted); position: relative; cursor: pointer; }
.icon-btn:hover { color: var(--blue-700); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .ndot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.topbar .me { display: flex; align-items: center; gap: 9px; padding-left: 6px; cursor: pointer; }
.topbar .me .av { width: 34px; height: 34px; border-radius: 10px; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.topbar .me .nm { font-size: 13px; font-weight: 600; line-height: 1.2; }
.topbar .me .nm small { display: block; font-size: 11px; color: var(--text-faint); font-weight: 400; }

/* content area */
.content { padding: 26px 28px 60px; }

/* ================================================================
   DASHBOARD WIDGETS
   ================================================================ */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 20px; }
.stat { padding: 18px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat .top { display: flex; align-items: center; justify-content: space-between; }
.stat .ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.stat .ic svg { width: 18px; height: 18px; }
.stat .lab { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); margin-top: 14px; }
.stat .val { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; margin-top: 4px; }
.stat .delta { font-family: var(--font-mono); font-size: 11.5px; margin-top: 3px; }

/* strip variants */
.strip-g { border-left: 3px solid var(--emerald); }
.strip-a { border-left: 3px solid var(--amber); }
.strip-r { border-left: 3px solid var(--red); }
.strip-b { border-left: 3px solid var(--blue); }

/* grids */
.grid-2  { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.grid-2b { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3  { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* panel */
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.panel-h h3 { font-size: 15.5px; font-weight: 700; }
.panel-h .link { font-size: 12.5px; color: var(--blue-700); font-weight: 600; font-family: var(--font-mono); cursor: pointer; text-decoration: none; }
.panel-b { padding: 20px; }

/* segmented control */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 3px; }
.seg button { border: none; background: none; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); padding: 5px 11px; border-radius: 6px; cursor: pointer; }
.seg button.active { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); font-weight: 600; }

/* page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 26px; letter-spacing: -.025em; }
.page-head p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.page-head .ph-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* SVG chart */
.chart { height: 200px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-l { font-family: var(--font-mono); font-size: 9px; fill: var(--text-faint); }

/* bar chart */
.barc { display: flex; align-items: flex-end; gap: 10px; height: 180px; padding-top: 10px; }
.barc .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.barc .col .b { width: 100%; max-width: 38px; border-radius: 6px 6px 0 0; background: var(--blue); transition: height .8s cubic-bezier(.2,.8,.2,1); }
.barc .col .b.t { background: var(--teal); }
.barc .col .lab { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }

/* donut */
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; margin: 0 auto; }
.donut .center { position: absolute; inset: 27px; border-radius: 50%; background: #fff; display: grid; place-content: center; text-align: center; z-index: 2; }
.donut .center .v { font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.donut .center .l { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; }
.legend { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.legend .li { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-muted); }
.legend .li .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.legend .li b { margin-left: auto; color: var(--text); font-family: var(--font-mono); font-size: 12px; }

/* data table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); padding: 10px 16px; border-bottom: 1px solid var(--border); font-weight: 500; background: var(--surface-2); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .u { display: flex; align-items: center; gap: 10px; }
.table .u .av { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-3); color: var(--blue-700); display: grid; place-items: center; font-family: var(--font-mono); font-size: 11px; font-weight: 600; flex: none; }
.table .u .nm { font-weight: 600; font-size: 13.5px; }
.table .u .sub { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.table .right { text-align: right; }
.row-action { color: var(--text-faint); cursor: pointer; padding: 4px 8px; border-radius: 6px; border: none; background: none; font-size: 16px; }
.row-action:hover { background: var(--surface-3); color: var(--text); }

/* progress bar */
.pbar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; width: 100%; min-width: 80px; }
.pbar i { display: block; height: 100%; border-radius: 6px; }
.pbar i.g { background: var(--emerald); }
.pbar i.a { background: var(--amber); }
.pbar i.b { background: var(--blue); }
.pbar i.r { background: var(--red); }

/* license cards */
.lic-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.lic-card { border-radius: var(--r-lg); border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.lic-card .lc-top { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: space-between; }
.lic-card .lc-type { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-faint); }
.lic-card .lc-name { font-size: 16px; font-weight: 700; margin-top: 3px; }
.lic-card .lc-body { padding: 16px 18px; }
.lic-card .lc-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; }
.lic-card .lc-row span:first-child { color: var(--text-faint); font-family: var(--font-mono); font-size: 11px; }
.lic-card .lc-foot { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; gap: 8px; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.kcol { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 12px; }
.kcol .kh { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 12px; padding: 0 4px; }
.kcol .kh .ct { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; }
.kcard { background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 13px; margin-bottom: 10px; box-shadow: var(--shadow-sm); cursor: grab; }
.kcard:last-child { margin-bottom: 0; }
.kcard .kt { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.kcard .km { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); }
.kcard .kf { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.kcard .kf .av { width: 24px; height: 24px; border-radius: 7px; background: var(--surface-3); color: var(--blue-700); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 600; }

/* scheduler */
.sched { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.sched-row { display: grid; grid-template-columns: 160px repeat(7,1fr); border-bottom: 1px solid var(--border); }
.sched-row:last-child { border-bottom: 0; }
.sched-row.head { background: var(--surface-2); }
.sched-row.head > div { padding: 11px 12px; font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); text-align: center; }
.sched-row.head > div:first-child { text-align: left; }
.sched-cell { padding: 8px; border-left: 1px solid var(--border); min-height: 60px; }
.sched-cell:first-child { border-left: 0; }
.sched-staff { display: flex; align-items: center; gap: 9px; padding: 10px 12px; }
.sched-staff .av { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); color: var(--blue-700); display: grid; place-items: center; font-family: var(--font-mono); font-size: 10px; font-weight: 600; flex: none; }
.sched-staff .nm { font-size: 13px; font-weight: 600; }
.sched-staff .ro { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); }
.shift { border-radius: 8px; padding: 6px 8px; font-size: 10.5px; font-weight: 600; line-height: 1.3; cursor: grab; }
.shift small { display: block; font-family: var(--font-mono); font-weight: 400; opacity: .8; }
.shift.am  { background: var(--blue-50);  color: var(--blue-700);  border: 1px solid #cfe0fb; }
.shift.pm  { background: var(--teal-50);  color: var(--teal-700);  border: 1px solid #c5ecef; }
.shift.off { background: var(--surface-2); color: var(--text-faint); border: 1px dashed var(--border-strong); text-align: center; }

/* list rows */
.lrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.lrow:last-child { border-bottom: 0; }
.lrow .li-ic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.lrow .li-ic svg { width: 16px; height: 16px; }
.lrow .li-main { flex: 1; min-width: 0; }
.lrow .li-main .t { font-size: 13.5px; font-weight: 600; }
.lrow .li-main .s { font-size: 12px; color: var(--text-muted); }
.lrow .li-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); white-space: nowrap; }

/* AI chat panel */
.ai-shell { display: grid; grid-template-columns: 220px 1fr; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: #fff; min-height: 520px; box-shadow: var(--shadow-sm); }
.ai-side { border-right: 1px solid var(--border); padding: 16px; background: var(--surface-2); }
.ai-tool { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-muted); border: none; background: none; width: 100%; text-align: left; }
.ai-tool:hover { background: #fff; }
.ai-tool.active { background: #fff; color: var(--blue-700); box-shadow: var(--shadow-sm); }
.ai-tool .ti { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.ai-tool .ti svg { width: 16px; height: 16px; }
.ai-conv { display: flex; flex-direction: column; min-height: 0; }
.ai-conv .ac-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }
.ai-conv .ac-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 14px; background: var(--bg); overflow-y: auto; min-height: 300px; }
.ai-conv .ac-input { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.msg { max-width: 82%; padding: 12px 15px; border-radius: 14px; font-size: 14px; line-height: 1.55; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; font-weight: 500; border-bottom-right-radius: 4px; }
.msg.bot  { align-self: flex-start; background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; box-shadow: var(--shadow-sm); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tabs button { border: none; background: none; padding: 11px 14px; font-family: var(--font-body); font-size: 13.5px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tabs button.active { color: var(--blue-700); border-color: var(--blue); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1080px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; height: auto; z-index: 200; transform: translateX(-100%); transition: transform .25s; width: 264px; }
  body.sb-open .side { transform: none; box-shadow: var(--shadow-lg); }
  .side-toggle { display: grid !important; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-2b, .grid-3, .lic-grid, .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 940px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .nav-cta { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  .section { padding-block: 72px; }
  .price-grid, .value-grid { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .mobile-brand { display: flex; justify-content: center; padding-top: 26px; }
}
@media (max-width: 768px) {
  .content { padding: 18px 16px 50px; }
  .topbar .search { display: none; }
  .stat-row { grid-template-columns: 1fr; }
  .sched-row { grid-template-columns: 100px repeat(7,1fr); font-size: 9px; }
  .field-row { grid-template-columns: 1fr; }
  .role-pick { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .container { padding-inline: 20px; }
  .cta-band { padding: 40px 24px; }
}

.side-toggle { display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text-muted); align-items: center; justify-content: center; cursor: pointer; }
