/* =====================================================================
   UMKM Suite — App stylesheet
   Clean corporate enterprise light theme
   ===================================================================== */

:root {
  --color-primary: #1E3A5F;
  --color-primary-hover: #17324F;
  --color-primary-soft: #EFF4FA;
  --color-action: #2563B8;
  --color-action-hover: #1F559D;
  --color-bg: #F4F6F9;
  --color-surface: #FFFFFF;
  --color-surface-muted: #F8FAFC;
  --color-border: #DDE3EA;
  --color-border-strong: #C8D0DA;
  --color-text: #182230;
  --color-text-muted: #667085;
  --color-success: #2E7D4F;
  --color-warning: #A96800;
  --color-danger: #B42318;
  --color-info: #245D95;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;

  --shadow-subtle: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 10px rgba(16, 24, 40, 0.08);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  --sidebar-w: 256px;
  --topbar-h: 64px;
  --content-max: 1360px;

  --font-sans: "Source Sans 3", Inter, "Segoe UI", system-ui, sans-serif;
  --font-size: 15px;
  --font-size-sm: 13px;
  --font-size-lg: 16px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--font-size);
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

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

h1, h2, h3, h4 { font-weight: 600; color: var(--color-text); line-height: 1.3; }

img { max-width: 100%; display: block; }

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--color-action);
  outline-offset: 2px;
}

/* ---------- Layout: app shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
}

.sidebar__brand {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--space-3);
  padding: 0 var(--space-5);
  border-bottom: 1px solid var(--color-border);
  font-weight: 600; font-size: 16px; color: var(--color-primary);
}
.sidebar__brand svg { width: 26px; height: 26px; flex-shrink: 0; }

.sidebar__nav {
  flex: 1; overflow-y: auto;
  padding: var(--space-3) var(--space-3);
}
.sidebar__section-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: var(--color-text-muted);
  padding: var(--space-4) var(--space-3) var(--space-2);
}
.nav-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: var(--font-size);
  margin-bottom: 2px;
  transition: background .12s ease;
}
.nav-item svg { width: 18px; height: 18px; color: var(--color-text-muted); flex-shrink: 0; }
.nav-item:hover { background: var(--color-surface-muted); color: var(--color-text); }
.nav-item.active { background: var(--color-primary); color: #fff; }
.nav-item.active svg { color: #fff; }
.nav-item:focus-visible { outline-offset: 0; }

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex; flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--topbar-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-size: 20px; font-weight: 600; }
.topbar__right { display: flex; align-items: center; gap: var(--space-3); }
.topbar__user { display: flex; align-items: center; gap: var(--space-3); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}

/* ---------- Toolbar / filters ---------- */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5);
}
.toolbar__filters { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: center; flex: 1; }
.toolbar__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: var(--font-size-sm); color: var(--color-text-muted); margin-bottom: var(--space-3);
}
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-action); }
.breadcrumb__sep { opacity: .5; }

.content {
  padding: 28px 32px;
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-6); flex-wrap: wrap;
}
.page-title { font-size: 28px; font-weight: 600; line-height: 1.25; }
.page-subtitle { color: var(--color-text-muted); font-size: var(--font-size); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 40px;
  padding: 8px 16px; border-radius: var(--radius-md);
  font-size: var(--font-size); font-weight: 500; line-height: 1.4;
  border: 1px solid transparent; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--color-action); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--color-action-hover); color: #fff; }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--color-surface-muted); }
