:root {
  --navy: #1B2A6B;
  --navy-deep: #131e4d;
  --lavender: #D6DDEF;
  --lavender-soft: #eef1f8;
  --ink: #1d2333;
  --muted: #6a7286;
  --bg: #f7f8fc;
  --card: #ffffff;
  --line: #e4e8f2;
  --accent: #3a52d6;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --success-bg: #ecfdf3;
  --success: #067647;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(27,42,107,.04), 0 8px 24px rgba(27,42,107,.06);
  --shadow-hover: 0 4px 12px rgba(27,42,107,.10), 0 16px 40px rgba(27,42,107,.12);
  --toggle-track: #d8dde8;
  --logo-text: #1B2A6B;
}

html[data-theme="dark"] {
  --navy: #c5cef5;
  --navy-deep: #e2e6fa;
  --lavender: #2a3350;
  --lavender-soft: #1e2538;
  --ink: #e8eaf0;
  --muted: #9aa3b5;
  --bg: #0f1219;
  --card: #1a1f2e;
  --line: #2a3142;
  --accent: #8b9cf7;
  --danger: #f97066;
  --danger-bg: #3b1c1c;
  --success-bg: #123526;
  --success: #6ce9a6;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.45);
  --toggle-track: #3a4258;
  --logo-text: #e8eaf0;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Quicksand', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--navy);
  font-size: 18px;
  letter-spacing: -.2px;
  text-decoration: none;
}

.brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 0 0 4px var(--lavender);
}

/* Logo Kimbo: KIMB + interruptor como O */
.kimbo-brand {
  gap: 0;
}

.kimbo-wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--logo-text);
}

.kimbo-letters {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--logo-text);
}

.kimbo-suffix {
  margin-left: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.kimbo-theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 36px;
  height: 20px;
  margin-left: 1px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--toggle-track);
  cursor: pointer;
  flex-shrink: 0;
  transition: background .2s ease;
  vertical-align: middle;
}

.kimbo-theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.kimbo-theme-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--logo-text);
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .2s ease;
}

/* Oscuro: la bolita (O) se desliza a la derecha */
.kimbo-theme-toggle.is-dark .kimbo-theme-knob,
html[data-theme="dark"] .kimbo-theme-toggle .kimbo-theme-knob {
  transform: translateX(16px);
}

html[data-theme="dark"] .kimbo-theme-toggle {
  background: #4a5570;
}

html[data-theme="dark"] .kimbo-theme-knob {
  background: #e8eaf0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.btn-primary { background: #1B2A6B; color: #fff; }
.btn-primary:hover { background: #131e4d; }
.btn-primary:active { transform: scale(.98); }

html[data-theme="dark"] .btn-primary {
  background: #8b9cf7;
  color: #0f1219;
}
html[data-theme="dark"] .btn-primary:hover {
  background: #a8b4fa;
}

.btn-ghost {
  background: var(--card);
  color: var(--navy);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--lavender-soft);
  border-color: var(--lavender);
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58,82,214,.12);
}

.field-check label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.field-check input { width: auto; height: auto; }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent);
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 35%, transparent);
}

/* Login */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 20% 0%, color-mix(in srgb, var(--lavender) 55%, transparent), transparent 50%),
    radial-gradient(ellipse at 80% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 45%),
    var(--bg);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-card .brand { justify-content: center; margin-bottom: 28px; }
.login-card .btn-primary { width: 100%; }

.login-card h1 {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.login-card .subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 28px;
}

.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Topbar portal */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.admin-topbar { justify-content: space-between; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.menu-btn {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.menu-btn:hover { border-color: var(--lavender); background: var(--lavender-soft); }

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  position: relative;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

.menu-btn span::before { top: -6px; }
.menu-btn span::after { top: 6px; }

.search {
  flex: 1;
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}

.search input {
  width: 100%;
  height: 42px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
}

.search input::placeholder { color: var(--muted); font-weight: 500; }

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58,82,214,.12);
}

