/* ═══════════════════════════════════════════════════════
   Rentflow — Sistema de diseño
   Light/Dark theme · Responsive · Sidebar layout
   ═══════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────── */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;

  /* Spacing scale */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem;
  --sp-4: 1rem;    --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-8: 2rem;    --sp-10: 2.5rem; --sp-12: 3rem;

  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-full: 9999px;

  --sidebar-w: 260px;
  --topbar-h: 56px;
  --transition: 200ms ease;

  /* Light theme (default) — tonos slate, no blanco puro */
  --bg:          #e2e8f0;
  --bg-card:     #f1f5f9;
  --bg-sidebar:  #0f172a;
  --bg-hover:    #cbd5e1;
  --bg-input:    #ffffff;
  --bg-badge:    #ef4444;
  --bg-scrim:    rgba(0,0,0,.4);

  --text:        #0f172a;
  --text-2:      #334155;
  --text-3:      #64748b;
  --text-sidebar:#cbd5e1;
  --text-sidebar-active: #ffffff;
  --text-on-primary: #ffffff;

  --border:      #cbd5e1;
  --border-focus:#3b82f6;

  --primary:     #3b82f6;
  --primary-hover:#2563eb;
  --success:     #10b981;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --danger-hover:#dc2626;
  --info:        #06b6d4;

  --shadow-sm:   0 1px 2px rgba(0,0,0,.08);
  --shadow:      0 1px 3px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.08);
  --shadow-lg:   0 4px 6px rgba(0,0,0,.1), 0 2px 4px rgba(0,0,0,.08);
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:         #0f172a;
    --bg-card:    #1e293b;
    --bg-sidebar: #020617;
    --bg-hover:   #1e293b;
    --bg-input:   #1e293b;
    --bg-scrim:   rgba(0,0,0,.6);
    --text:       #e2e8f0;
    --text-2:     #94a3b8;
    --text-3:     #64748b;
    --border:     #334155;
    --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
    --shadow:     0 1px 3px rgba(0,0,0,.4);
    --shadow-lg:  0 4px 6px rgba(0,0,0,.4);
  }
}

:root[data-theme="dark"] {
  --bg:         #0f172a;
  --bg-card:    #1e293b;
  --bg-sidebar: #020617;
  --bg-hover:   #1e293b;
  --bg-input:   #1e293b;
  --bg-scrim:   rgba(0,0,0,.6);
  --text:       #e2e8f0;
  --text-2:     #94a3b8;
  --text-3:     #64748b;
  --border:     #334155;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
  --shadow:     0 1px 3px rgba(0,0,0,.4);
  --shadow-lg:  0 4px 6px rgba(0,0,0,.4);
}

/* ── Reset ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

img, svg { vertical-align: middle; }

/* ── Skip link ───────────────────────────────────────── */
.skip-link {
  position: fixed; top: -100%; left: var(--sp-4);
  background: var(--primary); color: #fff;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius);
  z-index: 1000; font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); }

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  display: flex; flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  transition: transform var(--transition);
}

.sidebar__brand {
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar__logo {
  font-size: 1.375rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}

.sidebar__sub {
  font-size: .75rem;
  color: var(--text-3);
  margin-top: var(--sp-1);
}

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--sp-3) var(--sp-3) var(--sp-6);
  overflow-y: auto;
}

.nav-group { margin-bottom: var(--sp-4); }

.nav-group__label {
  display: block;
  font-size: .6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-3);
  padding: var(--sp-2) var(--sp-3);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  color: var(--text-sidebar);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}

.nav-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}

.nav-link--active {
  background: rgba(59,130,246,.2);
  color: var(--text-sidebar-active);
  position: relative;
}

.nav-link--active::after {
  content: '';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e, 0 0 16px rgba(34,197,94,.4);
  animation: pulseGreen 1.5s ease-in-out infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px #22c55e, 0 0 16px rgba(34,197,94,.4); }
  50%      { opacity: .4; box-shadow: 0 0 4px #22c55e, 0 0 8px rgba(34,197,94,.2); }
}

.nav-link__icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  opacity: .7;
}
.nav-link--active .nav-link__icon { opacity: 1; }

.nav-link__badge {
  margin-left: auto;
  background: var(--bg-badge);
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  padding: 0 5px;
}

/* ── Scrim (mobile overlay) ──────────────────────────── */
.scrim {
  display: none;
  position: fixed; inset: 0;
  background: var(--bg-scrim);
  z-index: 99;
}

/* ── Main area ───────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Topbar ──────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-5);
  gap: var(--sp-4);
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.topbar__menu {
  display: none;
  background: none; border: none;
  color: var(--text); cursor: pointer;
  padding: var(--sp-2);
}

.topbar__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.topbar__theme {
  background: none; border: none;
  color: var(--text-2); cursor: pointer;
  padding: var(--sp-2);
  border-radius: var(--radius);
  transition: background var(--transition);
}
.topbar__theme:hover { background: var(--bg-hover); }

/* Theme icon toggle */
.icon-luna { display: none; }
:root[data-theme="dark"] .icon-sol { display: none; }
:root[data-theme="dark"] .icon-luna { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-sol { display: none; }
  :root:not([data-theme="light"]) .icon-luna { display: inline; }
}