.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--color-surface-muted); color: var(--color-text); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #9a1f15; color: #fff; }
.btn-sm { min-height: 32px; padding: 5px 10px; font-size: var(--font-size-sm); }
.btn-lg { min-height: 48px; padding: 12px 22px; font-size: var(--font-size-lg); }
.btn-block { width: 100%; }
.btn:disabled,
.btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
}
.card__header {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.card__body { padding: var(--space-5); }

/* ---------- Metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.metric {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-subtle);
}
.metric__label { font-size: var(--font-size-sm); color: var(--color-text-muted); margin-bottom: var(--space-2); }
.metric__value { font-size: 24px; font-weight: 600; line-height: 1.3; }
.metric__hint { font-size: 12px; color: var(--color-text-muted); margin-top: var(--space-1); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--font-size); }
.table th {
  text-align: left; font-weight: 600; color: var(--color-text-muted);
  padding: 12px var(--space-4); border-bottom: 1px solid var(--color-border);
  white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .03em;
  background: var(--color-surface-muted);
}
.table td {
  padding: 14px var(--space-4); border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr:hover { background: var(--color-surface-muted); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500;
  border: 1px solid transparent;
}
.badge-success { background: #EAF5EE; color: var(--color-success); }
.badge-warning { background: #FBF1DF; color: var(--color-warning); }
.badge-danger  { background: #FBEAE9; color: var(--color-danger); }
.badge-info    { background: #E8F0F8; color: var(--color-info); }
.badge-neutral { background: #EEF1F5; color: var(--color-text-muted); }
.badge-primary { background: #E9EFF7; color: var(--color-primary); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: var(--space-5); }
.form-label { display: block; font-size: var(--font-size-sm); font-weight: 600; margin-bottom: var(--space-2); color: var(--color-text); }
.form-control {
  width: 100%; min-height: 44px; padding: 10px 14px; font-size: var(--font-size); line-height: 1.4;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-md);
  background: var(--color-surface); color: var(--color-text);
  font-family: inherit; transition: border-color .12s ease, box-shadow .12s ease;
}
.form-control:hover:not(:disabled):not(:focus) { border-color: #A8B3C2; }
.form-control:focus {
  outline: none; border-color: var(--color-action);
  box-shadow: 0 0 0 3px rgba(37, 99, 184, .12);
}
.form-control:disabled { background: var(--color-surface-muted); color: var(--color-text-muted); cursor: not-allowed; }
.form-control::placeholder { color: #9aa4b2; }
textarea.form-control { resize: vertical; min-height: 88px; }
.form-hint { font-size: var(--font-size-sm); color: var(--color-text-muted); margin-top: 4px; }
.form-error { font-size: var(--font-size-sm); color: var(--color-danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-control.is-invalid { border-color: var(--color-danger); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ---------- Tabs / Pagination ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--color-border); margin-bottom: var(--space-5); }
.tab {
  padding: 10px 14px; font-size: var(--font-size); font-weight: 500;
  color: var(--color-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
  background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-family: inherit;
}
.tab:hover { color: var(--color-text); }
.tab.is-active, .tab[aria-selected="true"] { color: var(--color-action); border-bottom-color: var(--color-action); }
.pagination { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: var(--space-4); }
.pagination--bar { justify-content: space-between; width: 100%; }
.pagination__controls { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  font-size: var(--font-size-sm); color: var(--color-text); background: var(--color-surface); padding: 0 10px;
}
.pagination a:hover { background: var(--color-surface-muted); }
.pagination .is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination--bar > span,
.pagination__controls > span {
  min-width: 0; height: auto; border: 0; background: transparent; padding: 0;
}

/* ---------- Alerts / Flash ---------- */
.alert {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  font-size: 14px; border: 1px solid; margin-bottom: var(--space-4);
}
.alert-success { background: #EAF5EE; border-color: #BFE3CE; color: var(--color-success); }
.alert-danger  { background: #FBEAE9; border-color: #F4C7C4; color: var(--color-danger); }
.alert-warning { background: #FBF1DF; border-color: #F0D9AC; color: var(--color-warning); }
.alert-info    { background: #E8F0F8; border-color: #C6DCF0; color: var(--color-info); }

/* ---------- Empty state ---------- */
.empty {
  text-align: center; padding: var(--space-8) var(--space-5);
  color: var(--color-text-muted);
}
.empty svg { width: 40px; height: 40px; margin: 0 auto var(--space-3); opacity: .4; }
.empty__title { font-weight: 600; color: var(--color-text); margin-bottom: 4px; }

/* ---------- Toast ---------- */
.toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 100;
  display: flex; flex-direction: column; gap: var(--space-2);
}
.toast {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-action);
  box-shadow: var(--shadow-md); border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4); font-size: 14px;
  min-width: 260px; max-width: 360px;
  animation: toast-in .18s ease;
}
.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-danger); }
.toast-info { border-left-color: var(--color-info); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(16,24,40,.45);
  display: flex; align-items: center; justify-content: center; z-index: 90;
  padding: var(--space-4);
}
.modal {
  background: var(--color-surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto;
}
.modal__header {
  padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border);
  display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 16px;
}
.modal__body { padding: var(--space-5); }
.modal__footer {
  padding: var(--space-4) var(--space-5); border-top: 1px solid var(--color-border);
  display: flex; justify-content: flex-end; gap: var(--space-3);
}