.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1B2A6B;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.profile .name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}

/* Portal main */
.wrap { max-width: 1080px; margin: 0 auto; padding: 40px 24px 80px; }

.hero { margin-bottom: 40px; }

.hero-centered {
  text-align: center;
}

.hero-centered p {
  margin-left: auto;
  margin-right: auto;
}

.hero .eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.5px;
  line-height: 1.1;
}

.hero p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
  max-width: 540px;
  line-height: 1.5;
}

.dept { margin-bottom: 44px; scroll-margin-top: 88px; }

.dept-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}

.dept-head h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.dept-head .rule { flex: 1; height: 1px; background: var(--line); }

.dept-head .count {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.app {
  display: block;
  position: relative;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .18s cubic-bezier(.2,.7,.3,1), box-shadow .18s, border-color .18s;
}

.app:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--lavender);
}

.app:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.app .ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--lavender-soft);
  color: var(--navy);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  font-size: 20px;
  font-weight: 700;
}

.app h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.app p {
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
}

.app .arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  color: var(--lavender);
  transition: color .18s, transform .18s;
}

.app:hover .arrow { color: var(--accent); transform: translate(2px,-2px); }

.app.soon { pointer-events: none; opacity: .62; }

.app.soon .tag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--lavender-soft);
  padding: 3px 9px;
  border-radius: 999px;
  text-transform: uppercase;
}

.empty {
  display: none;
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.empty.show { display: block; }

.empty strong { color: var(--ink); font-weight: 700; }

/* Side panel */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(19,30,77,.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
  z-index: 50;
}

.overlay.open { opacity: 1; visibility: visible; }

.panel {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 84vw;
  background: #1B2A6B;
  color: #fff;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform .24s cubic-bezier(.3,.7,.3,1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel.open { transform: translateX(0); }

.panel .p-brand {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel .p-brand .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(214,221,239,.25);
}

.panel .kimbo-letters,
.panel .kimbo-wordmark {
  color: #fff;
}

.panel .kimbo-theme-toggle {
  background: rgba(255,255,255,.28);
}

.panel .kimbo-theme-knob {
  background: #fff;
}

.panel .kimbo-theme-toggle.is-dark,
html[data-theme="dark"] .panel .kimbo-theme-toggle {
  background: rgba(255,255,255,.18);
}


.panel a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  transition: background .15s, color .15s;
}

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

.panel .p-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(214,221,239,.55);
  margin: 18px 0 4px 14px;
}

.panel .spacer { flex: 1; }

.panel .p-foot {
  font-size: 12.5px;
  color: rgba(214,221,239,.5);
  font-weight: 500;
  padding: 0 14px;
}

.panel-logout { margin-top: 8px; }

