:root {
  --bg: #0a0c10;
  --bg-2: #0e1118;
  --panel: #12161f;
  --panel-2: #171c27;
  --soft: #1c2330;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f3f5f8;
  --text-2: #c7ceda;
  --muted: #8b94a7;
  --accent: #c9a227;
  --accent-soft: rgba(201, 162, 39, 0.14);
  --accent-text: #f3d56a;
  --ok: #2fbf7a;
  --ok-soft: rgba(47, 191, 122, 0.14);
  --warn: #e0a045;
  --warn-soft: rgba(224, 160, 69, 0.14);
  --danger: #ef5f6d;
  --danger-soft: rgba(239, 95, 109, 0.14);
  --info: #5b8def;
  --info-soft: rgba(91, 141, 239, 0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font: "Manrope", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --sidebar: 268px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
::selection { background: rgba(201, 162, 39, 0.35); }

/* ==========================================================================
   GLOBAL FORM CONTROLS & INPUT STYLING (High-Contrast Dark Theme)
   Tüm admin sayfalarında yazıların net görünmesini sağlar (beyaz zemin/beyaz yazı hatasını çözer)
   ========================================================================== */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]),
select,
textarea,
.form-control {
  font: inherit !important;
  color: #ffffff !important;
  background-color: #141b26 !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  box-sizing: border-box !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #f59e0b !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]):focus,
select:focus,
textarea:focus,
.form-control:focus {
  outline: none !important;
  border-color: #f59e0b !important;
  background-color: #1a2332 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
}

input::placeholder, textarea::placeholder {
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  opacity: 1 !important;
}

select option {
  background-color: #141b26 !important;
  color: #ffffff !important;
}
::selection { background: rgba(201, 162, 39, 0.35); }

/* ---------- AUTH ---------- */
.auth-body {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--bg);
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(700px 420px at 20% 10%, rgba(201, 162, 39, 0.22), transparent 60%),
    radial-gradient(600px 380px at 80% 90%, rgba(47, 191, 122, 0.08), transparent 55%),
    linear-gradient(155deg, #0b0e14 0%, #141925 48%, #0a0c10 100%);
  border-right: 1px solid var(--line);
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 30% 20%, black, transparent 70%);
  pointer-events: none;
}

.auth-hero-top,
.auth-hero-bottom { position: relative; z-index: 1; }

.auth-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-hero h2 {
  margin: 72px 0 14px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.08;
  font-weight: 700;
  max-width: 10ch;
  letter-spacing: -0.03em;
}

.auth-hero p {
  margin: 0;
  color: var(--text-2);
  max-width: 36ch;
  line-height: 1.6;
  font-size: 1.02rem;
}

.auth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.auth-chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(500px 280px at 80% 0%, rgba(201, 162, 39, 0.08), transparent 60%),
    var(--bg-2);
}

.auth-wrap { width: min(420px, 100%); }

.auth-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px;
  box-shadow: var(--shadow);
  animation: rise 0.55s var(--ease) both;
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.auth-card .auth-sub {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #111;
  background: linear-gradient(145deg, #f0d36a, #c9a227);
  box-shadow: 0 8px 24px rgba(201, 162, 39, 0.25);
}

.auth-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- APP SHELL ---------- */
.app-body {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(201, 162, 39, 0.07), transparent 50%),
    var(--bg);
}

.sidebar {
  background: rgba(14, 17, 24, 0.92);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  backdrop-filter: blur(16px);
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px 10px 16px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.sidebar-brand small {
  color: var(--muted);
  font-size: 0.75rem;
}

.nav-label {
  padding: 4px 12px 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
  transition: background 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease);
  font-weight: 600;
  font-size: 0.92rem;
}

.sidebar-nav a svg {
  width: 18px;
  height: 18px;
  opacity: 0.85;
  flex-shrink: 0;
}

.sidebar-nav a:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}

.sidebar-nav a.active {
  background: var(--accent-soft);
  color: var(--accent-text);
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.22);
}

.sidebar-nav a.active svg { opacity: 1; }
.sidebar-nav a i {
  width: 18px;
  text-align: center;
  opacity: 0.85;
  flex-shrink: 0;
}
.sidebar-nav a.active i { opacity: 1; color: var(--accent-text); }
.auth-mark.destan-mark {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 60%, #d97706 100%);
  color: #0b0e14;
  font-weight: 900;
}

.sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sidebar-foot a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.88rem;
}

.sidebar-foot a.danger { color: #f1a0a8; }
.sidebar-foot a:hover { background: rgba(255,255,255,0.04); color: var(--text); }

.main { min-width: 0; width: 100%; display: flex; flex-direction: column; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 18px 28px 10px;
}

.topbar-left { min-width: 0; }

.topbar .crumb {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #111;
  background: linear-gradient(145deg, #f0d36a, #c9a227);
}

.user-chip span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(47, 191, 122, 0.55);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 191, 122, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(47, 191, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 191, 122, 0); }
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.content {
  width: 100%;
  max-width: none;
  padding: 16px clamp(14px, 2.4vw, 32px) 48px;
  animation: rise 0.45s var(--ease) both;
}

/* ---------- STATS / PANELS ---------- */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 50%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow, rgba(201,162,39,0.16)), transparent 70%);
  pointer-events: none;
}