/* ---------- Auth layout ---------- */
.auth-layout {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: var(--space-8) var(--space-5);
  background: var(--color-bg);
}
.auth-shell { width: 100%; max-width: 440px; }
.auth-shell--wide { max-width: 1040px; }
.auth-card {
  width: 100%;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-subtle);
  padding: var(--space-8);
}
.auth-card--onboarding { padding: 36px 40px 32px; }
.auth-brand {
  display: flex; align-items: center; gap: var(--space-3); justify-content: center;
  margin-bottom: var(--space-6); font-size: 20px; font-weight: 600; color: var(--color-primary);
}
.auth-brand svg { width: 32px; height: 32px; }
.auth-title { text-align: center; font-size: 30px; margin-bottom: 8px; letter-spacing: -0.02em; }
.auth-subtitle { text-align: center; color: var(--color-text-muted); margin-bottom: 8px; font-size: var(--font-size); line-height: 1.5; }
.auth-footer { text-align: center; margin-top: var(--space-5); color: var(--color-text-muted); font-size: var(--font-size); }

/* ---------- Onboarding ---------- */
.ob-helper {
  text-align: center; color: var(--color-text-muted); font-size: var(--font-size-sm);
  margin-bottom: var(--space-6);
}
.ob-progress { margin-bottom: 4px; }
.ob-progress__track {
  height: 4px; background: #E5E7EB; border-radius: 99px; overflow: hidden; margin-bottom: 12px;
}
.ob-progress__bar {
  height: 100%; width: 50%; background: var(--color-action); border-radius: 99px;
  transition: width .2s ease;
}
.ob-progress__steps {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: var(--font-size-sm); color: var(--color-text-muted); font-weight: 500;
}
.ob-step.is-active { color: var(--color-action); font-weight: 600; }
.ob-step.is-done { color: var(--color-success); }

.ob-section { margin-bottom: var(--space-6); }
.ob-section__title {
  font-size: var(--font-size-sm); font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--color-text-muted); margin-bottom: 12px;
}

.type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.type-option {
  position: relative;
  border: 1.5px solid var(--color-border-strong); border-radius: var(--radius-md);
  padding: 14px 16px; cursor: pointer; text-align: left;
  background: var(--color-surface); transition: border-color .12s, background .12s, box-shadow .12s;
  display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px;
  font-family: inherit; font-size: var(--font-size); min-height: 68px;
}
.type-option:hover:not(.type-option--disabled) {
  border-color: #93AFC9; background: #FAFBFC;
}
.type-option.selected {
  border-color: var(--color-action); background: var(--color-primary-soft);
  box-shadow: 0 0 0 3px rgba(37, 99, 184, 0.12);
}
.type-option--disabled {
  opacity: .55; cursor: not-allowed; background: var(--color-surface-muted);
  border-color: var(--color-border);
}
.type-option__icon {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-action); background: #F1F5F9; border-radius: var(--radius-md);
}
.type-option--disabled .type-option__icon { color: var(--color-text-muted); }
.type-option__icon svg { width: 20px; height: 20px; }
.type-option__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.type-option__text strong { font-size: 15px; line-height: 1.25; color: var(--color-text); }
.type-option__text small { font-size: 12px; color: var(--color-text-muted); line-height: 1.35; }
.type-option__badge {
  position: absolute; top: 8px; right: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  color: var(--color-warning); background: #FFF7ED; border: 1px solid #F6D7A8;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.type-option__check {
  display: none; width: 20px; height: 20px; color: var(--color-action); flex-shrink: 0;
}
.type-option.selected .type-option__check { display: inline-flex; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }

