:root {
  --bg: #0A0F1E;
  --bg-2: #0E142A;
  --bg-3: #121A33;

  --navy-deep: #050912;
  --blue: #3B82F6;
  --blue-bright: #60A5FA;
  --blue-deep: #1D4ED8;
  --blue-glow: rgba(59, 130, 246, 0.45);
  --blue-edge: rgba(59, 130, 246, 0.15);
  --blue-fill: rgba(59, 130, 246, 0.08);
  --blue-fill-2: rgba(59, 130, 246, 0.12);

  --platinum: #E6EAF5;
  --platinum-soft: #C7CEE3;
  --platinum-muted: #8892B0;
  --platinum-dim: #5A6488;

  --gold: #F59E0B;
  --red: #EF4444;
  --green: #10B981;
  --purple: #8B5CF6;

  --radius: 14px;
  --radius-lg: 18px;
  --radius-sm: 8px;

  --glass-bg: rgba(59, 130, 246, 0.06);
  --glass-border: rgba(59, 130, 246, 0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--platinum);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

#ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(59,130,246,0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 30%, rgba(59,130,246,0.07), transparent 70%);
}

.display { font-family: 'Clash Display', 'Inter', sans-serif; letter-spacing: -0.025em; font-weight: 600; }
h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; color: #F4F7FF; }
h2 { font-size: clamp(22px, 3vw, 28px); color: #F0F4FF; }

.view { position: relative; z-index: 1; }
.muted { color: var(--platinum-muted); }
.small { font-size: 12px; }

/* ---------- LOGIN ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Clash Display', sans-serif; font-weight: 700; font-size: 22px; color: white;
  box-shadow: 0 6px 24px var(--blue-glow);
}
.brand-name { font-size: 20px; color: #F4F7FF; }
.brand-sub { font-size: 12px; color: var(--platinum-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.brand-sm .brand-mark { width: 36px; height: 36px; font-size: 18px; border-radius: 10px; }
.brand-sm .brand-name { font-size: 16px; }

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(10px);
}
.login-card { width: 100%; max-width: 420px; }
.login-card h2 { margin-bottom: 6px; }
.login-card p { margin-bottom: 20px; font-size: 14px; }

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--platinum-soft);
  margin: 14px 0 6px;
}
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  width: 100%;
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--platinum);
  padding: 12px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--blue);
  background: rgba(10, 15, 30, 0.85);
}
textarea { resize: vertical; min-height: 120px; font-family: inherit; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2360A5FA' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  color: white;
  border: none;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: 0 6px 20px var(--blue-glow);
  transition: transform 0.1s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 24px var(--blue-glow); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--platinum-soft);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-ghost:hover { border-color: var(--blue); color: var(--platinum); }

.error {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #FCA5A5;
  font-size: 13px;
}

/* ---------- TOPBAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(10, 15, 30, 0.8);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
}
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.tab {
  background: transparent;
  border: none;
  color: var(--platinum-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.tab:hover { color: var(--platinum); }
.tab.active { color: var(--blue-bright); background: var(--blue-fill); }

.atab {
  background: transparent;
  border: none;
  color: var(--platinum-muted);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.atab:hover { color: var(--platinum); }
.atab.active { color: var(--blue-bright); background: var(--blue-fill); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

/* ---------- CONTAINER ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 24px 80px;
}
.tab-panel > h1 { margin-bottom: 6px; }
.tab-panel > .muted { margin-bottom: 28px; }

.eyebrow {
  color: var(--blue-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ---------- DASHBOARD ---------- */
.apt-card {
  background: linear-gradient(135deg, var(--bg-2), var(--bg-3));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.apt-card::before {
  content: '';
  position: absolute; top: -30%; right: -10%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, var(--blue-glow), transparent 65%);
  pointer-events: none;
}
.apt-title { font-size: 24px; color: #F4F7FF; margin-bottom: 4px; }
.apt-addr { font-size: 14px; color: var(--platinum-soft); }
.apt-meta { font-size: 13px; color: var(--platinum-muted); margin-top: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 32px;
}
.stats-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) { .stats-6 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .stats-6 { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-value { font-family: 'Clash Display', sans-serif; font-size: 32px; font-weight: 600; color: #F4F7FF; }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--platinum-muted); margin-top: 4px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; margin-top: 8px;
}
.section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.15em; color: var(--platinum-muted); }
.link {
  background: none; border: none; color: var(--blue-bright);
  font: inherit; font-size: 13px; cursor: pointer; font-weight: 500;
}
.link:hover { color: white; }

.quick-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px; margin-bottom: 36px;
}
.quick {
  display: flex; align-items: center; gap: 14px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  color: var(--platinum);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.quick:hover { border-color: var(--blue); background: var(--blue-fill-2); transform: translateY(-1px); }
.quick-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  flex-shrink: 0;
}
.icon-warn { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; }
.icon-list { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.icon-doc { background: var(--blue-fill-2); color: var(--blue-bright); }
.quick-label { font-weight: 600; font-size: 15px; color: var(--platinum); }
.quick-sub { font-size: 12px; color: var(--platinum-muted); margin-top: 2px; }

/* ---------- TICKETS / DOC LIST ---------- */
.ticket-list { display: flex; flex-direction: column; gap: 10px; }
.ticket-list-full { gap: 12px; }
.ticket {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.ticket-info { flex: 1; min-width: 0; }
.ticket-title { font-weight: 600; font-size: 15px; color: var(--platinum); }
.ticket-meta { font-size: 12px; color: var(--platinum-muted); margin-top: 4px; }
.badge {
  font-size: 11px; font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.empty {
  background: var(--glass-bg);
  border: 1px dashed var(--glass-border);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  color: var(--platinum-muted);
}

.doc-list { display: flex; flex-direction: column; gap: 10px; }
.doc {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
  font: inherit;
  color: var(--platinum);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.doc:hover { border-color: var(--blue); background: var(--blue-fill-2); }
.doc-icon {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--blue-fill-2); color: var(--blue-bright);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  flex-shrink: 0;
}
.doc-info { flex: 1; min-width: 0; }
.doc-name { font-weight: 600; font-size: 15px; }
.doc-type { font-size: 12px; color: var(--platinum-muted); margin-top: 2px; }
.doc-arrow { color: var(--platinum-muted); font-size: 18px; }

/* ---------- FORM ---------- */
.form-card { max-width: 720px; }
.label-row { display: flex; justify-content: space-between; align-items: center; }
.label-row label { margin: 14px 0 6px; }
.priority-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.prio {
  background: rgba(10, 15, 30, 0.6);
  border: 1px solid var(--glass-border);
  color: var(--platinum-soft);
  padding: 10px;
  border-radius: var(--radius-sm);
  font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.prio:hover { border-color: var(--blue); }
.prio.active[data-prio="low"]    { background: rgba(107, 114, 128, 0.3); border-color: #9CA3AF; color: white; }
.prio.active[data-prio="medium"] { background: rgba(59, 130, 246, 0.3); border-color: var(--blue); color: white; }
.prio.active[data-prio="high"]   { background: rgba(245, 158, 11, 0.3); border-color: var(--gold); color: white; }
.prio.active[data-prio="urgent"] { background: rgba(239, 68, 68, 0.3); border-color: var(--red); color: white; }

.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 12px 0 0;
  font-size: 13px; color: var(--platinum-soft);
  text-transform: none; letter-spacing: 0; font-weight: 400;
  cursor: pointer;
}
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--bg-3);
  border: 1px solid var(--glass-border);
  color: var(--platinum);
  padding: 12px 20px;
  border-radius: var(--radius);
  z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  font-size: 14px;
}
.toast.success { border-color: var(--green); }
.toast.error   { border-color: var(--red); }

/* ---------- ADMIN: filters + clickable rows ---------- */
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.filter-bar select { margin: 0; }

.ticket-clickable {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font: inherit;
  color: var(--platinum);
  text-align: left;
  width: 100%;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.ticket-clickable:hover { border-color: var(--blue); background: var(--blue-fill-2); transform: translateY(-1px); }
.ticket-badges { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- ADMIN: drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(5, 9, 18, 0.7);
  backdrop-filter: blur(4px);
  z-index: 50;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  background: var(--bg-2);
  border-left: 1px solid var(--glass-border);
  z-index: 51;
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,0.5);
}
.drawer-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--glass-border);
}
.drawer-head h2 { font-size: 22px; margin: 4px 0 6px; }
.drawer-body {
  flex: 1; overflow-y: auto;
  padding: 22px 28px 32px;
}
.td-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.td-row .section-title { margin-bottom: 6px; }
.td-row .badge { display: inline-block; }
.td-description {
  white-space: pre-wrap;
  background: rgba(10, 15, 30, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--platinum-soft);
}
.td-selfhelp {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 14px; color: var(--platinum-soft);
}

@media (max-width: 640px) {
  .td-row { grid-template-columns: 1fr; }
  .drawer { width: 100vw; }
  .drawer-head, .drawer-body { padding-left: 18px; padding-right: 18px; }
}

/* ---------- ADMIN: AI panel ---------- */
.ai-block {
  margin-top: 22px;
  background: rgba(10, 15, 30, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.ai-block-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.ai-block-body { display: flex; flex-direction: column; }
.ai-block-body label { margin-top: 12px; }
.ai-block-body label:first-child { margin-top: 0; }
.small-btn { padding: 6px 12px; font-size: 12px; }

.ai-pre {
  white-space: pre-wrap; word-break: break-word;
  font-family: inherit; font-size: 13px;
  color: var(--platinum-soft);
}
.kv-list { display: flex; flex-direction: column; gap: 8px; }
.kv-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--glass-border);
}
.kv-row:last-child { border-bottom: none; }
.kv-key {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--platinum-muted); text-transform: uppercase;
}
.kv-val { font-size: 13px; color: var(--platinum-soft); white-space: pre-wrap; word-break: break-word; }

