@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg:           #080c14;
  --bg-2:         #0d1117;
  --bg-3:         #131920;
  --panel:        rgba(255,255,255,0.04);
  --panel-hover:  rgba(255,255,255,0.07);
  --border:       rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.16);

  --blue:         #3b82f6;
  --blue-dim:     rgba(59,130,246,0.15);
  --blue-glow:    rgba(59,130,246,0.4);
  --green:        #10b981;
  --green-dim:    rgba(16,185,129,0.15);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,0.15);
  --amber:        #f59e0b;
  --amber-dim:    rgba(245,158,11,0.15);
  --purple:       #8b5cf6;
  --cyan:         #06b6d4;

  --text:         #e2e8f0;
  --text-2:       #94a3b8;
  --text-3:       #64748b;

  --sidebar-w:    240px;
  --radius:       10px;
  --radius-lg:    16px;
  --transition:   150ms cubic-bezier(0.4,0,0.2,1);
}

html { background: var(--bg); scroll-behavior: smooth; }

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

/* ── Scrollbar ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ── Layout ───────────────────────────────────────────────────────────────── */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}

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

.topbar {
  height: 56px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(12px);
}

.content {
  flex: 1;
  padding: 28px 28px 60px;
  max-width: 1200px;
  width: 100%;
}

/* ── Sidebar-Logo ─────────────────────────────────────────────────────────── */
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo-icon {
  width: 34px; height: 34px;
  background: var(--blue);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 16px var(--blue-glow);
  flex-shrink: 0;
}
.sidebar-logo-text { font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.sidebar-logo-sub  { font-size: 10px; color: var(--text-3); font-weight: 400; }

/* ── Sidebar-Navigation ───────────────────────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-3);
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  position: relative;
}
.nav-item:hover { background: var(--panel-hover); color: var(--text); }
.nav-item.active {
  background: var(--blue-dim);
  color: var(--blue);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--blue);
  border-radius: 0 3px 3px 0;
}
.nav-item .icon { font-size: 16px; flex-shrink: 0; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.sidebar-user:hover { background: var(--panel-hover); }
.sidebar-avatar {
  width: 30px; height: 30px;
  background: var(--blue-dim);
  border: 1px solid var(--blue);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  flex-shrink: 0;
}
.sidebar-username { font-size: 12px; font-weight: 600; }
.sidebar-role     { font-size: 10px; color: var(--text-3); }

/* ── Topbar ───────────────────────────────────────────────────────────────── */
.topbar-title { font-size: 15px; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.topbar-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
  position: relative;
}
.topbar-btn:hover { background: var(--panel-hover); color: var(--text); border-color: var(--border-hover); }

/* Notification Bell */
.notif-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
  border: 2px solid var(--bg-2);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .7; transform: scale(1.2); }
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-hover); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.card-title { font-size: 14px; font-weight: 600; }
.card-sub   { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* Stat-Cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
}
.stat-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.stat-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.stat-value { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ── Tabelle ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  animation: row-in var(--transition) both;
}
tbody tr:hover { background: var(--panel-hover); }
tbody tr:last-child { border-bottom: none; }
td {
  padding: 12px 14px;
  font-size: 13px;
  vertical-align: middle;
}

/* Staggered row animation */
@keyframes row-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
tbody tr:nth-child(1)  { animation-delay:  0ms; }
tbody tr:nth-child(2)  { animation-delay: 30ms; }
tbody tr:nth-child(3)  { animation-delay: 60ms; }
tbody tr:nth-child(4)  { animation-delay: 90ms; }
tbody tr:nth-child(5)  { animation-delay:120ms; }
tbody tr:nth-child(6)  { animation-delay:150ms; }
tbody tr:nth-child(7)  { animation-delay:180ms; }
tbody tr:nth-child(8)  { animation-delay:210ms; }
tbody tr:nth-child(9)  { animation-delay:240ms; }
tbody tr:nth-child(10) { animation-delay:270ms; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 0 0 var(--blue-glow);
}
.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 0 16px var(--blue-glow);
}

.btn-ghost {
  background: var(--panel);
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--panel-hover); color: var(--text); border-color: var(--border-hover); }

