:root {
  --bg: #0a0c10;
  --surface: #12151c;
  --surface2: #1a1f2a;
  --border: #2a3142;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #f5b942;
  --accent2: #e8913a;
  --danger: #f87171;
  --ok: #4ade80;
  --warn: #fbbf24;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.brand { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.5rem; color: var(--accent); }
.brand span { color: var(--text); }
.nav a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover, .nav a.active {
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
}
.main { padding: 2rem; max-width: 1100px; }
h1 { font-size: 1.75rem; margin-bottom: 1rem; }
h2 { font-size: 1.1rem; margin-bottom: 0.75rem; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.9rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}
.card .num { font-size: 2rem; font-weight: 700; color: var(--accent); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-scheduled { background: #60a5fa20; color: #93c5fd; }
.badge-pending { background: #fbbf2420; color: var(--warn); }
.badge-paid { background: #4ade8020; color: var(--ok); }
.badge-overdue { background: #f8717120; color: var(--danger); }
.badge-cancelled { background: #8b95a820; color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 0;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #1a1208;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.9rem;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn-secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-danger { background: #f8717130; color: var(--danger); border: 1px solid var(--danger); }
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 640px;
}
label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.35rem;
  margin-top: 1rem;
}
label:first-child { margin-top: 0; }
input, select, textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}
textarea { min-height: 90px; resize: vertical; }
.actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.inline-form { display: inline; }
.secret-line { display: inline-flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.btn-eye {
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1.2;
}
.btn-eye:hover { filter: brightness(1.08); }
.account-cell { min-width: 200px; font-size: 0.9rem; }
.logout { margin-top: auto; padding-top: 2rem; }
.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
@media (max-width: 768px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--border); }
}