.rating-row { display: flex; gap: 6px; margin-top: 6px; }
.rating-star {
  background: transparent;
  border: none;
  color: var(--platinum-dim);
  font-size: 22px; line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.1s;
}
.rating-star:hover { color: var(--gold); }
.rating-star.on { color: var(--gold); }

.draft-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 16px;
}
.draft-actions .btn-primary,
.draft-actions .btn-ghost { width: auto; margin-top: 0; flex: 1; min-width: 120px; padding: 10px 16px; font-size: 13px; }
.btn-ghost.btn-danger { color: #FCA5A5; border-color: rgba(239, 68, 68, 0.3); }
.btn-ghost.btn-danger:hover { color: #FCA5A5; border-color: var(--red); }

/* ---------- ADMIN: Timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px dashed var(--glass-border);
}
.tl-item:last-child { border-bottom: none; }
.tl-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-fill-2); color: var(--blue-bright);
  font-size: 14px; font-weight: 700;
  flex-shrink: 0;
}
.tl-status   .tl-icon { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.tl-ai       .tl-icon { background: rgba(139, 92, 246, 0.15); color: #C4B5FD; }
.tl-feedback .tl-icon { background: rgba(16, 185, 129, 0.15); color: #6EE7B7; }
.tl-notif    .tl-icon { background: rgba(96, 165, 250, 0.15); color: var(--blue-bright); }
.tl-notif-fail .tl-icon { background: rgba(239, 68, 68, 0.15); color: #FCA5A5; }
.tl-created  .tl-icon { background: rgba(107, 114, 128, 0.2); color: var(--platinum-soft); }

.tl-body { min-width: 0; }
.tl-title { font-size: 13px; font-weight: 600; color: var(--platinum); }
.tl-sub { font-size: 12px; color: var(--platinum-soft); margin-top: 2px; word-break: break-word; }
.tl-time { font-size: 11px; color: var(--platinum-muted); margin-top: 2px; }

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; }
  .priority-row { grid-template-columns: repeat(2, 1fr); }
  .topbar-inner { gap: 12px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .container { padding: 24px 16px 60px; }
}

/* ==========================================================
   MOBILE POLISH
   ========================================================== */
@media (max-width: 720px) {
  /* Brand: keep the mark only, drop the long company text */
  .topbar .brand-name,
  .topbar .brand-sub { display: none; }
  .topbar .brand { gap: 0; }

  /* Compact topbar; nav becomes a horizontal scroll strip on its own row */
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .nav {
    order: 3; width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .tab, .atab {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 14px;
    scroll-snap-align: start;
  }

  /* Free up the right slot for the Abmelden button */
  #user-name, #admin-user-name { display: none; }
  .topbar-right { margin-left: auto; }
  .btn-ghost { padding: 10px 14px; min-height: 40px; }

  /* Tighter container padding */
  .container { padding: 20px 14px 64px; }

  /* Dashboard cards */
  .apt-card { padding: 20px; }
  .apt-title { font-size: 22px; }
  .stats { gap: 8px; }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 26px; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick { padding: 14px; }

  /* Ticket rows: badges stack below info on narrow screens */
  .ticket, .ticket-clickable {
    flex-wrap: wrap;
    padding: 14px;
  }
  .ticket-badges {
    width: 100%;
    justify-content: flex-start;
    margin-top: 4px;
  }

  /* Filter bar fits two filters per row */
  .filter-bar { gap: 8px; grid-template-columns: 1fr 1fr; }

  /* Drawer: slide-in + safe-area + larger headers */
  .drawer {
    width: 100vw;
    animation: drawer-in 0.22s ease-out;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .drawer-head { padding: 18px 18px 14px; }
  .drawer-head h2 { font-size: 20px; line-height: 1.2; }
  .drawer-body {
    padding: 18px;
    padding-bottom: calc(40px + env(safe-area-inset-bottom));
  }
  .td-row { grid-template-columns: 1fr; gap: 12px; }
  .ai-block { padding: 14px; }

  /* Key-value rows stack the label above */
  .kv-row { grid-template-columns: 1fr; gap: 2px; padding: 8px 0; }
  .kv-key { font-size: 10px; }
  .kv-val { font-size: 13px; }

  /* Draft action buttons full-width, big tap target */
  .draft-actions { flex-direction: column; }
  .draft-actions .btn-primary,
  .draft-actions .btn-ghost { flex: 1 1 100%; padding: 14px 16px; min-height: 48px; }

  /* >=16px font on inputs prevents iOS auto-zoom on focus */
  input[type="text"], input[type="email"], input[type="password"],
  textarea, select {
    font-size: 16px;
    padding: 12px 14px;
  }
  textarea { min-height: 100px; }

  /* Priority pills easier to tap */
  .prio { padding: 12px; min-height: 44px; }

  /* Login screen breathes on small screens */
  .login-wrap { padding: 16px; gap: 20px; min-height: 100dvh; }
  .login-card { padding: 22px; }
}

@keyframes drawer-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@media (max-width: 480px) {
  .stats-6 { grid-template-columns: repeat(2, 1fr); }
  .stat-value { font-size: 24px; }
  .filter-bar { grid-template-columns: 1fr; }
  .topbar-inner { padding: 8px 12px; gap: 8px; }
  h1 { font-size: 26px; }
  .ticket-clickable { gap: 8px; }
  .timeline .tl-item { grid-template-columns: 26px 1fr; gap: 10px; }
  .tl-icon { width: 26px; height: 26px; font-size: 13px; }
}