.panel-logout-btn {
  width: 100%;
  border: 1px solid rgba(255,255,255,.2);
  background: transparent;
  color: #fff;
  border-radius: 10px;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.panel-logout-btn:hover { background: rgba(255,255,255,.08); }

/* Admin */
.admin-wrap { max-width: 920px; }

.admin-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-nav a {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.admin-nav a:hover { color: var(--navy); background: var(--lavender-soft); }

.admin-nav a.active {
  color: var(--navy);
  background: var(--lavender-soft);
}

.admin-lead {
  color: var(--muted);
  margin: -8px 0 24px;
  max-width: 520px;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.field-check label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  cursor: pointer;
}

.field-check input { width: auto; }

.invite-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.invite-card:last-child { border-bottom: none; }

.invite-url-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.invite-url {
  flex: 1;
  min-width: 200px;
  font-size: 13px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.admin-btn-inline { width: auto; }

.admin-block {
  margin-bottom: 32px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.admin-block-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-block-head h2 {
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
}

.admin-meta { color: var(--muted); font-size: 13px; font-weight: 600; }

.admin-link { font-weight: 700; font-size: 14px; margin-left: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}

.admin-ico {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--lavender-soft);
  color: var(--navy);
  font-weight: 700;
  margin-right: 8px;
}

.admin-desc { color: var(--muted); font-size: 13px; margin-top: 4px; }

.admin-empty { color: var(--muted); font-weight: 500; }

.muted-row { opacity: .55; }

.admin-form { max-width: 520px; margin-top: 24px; }

.admin-form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.area-fieldset {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px 16px;
  margin: 0 0 18px;
}

.area-fieldset legend {
  padding: 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.area-hint { margin: 0 0 12px; }

.area-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.area-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.area-check input {
  width: auto;
  height: auto;
  margin: 0;
}

.area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.area-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--lavender-soft);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* Calculadora de precios (Comercial) */
.calc-wrap {
  max-width: 720px;
  padding-bottom: 64px;
}

.calc-hero { margin-bottom: 28px; }

.calc-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}

.calc-formula {
  display: inline-block;
  margin-bottom: 22px;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--lavender-soft);
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.calc-choose-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.calc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.calc-pill {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}

.calc-pill:hover {
  border-color: var(--lavender);
  color: var(--ink);
}

.calc-pill.active {
  background: #1B2A6B;
  border-color: #1B2A6B;
  color: #fff;
}

html[data-theme="dark"] .calc-pill.active {
  background: #8b9cf7;
  border-color: #8b9cf7;
  color: #0f1219;
}

.calc-input-row {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}

.calc-input-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58,82,214,.12);
}

.calc-input-row input[type="number"] {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: none;
  background: transparent;
  padding: 0 14px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
}

.calc-unit {
  display: grid;
  place-items: center;
  padding: 0 14px;
  border-left: 1px solid var(--line);
  background: var(--lavender-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.calc-slider-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.calc-slider-row input[type="range"] {
  flex: 1;
  accent-color: #1B2A6B;
}

html[data-theme="dark"] .calc-slider-row input[type="range"] {
  accent-color: #8b9cf7;
}

.calc-slider-val {
  min-width: 56px;
  text-align: right;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.calc-result {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
  padding: 20px 22px;
  border-radius: 14px;
  background: #1B2A6B;
  color: #fff;
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .calc-result {
  background: #2a3350;
}

.calc-result.is-err {
  background: var(--danger);
}

.calc-result-accent {
  margin-top: 16px;
  background: var(--accent);
}

html[data-theme="dark"] .calc-result-accent {
  background: #3a4570;
}

.calc-result-accent.is-warn {
  background: #9a6b2f;
}

.calc-result-accent.is-err {
  background: var(--danger);
}

.calc-rlabel {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}

.calc-rvalue {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.calc-rvalue.is-muted {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,.88);
}

.calc-result-sub {
  width: 100%;
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  opacity: .92;
}

.calc-bar-wrap { margin: 18px 0 4px; }

.calc-bar {
  display: flex;
  width: 100%;
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.calc-bar-cost { background: var(--muted); }
.calc-bar-margin { background: #1B2A6B; }
html[data-theme="dark"] .calc-bar-margin { background: #8b9cf7; }

.calc-bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.calc-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
}

.calc-dot.cost { background: var(--muted); }
.calc-dot.margin {
  margin-left: 6px;
  margin-right: 0;
  background: #1B2A6B;
}
html[data-theme="dark"] .calc-dot.margin { background: #8b9cf7; }

.calc-divider {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.calc-divider-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 480px) {
  .calc-panel { padding: 22px 18px; }
  .calc-rvalue { font-size: 26px; }
  .calc-pills { flex-direction: column; }
  .calc-pill { text-align: center; }
}

code {
  font-size: 12px;
  background: var(--lavender-soft);
  padding: 2px 6px;
  border-radius: 6px;
}

@media (max-width: 640px) {
  .profile .name { display: none; }
  .brand .label { display: none; }
  .login-card { padding: 28px 22px; }
  .admin-table { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
