/* ── DochádzkaPRO — Design System ── */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900;1,14..32,400&display=swap');

@font-face {
  font-family: 'Pangram';
  src: url('../fonts/Pangram-Regular.woff2') format('woff2');
  font-weight: 400;
}
@font-face {
  font-family: 'Pangram';
  src: url('../fonts/Pangram-Bold.woff2') format('woff2');
  font-weight: 700;
}
@font-face {
  font-family: 'Pangram';
  src: url('../fonts/Pangram-Black.woff2') format('woff2');
  font-weight: 800;
}

/* ── Tokens ── */
:root {
  /* Colors */
  --bg:        #f8f8f9;
  --surface:   #ffffff;
  --card:      #ffffff;
  --border:    #ebebec;
  --border-md: #d8d8da;

  /* Text */
  --text:      #111114;
  --text-2:    #6b6b76;
  --text-3:    #adadb8;
  --muted:     #6b6b76;

  /* Brand — red */
  --brand:     #dc2626;
  --brand-h:   #b91c1c;
  --brand-bg:  #fef2f2;
  --brand-bd:  #fecaca;
  --amber:     #dc2626; /* alias for backward compat */
  --amber-bg:  #fef2f2;
  --amber-bd:  #fecaca;
  --accent:    #dc2626;

  /* Semantic */
  --green:     #16a34a;
  --green-bg:  #f0fdf4;
  --green-bd:  #bbf7d0;
  --red:       #dc2626;
  --red-bg:    #fef2f2;
  --red-bd:    #fecaca;
  --blue:      #2563eb;
  --blue-bg:   #eff6ff;
  --blue-bd:   #bfdbfe;
  --orange:    #ea580c;
  --orange-bg: #fff7ed;
  --orange-bd: #fed7aa;
  --warn:      #ea580c;
  --danger:    #dc2626;
  --accent2:   #16a34a;

  /* Ink (sidebar bg) */
  --ink:       #111114;
  --ink-hover: #1c1c20;

  /* Radius */
  --r-xs:  4px;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 8px rgba(0,0,0,.06), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 24px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
  --shadow-xl: 0 24px 48px rgba(0,0,0,.10), 0 8px 16px rgba(0,0,0,.06);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Logo ── */
.logo {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: #fff;
}
.logo span { color: var(--brand); }

/* ── Layout ── */
.main { margin-left: 220px; min-height: 100vh; padding: 28px; }
.page { display: none; }
.page.active { display: block; }

/* ── Topbar ── */
.desktop-topbar,
.topbar-clean {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  border-color: var(--border-md);
  box-shadow: var(--shadow-md);
}
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  letter-spacing: -0.1px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s, box-shadow .12s, transform .1s, border-color .12s;
  white-space: nowrap;
  letter-spacing: -0.1px;
  line-height: 1;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.btn-sm  { font-size: 12px; padding: 6px 11px; }
.btn-md  { font-size: 13px; padding: 12px 20px; }
.btn-lg  { font-size: 14px; padding: 11px 20px; font-weight: 600; }

.btn-primary {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.2px;
  padding: 12px 20px !important;
}
.btn-primary:hover {
  background: var(--ink-hover);
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.btn-secondary {
  background: #fff;
  color: var(--text-2);
  border: 1px solid var(--border-md);
}
.btn-secondary:hover {
  color: var(--text);
  border-color: #b4b4b4;
  background: var(--bg);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-md); color: var(--text); background: var(--bg); }

.btn-accent,
.btn-amber {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-weight: 600;
}
.btn-accent:hover, .btn-amber:hover {
  background: var(--brand-h);
  box-shadow: 0 4px 12px rgba(220,38,38,.25);
}

.btn-act {
  background: var(--blue-bg);
  color: var(--blue);
  border: 1px solid var(--blue-bd);
}
.btn-act:hover { background: #dbeafe; }

.btn-warn {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-bd);
}
.btn-warn:hover { background: #ffedd5; }

.btn-danger,
.btn-del {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-bd);
}
.btn-danger:hover, .btn-del:hover { background: #fee2e2; }

.btn-edit {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-bd);
}
.btn-edit:hover { background: #dcfce7; }

.btn-deact {
  background: var(--orange-bg);
  color: var(--orange);
  border: 1px solid var(--orange-bd);
}
.btn-deact:hover { background: #ffedd5; }

/* ── Forms ── */
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 5px;
  letter-spacing: 0;
}
input, select, textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border-md);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: 12px;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: var(--shadow-xs);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(220,38,38,.10);
}
input::placeholder { color: var(--text-3); }
input[type="checkbox"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  box-shadow: none;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  accent-color: var(--brand, #dc2626);
}
input[type="tel"],
input[type="number"],
input[type="time"],
input[type="date"],
input.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; }
th {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  font-weight: 600;
}
td {
  padding: 11px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,0,0,.018); }

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-green, .badge-active {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-bd);
}
.badge-red {
  background: var(--red-bg);
  color: var(--red);
  border-color: var(--red-bd);
}
.badge-orange {
  background: var(--orange-bg);
  color: var(--orange);
  border-color: var(--orange-bd);
}
.badge-blue {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: var(--blue-bd);
}
.badge-gray, .badge-inactive {
  background: #f4f4f5;
  color: var(--text-3);
  border-color: #e4e4e7;
}