.topbar__user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.avatar {
  width: 34px; height: 34px;
  background: #f97316;
  color: #ffffff;
  font-size: .875rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 2px rgba(249,115,22,.3);
  letter-spacing: .02em;
}

.inline { display: inline; }

/* ── Content ─────────────────────────────────────────── */
.content {
  flex: 1;
  padding: var(--sp-6) var(--sp-5);
  max-width: 1200px;
  width: 100%;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.card__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.card__body {
  padding: var(--sp-5);
}

/* ── Stat cards (dashboard) ──────────────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}

.stat__label {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  margin-bottom: var(--sp-1);
}

.stat__value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat__sub {
  font-size: .8125rem;
  color: var(--text-2);
  margin-top: var(--sp-1);
}

/* ── Tables ──────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

thead th {
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tbody tr:hover {
  background: var(--bg-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-size: .875rem;
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.5;
  font-family: inherit;
}

.btn--primary {
  background: var(--primary);
  color: var(--text-on-primary);
}
.btn--primary:hover { background: var(--primary-hover); text-decoration: none; }

.btn--secondary {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn--secondary:hover { background: var(--bg-hover); text-decoration: none; }

.btn--danger {
  background: var(--danger);
  color: #fff;
}
.btn--danger:hover { background: var(--danger-hover); text-decoration: none; }

.btn--ghost {
  background: none;
  color: var(--text-2);
  border: none;
  padding: var(--sp-1) var(--sp-2);
}
.btn--ghost:hover { color: var(--text); background: var(--bg-hover); text-decoration: none; }

.btn--sm { padding: var(--sp-1) var(--sp-3); font-size: .8125rem; }

.btn-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  align-items: center;
}

/* ── Forms ────────────────────────────────────────────── */
.form-group {
  margin-bottom: var(--sp-5);
}

.form-group label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--sp-1);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  font-size: .9375rem;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
}

.form-hint {
  font-size: .75rem;
  color: var(--text-3);
  margin-top: var(--sp-1);
}

.form-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  margin-top: var(--sp-6);
}

/* ── Pills / Badges ──────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-3);
  font-size: .75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.pill--success { background: #d1fae5; color: #065f46; }
.pill--warning { background: #fef3c7; color: #92400e; }
.pill--danger  { background: #fee2e2; color: #991b1b; }
.pill--info    { background: #cffafe; color: #155e75; }
.pill--accent  { background: #dbeafe; color: #1e40af; }
.pill--muted   { background: #f1f5f9; color: #475569; }

:root[data-theme="dark"] .pill--success { background: #064e3b; color: #6ee7b7; }
:root[data-theme="dark"] .pill--warning { background: #78350f; color: #fbbf24; }
:root[data-theme="dark"] .pill--danger  { background: #7f1d1d; color: #fca5a5; }
:root[data-theme="dark"] .pill--info    { background: #164e63; color: #67e8f9; }
:root[data-theme="dark"] .pill--accent  { background: #1e3a5f; color: #93c5fd; }
:root[data-theme="dark"] .pill--muted   { background: #334155; color: #94a3b8; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill--success { background: #064e3b; color: #6ee7b7; }
  :root:not([data-theme="light"]) .pill--warning { background: #78350f; color: #fbbf24; }
  :root:not([data-theme="light"]) .pill--danger  { background: #7f1d1d; color: #fca5a5; }
  :root:not([data-theme="light"]) .pill--info    { background: #164e63; color: #67e8f9; }
  :root:not([data-theme="light"]) .pill--accent  { background: #1e3a5f; color: #93c5fd; }
  :root:not([data-theme="light"]) .pill--muted   { background: #334155; color: #94a3b8; }
}

/* ── Toasts / Flash ──────────────────────────────────── */
.toasts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5) 0;
}

.toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  animation: toast-in 300ms ease;
}

.toast--ok      { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.toast--error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.toast--aviso   { background: #fef3c7; color: #92400e; border: 1px solid #fbbf24; }
.toast--info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

.toast__close {
  background: none; border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  padding: 0 var(--sp-1);
}
.toast__close:hover { opacity: 1; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Dialog ──────────────────────────────────────────── */
.dialog {
  border: none;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text);
  padding: var(--sp-6);
  max-width: 400px;
  width: 90vw;
  box-shadow: var(--shadow-lg);
}

.dialog::backdrop {
  background: var(--bg-scrim);
}

.dialog__msg {
  font-size: 1rem;
  margin-bottom: var(--sp-5);
  line-height: 1.5;
}

.dialog__actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: flex-end;
}

/* ── Toolbar (page-level actions bar) ────────────────── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.toolbar__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-2);
}

/* ── Empty state ─────────────────────────────────────── */
.empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
  color: var(--text-3);
}

.empty__icon {
  margin-bottom: var(--sp-3);
  opacity: .4;
}