.ob-preview {
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
  background: var(--color-surface-muted); padding: 14px 16px; margin: 4px 0 20px;
}
.ob-preview__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px;
  font-size: var(--font-size-sm);
}
.module-preview { display: flex; flex-wrap: wrap; gap: 8px; }
.module-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 4px;
  border: 1px solid var(--color-border); background: #fff; color: var(--color-text);
}
.module-chip--soon { color: var(--color-warning); background: #FFF7ED; border-color: #F6D7A8; }

.ob-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 20px;
  border: 1px solid #C9DAEE; background: var(--color-primary-soft); border-radius: var(--radius-md);
}
.ob-summary__label { font-size: var(--font-size-sm); color: var(--color-text-muted); margin-right: 2px; }
.ob-actions {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-top: 8px;
}
.ob-cta { min-height: 50px; }
.form-row--gap { gap: 16px; }

@media (max-width: 1024px) {
  .auth-shell--wide { max-width: 94%; }
  .auth-card--onboarding { padding: 28px 24px; }
}
@media (max-width: 640px) {
  .auth-layout { padding: 16px; }
  .auth-title { font-size: 24px; }
  .auth-card--onboarding { padding: 20px 16px; }
  .type-grid { grid-template-columns: 1fr; }
  .ob-actions { grid-template-columns: 1fr; }
  .ob-actions .btn-secondary { order: 2; }
}

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
  min-width: 180px; z-index: 60; display: none;
}
.dropdown.open .dropdown__menu { display: block; }
.dropdown__item {
  display: block; width: 100%; text-align: left; padding: 8px var(--space-4);
  background: none; border: 0; font-size: 14px; color: var(--color-text); cursor: pointer; font-family: inherit;
}
.dropdown__item:hover { background: var(--color-surface-muted); }

/* ---------- Responsive ---------- */
.mobile-menu-btn { display: none; }

@media (max-width: 1024px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .content { padding: 24px; max-width: 94%; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-menu-btn { display: inline-flex; }
  .content { padding: 16px; max-width: 100%; }
  .topbar { padding: 0 var(--space-4); }
  .metrics { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .form-row { grid-template-columns: 1fr; }
  .page-title { font-size: 22px; }
}

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

.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(16,24,40,.4); z-index: 35;
}
@media (max-width: 768px) {
  .sidebar-overlay.show { display: block; }
}

/* ---------- Tools Bisnis ---------- */
.tool-nav {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 16px; padding: 12px 14px;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); position: sticky; top: 8px; z-index: 5;
}
.tool-nav__group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tool-nav__label {
  font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--color-text-muted); margin-right: 4px; min-width: 96px;
}
.calc-grid > .card.is-collapsed .card__body { display: none; }
.calc-grid > .card .tool-toggle {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.calc-grid > .card .tool-toggle::after {
  content: "▾"; color: var(--color-text-muted); font-size: 12px;
}
.calc-grid > .card.is-collapsed .tool-toggle::after { content: "▸"; }
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr !important; }
  .tool-nav { position: static; }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 1024px) {
  .dashboard-grid { grid-template-columns: 1fr; }
}

.form-card { max-width: 860px; }
.form-card--sm { max-width: 640px; }
.form-card--md { max-width: 720px; }

.text-muted { color: var(--color-text-muted); }
.text-sm { font-size: var(--font-size-sm); }

.skeleton {
  background: #EEF1F5;
  opacity: .85;
  animation: skeleton-pulse 1.1s ease-in-out infinite;
  border-radius: var(--radius-md);
  min-height: 14px;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

/* ---------- Misc ---------- */
.empty .btn { margin-top: 12px; }

/* ---------- Dropdown links ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--color-action); color: #fff; padding: 8px 12px; border-radius: 0 0 6px 0;
}
.skip-link:focus { left: 0; }

a.dropdown__item {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--color-text);
}

/* ---------- Tables on mobile ---------- */
@media (max-width: 768px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 640px; }
}