.stat-card .stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: var(--glow-soft, var(--accent-soft));
  color: var(--glow-text, var(--accent-text));
}

.stat-card .stat-icon svg { width: 18px; height: 18px; }

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-card strong {
  display: block;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-card em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
}

.stat-card.tone-ok { --glow: rgba(47,191,122,0.18); --glow-soft: var(--ok-soft); --glow-text: #7ee0b0; }
.stat-card.tone-info { --glow: rgba(91,141,239,0.18); --glow-soft: var(--info-soft); --glow-text: #9bbbff; }
.stat-card.tone-warn { --glow: rgba(224,160,69,0.18); --glow-soft: var(--warn-soft); --glow-text: #f0c48a; }

.dash-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 14px;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.025), transparent 35%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}

.panel-head h2 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-body { padding: 16px; }

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.data th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.015);
  position: sticky;
  top: 0;
}

table.data tbody tr {
  transition: background 0.15s ease;
}

table.data tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

table.data td.mono,
.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--soft);
  color: var(--text-2);
  border: 1px solid var(--line);
}

/* ---------- FORMS / BUTTONS ---------- */
.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea { min-height: 120px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(201, 162, 39, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 11px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.15s var(--ease), filter 0.15s ease, background 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(145deg, #f0d36a, #c9a227);
  color: #14110a;
  box-shadow: 0 8px 20px rgba(201, 162, 39, 0.2);
}

.btn-primary:hover { filter: brightness(1.05); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: rgba(255,255,255,0.06); }

.btn-danger {
  background: var(--danger-soft);
  color: #ffb4bc;
  border: 1px solid rgba(239, 95, 109, 0.3);
}

.btn-sm { padding: 7px 10px; font-size: 0.8rem; border-radius: 9px; }
.btn-block { width: 100%; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.toolbar form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
}

.toolbar input,
.toolbar select {
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  min-width: 180px;
  outline: none;
}

.toolbar input:focus,
.toolbar select:focus {
  border-color: rgba(201, 162, 39, 0.5);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge-ok { background: var(--ok-soft); color: #8be0b3; border-color: rgba(47,191,122,0.25); }
.badge-warn { background: var(--warn-soft); color: #f0c48a; border-color: rgba(224,160,69,0.25); }
.badge-danger { background: var(--danger-soft); color: #f0a0a8; border-color: rgba(239,95,109,0.25); }

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.9rem;
}

.alert-error,
.alert-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 95, 109, 0.35);
  color: #ffc2c8;
}

.alert-ok,
.alert-success {
  background: var(--ok-soft);
  border-color: rgba(47, 191, 122, 0.35);
  color: #b7efd0;
}

.muted { color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pagination a.active {
  background: linear-gradient(145deg, #f0d36a, #c9a227);
  color: #14110a;
  border-color: transparent;
}

/* ---------- MODAL ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.72);
  display: none;
  place-items: center;
  z-index: 80;
  padding: 20px;
  backdrop-filter: blur(6px);
}

.modal-backdrop.open { display: grid; animation: fade 0.2s ease; }

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  width: min(560px, 100%);
  background: var(--panel-2);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: var(--shadow);
  animation: rise 0.28s var(--ease);
}

.modal-head,
.modal-foot {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
  gap: 8px;
}

.modal-body { padding: 16px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 25;
}

/* ---------- INFRA / PIPELINE ---------- */
.infra-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(91, 141, 239, 0.16), transparent 55%),
    radial-gradient(420px 200px at 100% 100%, rgba(201, 162, 39, 0.12), transparent 50%),
    linear-gradient(160deg, #121820 0%, #0e1219 100%);
}

.infra-hero.compact {
  align-items: center;
  padding: 16px 20px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 700;
}

.infra-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.pipeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pipeline li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--text-2);
}

.pipeline li span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.infra-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.04);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.infra-pill.ok {
  background: var(--ok-soft);
  border-color: rgba(47, 191, 122, 0.35);
  color: #b7efd0;
}

.infra-pill.warn {
  background: var(--warn-soft);
  border-color: rgba(224, 160, 69, 0.35);
  color: #f0d2a0;
}

.soft-hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0;
}

.section-label {
  margin: 0 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.check-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.check-item strong { min-width: 140px; }
.check-item span { color: var(--muted); font-size: 0.88rem; flex: 1; }
.check-item.done {
  border-color: rgba(47, 191, 122, 0.28);
  background: rgba(47, 191, 122, 0.06);
}

.buy-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.buy-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(91, 141, 239, 0.08);
  border: 1px solid rgba(91, 141, 239, 0.18);
  font-size: 0.8rem;
  color: var(--text-2);
}

.buy-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.72rem;
  background: var(--info-soft);
  color: #9bbcff;
}