.empty__text {
  font-size: 1rem;
  margin-bottom: var(--sp-4);
}

/* ── Utility ─────────────────────────────────────────── */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-3); }
.text-sm { font-size: .8125rem; }
.text-xs { font-size: .75rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.mt-4 { margin-top: var(--sp-4); }
.mt-6 { margin-top: var(--sp-6); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
.gap-2 { gap: var(--sp-2); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .scrim.open {
    display: block;
  }

  .main {
    margin-left: 0;
  }

  .topbar__menu {
    display: flex;
  }

  .content {
    padding: var(--sp-4);
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
}

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

  .btn-row {
    flex-direction: column;
  }

  .btn-row .btn {
    width: 100%;
    justify-content: center;
  }

  .cal-grid__day {
    min-height: 50px;
    padding: 2px;
  }

  .cal-grid__event {
    font-size: .625rem;
  }

  .topbar__title {
    font-size: .9375rem;
  }

  .card__header {
    padding: var(--sp-3) var(--sp-4);
    flex-wrap: wrap;
    gap: var(--sp-2);
  }

  .card__body {
    padding: var(--sp-3) var(--sp-4);
  }

  table {
    font-size: .8125rem;
  }

  thead th, tbody td {
    padding: var(--sp-2) var(--sp-3);
  }
}

/* ── Login page ──────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--sp-4);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}

.login-wrap::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(59,130,246,.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(16,185,129,.06) 0%, transparent 60%);
  animation: loginGlow 15s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes loginGlow {
  0%   { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(-3%, 3%) rotate(3deg); }
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: rgba(30,41,59,.92);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05);
  padding: 2.5rem 2rem;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(20px);
  color: #e2e8f0;
}

.login-card__icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), #10b981);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--sp-4);
  box-shadow: 0 4px 14px rgba(59,130,246,.3);
}
.login-card__icon svg { color: #fff; }

.login-card__logo {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: var(--sp-1);
  letter-spacing: -0.02em;
}

.login-card__sub {
  text-align: center;
  color: #94a3b8;
  font-size: .875rem;
  margin-bottom: var(--sp-8);
}

.login-card .form-group { margin-bottom: var(--sp-5); }
.login-card .form-group label {
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #94a3b8;
  margin-bottom: var(--sp-2);
}

.login-card .form-input {
  padding: .75rem 1rem;
  font-size: .9375rem;
  border-radius: .625rem;
  background: rgba(15,23,42,.6);
  border-color: rgba(255,255,255,.15);
  color: #e2e8f0;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.login-card .form-input::placeholder { color: #64748b; }
.login-card .form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,.2);
  background: rgba(15,23,42,.8);
}

.login-card .btn--primary {
  padding: .75rem 1rem;
  font-size: .9375rem;
  font-weight: 600;
  border-radius: .625rem;
  background: linear-gradient(135deg, var(--primary), #2563eb);
  transition: transform var(--transition), box-shadow var(--transition);
}
.login-card .btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,.3);
}
.login-card .btn--primary:active { transform: translateY(0); }

.password-group { position: relative; }
.password-toggle {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  padding: .25rem;
  display: flex;
  align-items: center;
}
.password-toggle:hover { color: var(--text-2); }

.password-toggle { color: #64748b; }
.password-toggle:hover { color: #94a3b8; }

.login-footer {
  text-align: center;
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .75rem;
  color: #64748b;
}

.login-error {
  background: rgba(239,68,68,.15);
  color: #fca5a5;
  padding: var(--sp-3) var(--sp-4);
  border-radius: .625rem;
  font-size: .875rem;
  margin-bottom: var(--sp-5);
  border: 1px solid rgba(239,68,68,.3);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.login-error svg { flex-shrink: 0; }

/* ── Checkbox ────────────────────────────────────────── */
.form-checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
}
.form-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

/* ── Nav link logout ─────────────────────────────────── */
.nav-link--logout {
  color: var(--text-3) !important;
  opacity: .7;
  margin-top: var(--sp-2);
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: var(--sp-3);
}
.nav-link--logout:hover {
  color: #ef4444 !important;
  background: rgba(239,68,68,.1);
  opacity: 1;
}

/* ── Calendar grid ───────────────────────────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cal-grid__header {
  background: var(--bg-hover);
  padding: var(--sp-2);
  text-align: center;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-3);
}

.cal-grid__day {
  background: var(--bg-card);
  padding: var(--sp-2);
  min-height: 80px;
  font-size: .75rem;
  position: relative;
}

.cal-grid__day--other { opacity: .4; }
.cal-grid__day--today { box-shadow: inset 0 2px 0 var(--primary); }

.cal-grid__num {
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.cal-grid__event {
  display: block;
  padding: 1px 4px;
  margin-bottom: 1px;
  border-radius: 3px;
  font-size: .6875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* ── Print ────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .scrim, .toasts, .skip-link { display: none !important; }
  .main { margin-left: 0 !important; }
  body { background: #fff; color: #000; }
}