.btn-danger  { background: var(--red-dim);   color: var(--red);   border-color: rgba(239,68,68,.3); }
.btn-danger:hover  { background: var(--red);  color: #fff; }
.btn-success { background: var(--green-dim); color: var(--green); border-color: rgba(16,185,129,.3); }
.btn-success:hover { background: var(--green); color: #fff; }
.btn-amber   { background: var(--amber-dim); color: var(--amber); border-color: rgba(245,158,11,.3); }

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-xs { padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.btn-icon { padding: 6px; width: 32px; height: 32px; justify-content: center; }

/* ── Badges ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.badge-blue   { background: var(--blue-dim);  color: var(--blue);  }
.badge-green  { background: var(--green-dim); color: var(--green); }
.badge-red    { background: var(--red-dim);   color: var(--red);   }
.badge-amber  { background: var(--amber-dim); color: var(--amber); }
.badge-gray   { background: rgba(255,255,255,.06); color: var(--text-3); }
.badge-dot::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}
.form-input, .form-select, .form-textarea {
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-input::placeholder { color: var(--text-3); }
.form-select option { background: var(--bg-3); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--text-3); }
.form-error { font-size: 11px; color: var(--red); }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.col-span-2  { grid-column: 1 / -1; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fade-in 200ms ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modal-in 200ms cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.modal-header {
  padding: 20px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-close {
  background: none; border: none; color: var(--text-3);
  cursor: pointer; font-size: 18px; padding: 4px;
  transition: color var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-body   { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 0 24px 20px; display: flex; gap: 10px; justify-content: flex-end; }

/* ── Page-Transitions ─────────────────────────────────────────────────────── */
.page-enter {
  animation: page-in 180ms ease both;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── Skeleton Loader ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--panel) 25%, var(--panel-hover) 50%, var(--panel) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}
.skeleton-row { height: 44px; margin-bottom: 2px; border-radius: 4px; }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }

/* ── Toasts ───────────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 380px;
  pointer-events: all;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  animation: toast-in 300ms cubic-bezier(0.34,1.56,0.64,1) both;
}
.toast.out { animation: toast-out 250ms ease both; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px) scale(.9); }
  to   { opacity: 1; transform: none; }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateX(40px) scale(.9); }
}
.toast-success { border-color: rgba(16,185,129,.4); }
.toast-success .toast-icon { color: var(--green); }
.toast-error   { border-color: rgba(239,68,68,.4); }
.toast-error   .toast-icon { color: var(--red); }
.toast-info    .toast-icon { color: var(--blue); }
.toast-icon { font-size: 16px; flex-shrink: 0; }

/* ── Search Bar ───────────────────────────────────────────────────────────── */
.search-bar {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.search-bar input {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 7px 12px 7px 34px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color var(--transition);
}
.search-bar input:focus { outline: none; border-color: var(--blue); }
.search-icon {
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 14px;
  pointer-events: none;
}

/* ── Empty State ──────────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-3);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }
.empty-text { font-size: 14px; }

/* ── Dropdown ─────────────────────────────────────────────────────────────── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 200px;
  z-index: 150;
  overflow: hidden;
  animation: fade-in 150ms ease;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--transition);
  border: none; background: none; width: 100%; text-align: left; font-family: inherit;
}
.dropdown-item:hover { background: var(--panel-hover); color: var(--text); }
.dropdown-item.danger { color: var(--red); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-header { padding: 8px 14px 4px; font-size: 11px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }

/* ── Detail-Header ────────────────────────────────────────────────────────── */
.detail-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.detail-icon {
  width: 52px; height: 52px;
  background: var(--blue-dim);
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.detail-title { font-size: 20px; font-weight: 700; }
.detail-sub   { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Key-Value-Liste ──────────────────────────────────────────────────────── */
.kv-list { display: grid; grid-template-columns: 140px 1fr; gap: 8px 20px; }
.kv-key  { font-size: 12px; color: var(--text-3); font-weight: 500; padding-top: 1px; }
.kv-val  { font-size: 13px; }

/* ── Code / Mono ──────────────────────────────────────────────────────────── */
.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--bg-3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--cyan);
}

/* ── Alert ────────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-warn { background: var(--amber-dim); border: 1px solid rgba(245,158,11,.3); color: var(--amber); }
.alert-info { background: var(--blue-dim);  border: 1px solid rgba(59,130,246,.3);  color: var(--blue); }
.alert-danger { background: var(--red-dim); border: 1px solid rgba(239,68,68,.3);   color: var(--red); }

/* ── HU-Indikator ─────────────────────────────────────────────────────────── */
.hu-ok      { color: var(--green); }
.hu-warning { color: var(--amber); }
.hu-danger  { color: var(--red); }
.hu-overdue { color: var(--red); font-weight: 600; }

/* ── Hamburger (Mobile) ───────────────────────────────────────────────────── */
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 22px;
  cursor: pointer;
  padding: 4px;
}

/* ── Bottom-Nav (Mobile) ──────────────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  z-index: 100;
  backdrop-filter: blur(12px);
}
.bottom-nav-inner {
  display: flex;
  height: 100%;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text-3);
  cursor: pointer;
  font-size: 10px;
  border: none;
  background: none;
  transition: color var(--transition);
  position: relative;
}
.bottom-nav-item .icon { font-size: 20px; }
.bottom-nav-item.active { color: var(--blue); }
.bottom-nav-item .nav-badge {
  position: absolute;
  top: 6px; right: calc(50% - 22px);
  margin-left: 0;
}

/* ── Sidebar-Overlay (Mobile) ─────────────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 99;
}

/* ── Login-Seite ──────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(59,130,246,.12) 0%, transparent 70%),
              radial-gradient(ellipse 40% 40% at 80% 80%, rgba(139,92,246,.08) 0%, transparent 60%);
  pointer-events: none;
}
.login-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 44px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: modal-in 400ms cubic-bezier(0.34,1.1,0.64,1);
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 42px; height: 42px;
  background: var(--blue);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 24px var(--blue-glow);
}
.login-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.login-sub   { font-size: 13px; color: var(--text-3); margin-bottom: 28px; }
.login-form  { display: flex; flex-direction: column; gap: 14px; }
.login-footer { margin-top: 24px; font-size: 12px; color: var(--text-3); text-align: center; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 40px rgba(0,0,0,.6);
  }
  .sidebar-overlay.visible { display: block; }

  .main { margin-left: 0; }
  .topbar { padding: 0 16px; }

  .hamburger { display: flex; }
  .bottom-nav { display: flex; }

  .content { padding: 16px 16px 80px; }

  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: unset; }

  .detail-header { flex-direction: column; }
  .detail-actions { margin-left: 0; width: 100%; }

  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .kv-list { grid-template-columns: 110px 1fr; }

  .modal { max-width: 100%; border-radius: 16px 16px 0 0; }
  .modal-backdrop { align-items: flex-end; padding: 0; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .login-card { padding: 28px 24px; }
}