/* ── Tags ── */
.tag {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--r-xs);
  border: 1px solid;
  display: inline-flex;
  align-items: center;
}
.tag-prof { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.tag-sect { background: var(--blue-bg); color: var(--blue); border-color: var(--blue-bd); }
.tag-rate {
  background: var(--brand-bg);
  color: var(--brand);
  border-color: var(--brand-bd);
  font-family: 'JetBrains Mono', monospace;
  margin-left: auto;
}

/* ── Dots ── */
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--green); box-shadow: 0 0 5px rgba(22,163,74,.5); }
.dot-red   { background: var(--red); }

/* ── Worker cards (mobile) ── */
.worker-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .18s, transform .18s;
  animation: slideIn .22s ease both;
}
.worker-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.worker-card:nth-child(1) { animation-delay: .04s }
.worker-card:nth-child(2) { animation-delay: .08s }
.worker-card:nth-child(3) { animation-delay: .12s }
.worker-card:nth-child(4) { animation-delay: .16s }
.worker-card:nth-child(5) { animation-delay: .20s }
.worker-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.worker-card-name { font-size: 15px; font-weight: 600; letter-spacing: -0.3px; margin-bottom: 3px; color: var(--text); }
.worker-card-meta { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); }
.worker-card-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.worker-card-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.worker-card-actions .btn {
  flex: 1; justify-content: center;
  font-size: 12px; font-weight: 500;
  padding: 7px 10px; border-radius: var(--r-sm);
  display: flex; align-items: center; gap: 5px;
  cursor: pointer; border: 1px solid var(--border);
  transition: all .12s;
  font-family: 'Inter', sans-serif;
}
.worker-card-actions .btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.worker-card-actions .btn-edit  { background: var(--green-bg); color: var(--green); border-color: var(--green-bd); }
.worker-card-actions .btn-edit:hover { background: #dcfce7; }
.worker-card-actions .btn-deact { background: var(--orange-bg); color: var(--orange); border-color: var(--orange-bd); }
.worker-card-actions .btn-deact:hover { background: #ffedd5; }
.worker-card-actions .btn-danger,
.worker-card-actions .btn-del { background: var(--red-bg); color: var(--red); border-color: var(--red-bd); }
.worker-card-actions .btn-danger:hover,
.worker-card-actions .btn-del:hover { background: #fee2e2; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
@media (min-width: 769px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.stat-card.green::before  { background: var(--green); }
.stat-card.blue::before   { background: var(--blue); }
.stat-card.orange::before { background: var(--brand); }
.stat-card.red::before    { background: var(--red); }
.stat-val, .stat-value {
  font-family: 'Inter', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1;
  color: var(--text);
  margin-top: 8px;
}
.stat-card.green .stat-val, .stat-card.green .stat-value   { color: var(--green); }
.stat-card.orange .stat-val, .stat-card.orange .stat-value { color: var(--brand); }
.stat-card.red .stat-val, .stat-card.red .stat-value       { color: var(--red); }
.stat-card.blue .stat-val, .stat-card.blue .stat-value     { color: var(--blue); }
.stat-val.amber, .stat-value.amber { color: var(--brand); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  margin-bottom: 0;
}
.stat-sub { font-size: 11px; color: var(--text-3); margin-top: 5px; }

/* ── Section labels ── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-3);
  margin-bottom: 12px;
  padding-left: 2px;
}
.page-sub {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  margin-bottom: 10px;
}

/* ── Page toolbar ── */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.page-title {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text);
  line-height: 1.2;
}

/* ── Search bar ── */
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-bar svg.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 15px; height: 15px;
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid var(--border-md);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 14px;
  margin-bottom: 0;
  box-shadow: var(--shadow-xs);
}
.search-bar input:focus { border-color: var(--brand); }
.search-bar select { flex: 1; min-width: 140px; margin-bottom: 0; }

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px 26px 24px;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalPop .2s cubic-bezier(.34,1.3,.64,1) both;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(.92) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text);
}
.modal-close, .modal-close-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-3);
  cursor: pointer;
  transition: all .12s;
  font-size: 16px;
  line-height: 1;
}
.modal-close:hover, .modal-close-btn:hover {
  background: #f0f0f1;
  color: var(--text);
  border-color: var(--border-md);
}
.modal-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.modal-footer .btn:first-child { flex-shrink: 0; }
.modal-footer .btn:last-child { flex: 1; justify-content: center; }
.form-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-3);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  margin-top: 20px;
}
.form-section-label:first-of-type { margin-top: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Misc ── */
.loading { text-align: center; padding: 32px; color: var(--muted); font-size: 13px; }
.err {
  background: var(--red-bg);
  border: 1px solid var(--red-bd);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.flex { display: flex; }
.gap-2 { gap: 8px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gps-small { font-size: 10px; color: var(--muted); line-height: 1.4; }
.progress-bar { height: 5px; background: var(--border); border-radius: 10px; margin-top: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 10px; transition: width .4s; }

/* ── Mobile topbar ── */
.mobile-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 80;
  box-shadow: var(--shadow-sm);
}
.mobile-topbar .logo { color: var(--text); }
.mobile-topbar .logo span { color: var(--brand); }
.mobile-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 12px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: all .12s;
}
.mobile-logout:hover { border-color: var(--border-md); color: var(--text); }

/* ── Approval components ── */
.worker-avatar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.worker-initial {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text);
  flex-shrink: 0;
}
.approval-record-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.approval-record-row:last-child { border-bottom: none; }
.record-row-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.record-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.record-date { font-size: 12px; font-weight: 600; color: var(--text); }
.record-time { font-size: 12px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.record-duration { font-size: 12px; font-weight: 700; color: var(--brand); font-family: 'JetBrains Mono', monospace; }
.record-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.record-note-reject { margin-top: 5px; padding: 5px 8px; background: var(--red-bg); border-left: 3px solid var(--red-bd); border-radius: 4px; font-size: 11px; color: var(--red); }
.record-note-request { margin-top: 5px; padding: 5px 8px; background: var(--orange-bg); border-left: 3px solid var(--orange-bd); border-radius: 4px; font-size: 11px; color: var(--orange); }
.record-edit-log { margin-left: 10px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.record-empty { color: var(--muted); font-size: 12px; padding: 6px 0; }

/* ── Ekonom ── */
.notices-list { display: flex; flex-direction: column; gap: 6px; }
.notice-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid; }
.notice-item.warn { background: var(--orange-bg); border-color: var(--orange-bd); }
.notice-item.info { background: var(--blue-bg); border-color: var(--blue-bd); }
.notice-item.ok   { background: var(--green-bg); border-color: var(--green-bd); }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.notice-dot.warn { background: var(--orange); }
.notice-dot.info { background: var(--blue); }
.notice-dot.ok   { background: var(--green); }
.notice-text { font-size: 12px; line-height: 1.5; }
.notice-text.warn { color: var(--orange); }
.notice-text.info { color: var(--blue); }
.notice-text.ok   { color: var(--green); }

.proj-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.proj-row:last-child { border-bottom: none; }
.proj-color { width: 3px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.proj-info { flex: 1; min-width: 0; }
.proj-name { font-size: 13px; font-weight: 600; color: var(--text); }
.proj-meta { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; margin-top: 1px; }
.proj-bar-wrap { width: 120px; }
.proj-bar { height: 5px; background: var(--border); border-radius: 10px; overflow: hidden; }
.proj-bar-fill { height: 100%; border-radius: 10px; transition: width .4s; }
.proj-pct { font-size: 10px; color: var(--muted); margin-top: 2px; text-align: right; }
.proj-amount { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--brand); min-width: 70px; text-align: right; }

.payment-date-wrap { display: flex; align-items: center; gap: 6px; }
.payment-date-input { font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); outline: none; width: 120px; }
.payment-date-input:focus { border-color: var(--green); }