.field-toggle {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(47, 191, 122, 0.28);
  background: rgba(47, 191, 122, 0.07);
  margin-bottom: 12px;
}

.field-toggle input { width: auto !important; margin-top: 3px; }
.field-toggle span { display: flex; flex-direction: column; gap: 2px; }
.field-toggle small { color: var(--muted); font-size: 0.8rem; }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  font-size: 0.8rem;
  color: var(--text-2);
  cursor: pointer;
}

.chip-check input { width: auto; }

.modal-lg { width: min(640px, 100%); }

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}

.nav-card:hover {
  border-color: rgba(201, 162, 39, 0.35);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.nav-card strong { font-size: 1rem; }
.nav-card span { color: var(--muted); font-size: 0.82rem; line-height: 1.4; }

@media (max-width: 860px) {
  .buy-steps { grid-template-columns: 1fr; }
}

.fm-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  font-size: 0.82rem;
  font-family: var(--mono);
}

.fm-crumbs a { color: var(--accent-text); }
.fm-crumbs span { color: var(--muted); }

.fm-editor {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
  background: #0b0e14;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  color: var(--text);
  resize: vertical;
  min-height: 360px;
}

.fm-table .fm-ico {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 8px;
  vertical-align: middle;
}
.fm-table .fm-ico.is-dir {
  background: var(--info);
  box-shadow: 0 0 0 3px var(--info-soft);
}
.fm-table .fm-ico.is-file {
  background: var(--muted);
}

/* Terminal file manager */
.term-shell {
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid #1e2a1e;
  overflow: hidden;
  background: #0b120c;
  box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.term-titlebar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #1a241c, #121a14);
  border-bottom: 1px solid #243028;
}

.term-dots { display: flex; gap: 6px; }
.term-dots i {
  width: 10px; height: 10px; border-radius: 50%; display: block;
  background: #3d4a40;
}
.term-dots i:nth-child(1) { background: #ff5f56; }
.term-dots i:nth-child(2) { background: #ffbd2e; }
.term-dots i:nth-child(3) { background: #27c93f; }

.term-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: #8fa894;
}

.term-actions { display: flex; gap: 10px; }
.term-actions a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #6dcf7a;
}

.term-body {
  padding: 14px 16px 18px;
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.55;
  color: #c8e6cc;
  min-height: 420px;
  background:
    radial-gradient(800px 300px at 10% 0%, rgba(39, 201, 63, 0.05), transparent 50%),
    #0b120c;
}

.term-line { margin: 0 0 4px; word-break: break-all; }
.term-line.dim { color: #5f7a63; }
.term-line.out { color: #9fd8a8; }
.term-line.err { color: #ff8b8b; }
.term-line.hint { margin-top: 10px; font-size: 0.75rem; }

.term-ls {
  margin: 6px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.term-row {
  display: grid;
  grid-template-columns: 110px 72px 1fr;
  gap: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #c8e6cc;
  text-decoration: none;
}
.term-row:hover { background: rgba(109, 207, 122, 0.1); }
.term-row .perm { color: #6a8f72; }
.term-row .size { color: #7a9a80; text-align: right; }
.term-row.is-dir .name { color: #6dcf7a; font-weight: 600; }
.term-row.is-file .name { color: #d7ecd9; }

.term-prompt {
  margin-top: 8px;
  border-top: 1px dashed #243028;
  padding-top: 12px;
}
.term-prompt label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.term-prompt .who { color: #6dcf7a; font-weight: 700; }
.term-prompt .path { color: #5b8def; }
.term-prompt .dollar { color: #c8e6cc; }
.term-prompt input {
  flex: 1;
  min-width: 180px;
  background: transparent;
  border: 0;
  outline: 0;
  color: #e8ffe9;
  font-family: var(--mono);
  font-size: 0.84rem;
  padding: 0;
}

.term-nano {
  margin: 8px 0 16px;
  border: 1px solid #2a3a2e;
  border-radius: 8px;
  overflow: hidden;
  background: #07100a;
}
.term-nano-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: #1a2e20;
  color: #b7efd0;
  font-size: 0.78rem;
}
.term-nano-bar button,
.term-nano-bar a {
  background: transparent;
  border: 0;
  color: #6dcf7a;
  font-family: var(--mono);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.term-nano textarea {
  width: 100%;
  min-height: 380px;
  border: 0;
  resize: vertical;
  background: #07100a;
  color: #d7ecd9;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 12px;
  outline: none;
}

@media (max-width: 1200px) {
  .grid-stats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .auth-body { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .app-body { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.28s var(--ease);
    width: min(300px, 88vw);
    height: 100vh;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
}

@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr; }
  .content, .topbar { padding-left: 14px; padding-right: 14px; }
  .user-chip span:not(.live-dot):not(.user-avatar) { display: none; }
  .topbar h1 { font-size: 1.15rem; }
  table.data th, table.data td { padding: 10px 8px; font-size: 0.82rem; }
  .table-wrap, .data-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 640px) {
  .grid-stats { grid-template-columns: 1fr; }
  .btn { min-height: 44px; }
  .content { padding-bottom: 28px; }
}