.annual-row { display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.annual-row:last-child { border-bottom: none; }
.annual-month { font-size: 12px; font-weight: 500; color: var(--muted); padding: 8px 12px 8px 0; width: 42px; flex-shrink: 0; }
.annual-bar-wrap { flex: 1; padding: 6px 0; }
.annual-bar { height: 22px; background: var(--brand-bg); border: 1px solid var(--brand-bd); border-radius: var(--r-xs); display: flex; align-items: center; padding: 0 8px; min-width: 60px; }
.annual-bar span { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 600; color: var(--brand); white-space: nowrap; }
.annual-amount { font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600; color: var(--text); padding: 8px 0 8px 12px; min-width: 80px; text-align: right; }
.annual-badge { padding: 8px 0 8px 8px; min-width: 90px; text-align: right; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* Billing */
.billing-note-warn { display: flex; align-items: flex-start; gap: 5px; margin-top: 5px; padding: 4px 8px; background: var(--orange-bg); border-left: 3px solid var(--orange-bd); border-radius: 4px; font-size: 11px; color: var(--orange); line-height: 1.4; }
.billing-desktop-only { display: block; }
.billing-mobile-only  { display: none; }
.billing-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; margin-bottom: 10px; box-shadow: var(--shadow-xs); animation: slideIn .22s ease both; }
.billing-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.billing-card-name { font-size: 15px; font-weight: 600; color: var(--text); letter-spacing: -0.2px; }
.billing-card-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.billing-card-amounts { margin-bottom: 12px; }
.billing-card-amount { font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 700; color: var(--brand); letter-spacing: -0.5px; line-height: 1; }
.billing-card-sub { font-size: 11px; color: var(--text-3); margin-top: 3px; font-family: 'JetBrains Mono', monospace; }
.billing-card-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.billing-card-actions .btn { flex: 1; justify-content: center; }
.billing-card-total { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.card { animation: fadeUp .2s ease both; }
.card:nth-child(1) { animation-delay: .04s }
.card:nth-child(2) { animation-delay: .08s }
.card:nth-child(3) { animation-delay: .12s }
.card:nth-child(4) { animation-delay: .16s }
.card:nth-child(5) { animation-delay: .20s }

/* ── Mobile ── */
@media (max-width: 768px) {
  .main { margin-left: 0; padding: 0; }
  .mobile-topbar { display: flex; }
  .card { padding: 14px 16px; overflow-x: auto; }
  table { min-width: 520px; }
  .flex.justify-between { flex-direction: row; gap: 10px; align-items: center; }
  .flex.justify-between .btn-primary { width: auto; }
  .row2 { grid-template-columns: 1fr; }
  .modal { padding: 22px 18px; border-radius: var(--r-lg); }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .billing-desktop-only { display: none; }
  .billing-mobile-only  { display: block; }
}
