:root {
  --red: #9e1b26;
  --red-bright: #c4303b;
  --red-soft: #b8555c;
  --red-dark: #4a0d12;
  --ink: #0a0908;
  --panel: rgba(15, 13, 12, 0.88);
  --panel-solid: #121010;
  --line: rgba(196, 48, 59, 0.28);
  --line-soft: rgba(255, 255, 255, 0.07);
  --muted: #8f8b87;
  --text: #e8e5e0;
  --success: #5c9c6f;
  --danger: #b8622e;
  --warning: #b99348;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-display: 'Bebas Neue', 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  background: var(--ink);
  position: relative;
}

/* Dark vignette instead of bright ambient blobs */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(30, 8, 9, 0.55), transparent 55%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.7), transparent 60%);
}
.ambient::before {
  content: '';
  position: fixed;
  top: 50%; left: 50%;
  width: min(52vw, 620px);
  height: min(52vw, 620px);
  transform: translate(-50%, -50%);
  background-image: url('/logo.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.045;
  filter: grayscale(1) contrast(1.1);
}
.ambient::after { content: none; }

/* Film grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.stamp {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 2;
  transform: rotate(-6deg);
  border: 2px solid rgba(196, 48, 59, 0.6);
  border-radius: 3px;
  padding: 4px 11px;
  color: rgba(196, 48, 59, 0.75);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 3px;
  opacity: 0.85;
  mix-blend-mode: screen;
}

::selection { background: rgba(196, 48, 59, 0.4); color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(196, 48, 59, 0.3); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(196, 48, 59, 0.5); }

a { color: inherit; text-decoration: none; }

/* TOPBAR (icon nav) */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: #0a0808; border-bottom: 1px solid var(--line-soft);
  display: flex; align-items: center; gap: 4px; padding: 6px 22px; height: 64px; box-sizing: border-box;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; margin-right: 16px; padding-right: 16px; flex-shrink: 0; border-right: 1px solid var(--line-soft); }
.topbar-brand img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; border: 1px solid var(--line); filter: saturate(0.85); }
.topbar-brand span { font-family: var(--font-display); font-size: 19px; letter-spacing: 1.2px; color: #f2efe9; text-transform: uppercase; }
.topbar-collapsible { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.topbar-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-icon-label { display: none; }
.topbar-mobile-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line-soft); color: var(--text);
  width: 42px; height: 42px; border-radius: 4px; font-size: 20px; align-items: center; justify-content: center; cursor: pointer;
}
.topbar-mobile-toggle:hover { border-color: var(--line); color: var(--red-bright); }
.nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; font-size: 28px;
  color: var(--muted); border: 1px solid transparent; transition: 0.15s ease;
}
.nav-icon:hover { background: rgba(196, 48, 59, 0.08); color: var(--text); border-color: var(--line-soft); }
.nav-icon.active { background: rgba(196, 48, 59, 0.14); color: var(--red-bright); border-color: var(--line); }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle { cursor: pointer; background: none; font: inherit; }
.nav-dropdown-menu {
  display: none;
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  min-width: 270px; background: #120e0e; border: 1px solid var(--line-soft);
  border-radius: 6px; padding: 12px 0; box-shadow: 0 12px 28px rgba(0,0,0,0.55);
  z-index: 200;
}
.nav-dropdown-menu::before {
  content: ''; position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 13px; height: 13px; background: #120e0e; border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft);
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown-label {
  font-family: var(--font-display); font-size: 18px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--red-bright); padding: 4px 20px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft);
}
.nav-dropdown-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 20px; font-size: 15.5px; font-weight: 600; color: var(--text);
  transition: 0.15s ease;
}
.nav-dropdown-item i { width: 20px; text-align: center; color: var(--muted); font-size: 19px; }
.nav-dropdown-item:hover { background: rgba(196, 48, 59, 0.1); color: var(--red-bright); }
.nav-dropdown-item:hover i { color: var(--red-bright); }
.nav-dropdown-item.active { color: var(--red-bright); background: rgba(196, 48, 59, 0.08); }
.nav-dropdown-item.active i { color: var(--red-bright); }

.topbar-duty-wrap { position: relative; margin-left: auto; }
.topbar-duty {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border: 1px solid var(--line-soft); border-radius: 3px;
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; white-space: nowrap;
  background: none; cursor: pointer; font-family: inherit;
  transition: 0.15s ease;
}
.topbar-duty:hover { color: var(--text); border-color: var(--line); background: rgba(196, 48, 59, 0.06); }
.topbar-duty-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px rgba(92, 156, 111, 0.6); flex-shrink: 0; }
.topbar-duty-dot.off { background: var(--warning); box-shadow: 0 0 6px rgba(185, 147, 72, 0.6); }

.topbar-duty-panel {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 220px; max-width: 260px; max-height: 360px; overflow-y: auto;
  background: #120e0e; border: 1px solid var(--line-soft); border-radius: 6px;
  padding: 8px 0; box-shadow: 0 12px 28px rgba(0,0,0,0.55); z-index: 200;
}
.topbar-duty-panel.open { display: block; }
.topbar-duty-label {
  font-family: var(--font-display); font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--red-bright); padding: 8px 14px 6px;
}
.topbar-duty-label:not(:first-child) { border-top: 1px solid var(--line-soft); margin-top: 4px; }
.topbar-duty-row {
  display: flex; align-items: center; gap: 9px; padding: 6px 14px; text-decoration: none; color: var(--text);
  font-size: 12.5px; font-weight: 600; transition: 0.15s ease;
}
.topbar-duty-row:hover { background: rgba(196, 48, 59, 0.1); color: var(--red-bright); }
.topbar-duty-row img { width: 22px; height: 22px; border-radius: 3px; border: 1px solid var(--line); object-fit: cover; flex-shrink: 0; }
.topbar-duty-empty { padding: 8px 14px; font-size: 12px; color: var(--muted); font-style: italic; }
.topbar-off-day-form { display: flex; align-items: center; gap: 6px; padding: 6px 14px 8px; }
.topbar-off-day-form input[type="date"] { flex: 1; min-width: 0; padding: 6px 8px; font-size: 11.5px; }
.topbar-off-day-form button { flex-shrink: 0; }
.topbar-off-day-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 14px;
  font-size: 12px; color: var(--text);
}
.topbar-off-day-remove {
  background: none; border: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px;
}
.topbar-off-day-remove:hover { color: var(--danger); }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-shrink: 0; padding-left: 16px; border-left: 1px solid var(--line-soft); }
.topbar-user img { width: 36px; height: 36px; border-radius: 4px; border: 1px solid var(--line); filter: saturate(0.85); }
.topbar-user .name { font-size: 14px; font-weight: 600; line-height: 1.2; }
.topbar-user .rank { font-size: 10.5px; color: var(--red-bright); font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; }
.logout-btn {
  background: none; border: 1px solid var(--line-soft); color: var(--muted); cursor: pointer; font-size: 11px; padding: 8px 12px; border-radius: 3px;
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px;
}
.logout-btn:hover { color: var(--red-bright); border-color: var(--line); }

/* ORG BAR */
.org-bar {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  padding: 9px 18px; background: #070606; border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.org-bar .org-name { color: var(--red-bright); font-weight: 700; }
.org-bar .org-sub { color: var(--muted); margin-left: 6px; }
.org-bar .org-stats { display: flex; gap: 22px; }
.org-bar .org-stats div { text-align: right; }
.org-bar .org-stats label { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: 0.6px; }
.org-bar .org-stats strong { color: var(--text); font-size: 12.5px; }

.main { padding: 32px 44px 50px; max-width: 1760px; margin: 0 auto; }

h2 {
  margin-top: 0; font-family: var(--font-display); font-weight: 400; font-size: 32px;
  color: #f2efe9; letter-spacing: 1px; text-transform: uppercase;
}
.subtitle { color: var(--muted); margin-top: -8px; margin-bottom: 26px; font-size: 13px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.hero {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: clamp(26px, 4vw, 46px);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(74, 13, 18, 0.4), rgba(4, 4, 4, 0.97));
  box-shadow: var(--shadow);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 88% 8%, rgba(196, 48, 59, 0.14), transparent 32%);
}
.hero-inner { position: relative; z-index: 1; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px;
  border: 1px solid var(--line); border-radius: 2px; color: var(--red-soft);
  background: rgba(0, 0, 0, 0.5); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px;
}
.hero h2 { margin: 16px 0 8px; font-size: clamp(32px, 5vw, 54px); color: #f2efe9; }
.hero p { margin: 0; color: #a9a5a0; max-width: 540px; font-size: 13.5px; line-height: 1.65; }

.launcher-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; margin-bottom: 24px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.launcher-card {
  padding: 22px 20px;
  background: #0d0b0b;
  transition: background 0.18s ease;
  display: block;
}
.launcher-card:hover { background: #150f0f; }
.launcher-icon { font-size: 18px; filter: grayscale(1) contrast(1.2) brightness(1.3); opacity: 0.85; }
.launcher-card h3 {
  margin: 12px 0 6px; color: #f2efe9; font-family: var(--font-display); font-weight: 400;
  font-size: 18px; letter-spacing: 1px; text-transform: uppercase;
}
.launcher-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; min-height: 32px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin-bottom: 24px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.stat-card { padding: 18px 20px; background: #0d0b0b; }
.stat-card .value, .stat-card strong {
  font-family: var(--font-display); font-weight: 400; font-size: 30px; display: block; letter-spacing: 0.5px; color: var(--red-soft);
}
.stat-card .label, .stat-card label { color: var(--muted); font-size: 10px; margin-top: 6px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; display: block; }

/* In-game record strip (character/phone/account ID/discord) on member profiles */
.detail-strip { display: flex; flex-wrap: wrap; }
.detail-item {
  flex: 1 1 140px; padding: 14px 20px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.detail-item:last-child { border-right: none; }
.detail-item label { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 5px; }
.detail-item strong { font-weight: 600; font-size: 14px; color: var(--text); }
.detail-item strong.copy-value { transition: color 0.15s ease; }
.detail-item strong.copy-value:hover { color: var(--red-bright); text-decoration: underline dotted; text-underline-offset: 3px; }

.btn-ghost-sm {
  background: none; border: 1px solid var(--line-soft); color: var(--muted); cursor: pointer;
  font-size: 11px; padding: 8px 14px; border-radius: 3px; text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px;
  transition: 0.15s ease;
}
.btn-ghost-sm:hover { color: var(--red-bright); border-color: var(--line); background: rgba(196, 48, 59, 0.08); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
th { color: var(--red-soft); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; }
tr:hover td { background: rgba(196, 48, 59, 0.035); }
tr:last-child td { border-bottom: none; }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 2px;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; border: 1px solid;
}
.badge.rank-1IC { color: var(--red-soft); border-color: var(--line); background: rgba(196, 48, 59, 0.08); }
.badge.rank-2IC { color: var(--warning); border-color: rgba(185, 147, 72, 0.35); background: rgba(185, 147, 72, 0.08); }
.badge.rank-3IC { color: var(--success); border-color: rgba(92, 156, 111, 0.35); background: rgba(92, 156, 111, 0.08); }
.badge.rank-Member { color: var(--muted); border-color: rgba(143,139,135,0.3); background: rgba(143,139,135,0.06); }
.badge.status-active, .badge.status-open { color: var(--red-soft); border-color: var(--line); background: rgba(196, 48, 59, 0.08); }
.badge.status-resolved, .badge.status-done { color: var(--success); border-color: rgba(92,156,111,0.35); background: rgba(92, 156, 111, 0.08); }
.badge.status-in_progress { color: var(--warning); border-color: rgba(185,147,72,0.35); background: rgba(185, 147, 72, 0.08); }

form.inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; }
input, textarea, select {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line-soft);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 2px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: 0.15s ease;
}
select option { background: #140a0b; color: #fff; }
input:focus, textarea:focus, select:focus { border-color: var(--red); }
textarea { resize: vertical; min-height: 60px; }

/* Custom dropdown (progressively replaces native <select>, see custom-select.js) */
.cs-wrap { position: relative; display: inline-block; width: 100%; }
.cs-native { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cs-trigger {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line-soft);
  color: var(--text);
  padding: 9px 30px 9px 12px;
  border-radius: 2px;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: 0.15s ease;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-trigger::after {
  content: '';
  position: absolute;
  right: 11px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.15s ease;
}
.cs-trigger:hover { border-color: var(--line); }
.cs-trigger.open { border-color: var(--red); }
.cs-trigger.open::after { transform: translateY(-35%) rotate(-135deg); }
.cs-menu {
  display: none;
  position: absolute;
  z-index: 1200;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: #0d0b0b;
  border: 1px solid var(--line);
  border-radius: 2px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.cs-menu.show { display: block; }
.cs-option { padding: 8px 12px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.cs-option:hover { background: rgba(196, 48, 59, 0.12); }
.cs-option.selected { color: var(--red-bright); font-weight: 600; }

/* Themed file input */
.file-input { position: relative; display: inline-block; width: 100%; }
.file-input input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-input-display {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.15s ease;
}
.file-input:hover .file-input-display { border-color: var(--line); }
.file-input-display .btn-label {
  background: rgba(196, 48, 59, 0.15);
  border: 1px solid var(--line);
  color: var(--red-soft);
  padding: 3px 10px;
  border-radius: 2px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

button, .btn {
  border: 1px solid var(--red);
  border-radius: 2px;
  padding: 9px 18px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  cursor: pointer;
  transition: 0.15s ease;
  color: #f2efe9;
  background: linear-gradient(180deg, rgba(196,48,59,0.28), rgba(74,13,18,0.4));
}
button:hover:not(:disabled) { background: rgba(196, 48, 59, 0.35); }
button.danger { color: #d98a6a; background: rgba(184, 98, 46, 0.12); border-color: rgba(184, 98, 46, 0.4); }
button.small { padding: 4px 10px; font-size: 10px; }
button.ghost { background: transparent; border: 1px solid var(--line-soft); color: var(--muted); }
button.ghost:hover { border-color: var(--line); color: var(--red-soft); }
button.btn-primary-lg, a.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  font-size: 12.5px;
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
  background: linear-gradient(135deg, #d13d47, var(--red-dark));
  border: 1px solid var(--red-bright);
  box-shadow: 0 8px 22px rgba(196, 48, 59, 0.28);
  cursor: pointer;
}
button.btn-primary-lg:hover:not(:disabled), a.btn-primary-lg:hover { background: linear-gradient(135deg, #e04a54, var(--red)); box-shadow: 0 10px 26px rgba(196, 48, 59, 0.4); }

.empty { color: var(--muted); font-style: italic; padding: 20px 0; font-size: 13px; }

.kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.kanban-col { background: #0d0b0b; padding: 16px; }
.kanban-col h3 { font-family: var(--font-display); font-weight: 400; font-size: 15px; text-transform: uppercase; color: var(--red-soft); letter-spacing: 1.2px; margin-top: 0; }
.mission-card { background: rgba(255,255,255,0.02); border: 1px solid var(--line-soft); border-radius: 2px; padding: 13px; margin-bottom: 8px; }
.mission-card .title { font-weight: 600; margin-bottom: 4px; color: var(--text); font-size: 13px; }
.mission-card .desc { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mission-card .assignees { font-size: 11px; color: var(--muted); margin-bottom: 8px; }

/* LOGIN */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-shell {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  overflow: hidden;
  background: #0a0908;
  box-shadow: var(--shadow);
}
.login-brand {
  min-height: 560px;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  background: linear-gradient(180deg, #150e0e 0%, #060404 100%);
  overflow: hidden;
  text-align: center;
}
.login-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(196, 48, 59, 0.16), transparent 55%);
}
.login-brand .brand-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.brand-crest {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(196, 48, 59, 0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  margin-bottom: 20px;
  filter: contrast(1.08) saturate(0.95);
}
.brand-kicker {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 2px; color: var(--red-soft);
  background: rgba(0, 0, 0, 0.5); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2.5px;
}
.login-brand p { margin: 14px 0 0; color: #9a9691; max-width: 380px; font-size: 13px; line-height: 1.7; }

.login-panel { padding: 52px 46px; display: flex; flex-direction: column; justify-content: center; background: #0c0a09; }
.login-card { border: none; background: none; padding: 0; text-align: left; width: auto; }
.login-card h1 {
  color: #f2efe9; margin: 0 0 10px; font-family: var(--font-display); font-weight: 400;
  font-size: 30px; letter-spacing: 1px; text-transform: uppercase;
}
.login-card p { color: var(--muted); margin-bottom: 26px; font-size: 13.5px; line-height: 1.65; }
.discord-btn {
  display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(180deg, rgba(196,48,59,0.35), rgba(74,13,18,0.5));
  color: #f2efe9; border: 1px solid var(--red);
  padding: 13px 28px; border-radius: 2px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 12px; transition: background 0.15s ease;
}
.discord-btn:hover { background: rgba(196, 48, 59, 0.4); }
.error-text { color: var(--danger); font-size: 12.5px; margin-top: 18px; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .main { padding: 20px; }
  .org-bar .org-stats { display: none; }
  .topbar-user .name, .topbar-user .rank { display: none; }
}

@media (max-width: 480px) {
  .login-panel { padding: 32px 24px; }
}

/* Mobile topbar: collapse nav/duty/user behind a hamburger toggle once
   everything stops fitting in one row. */
@media (max-width: 760px) {
  .topbar { padding: 6px 14px; gap: 8px; }
  .topbar-brand { padding-right: 10px; margin-right: 0; }
  .topbar-brand span { font-size: 15px; }
  .topbar-mobile-toggle { display: inline-flex; }

  .topbar-collapsible {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0a0808; border-bottom: 1px solid var(--line-soft);
    max-height: calc(100vh - 64px); overflow-y: auto;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.5);
  }
  .topbar-collapsible.open { display: flex; }

  .topbar-nav { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
  .nav-icon {
    width: 100%; height: auto; border-radius: 0; justify-content: flex-start; gap: 14px;
    padding: 13px 18px; font-size: 18px; border-bottom: 1px solid var(--line-soft);
  }
  .nav-icon-label { display: inline; font-size: 14px; font-weight: 600; font-family: 'Inter', sans-serif; text-transform: none; letter-spacing: normal; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; }

  .nav-dropdown-menu {
    display: none;
    position: static; transform: none; min-width: 0; width: 100%;
    background: rgba(0, 0, 0, 0.35); border: none; border-radius: 0;
    box-shadow: none; padding: 4px 0 8px;
  }
  .nav-dropdown-menu::before { content: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-item { padding: 11px 18px 11px 34px; }
  .nav-dropdown-label { padding: 8px 18px 8px 34px; }

  .topbar-duty-wrap, .topbar-user {
    width: 100%; margin-left: 0; border-left: none; border-top: 1px solid var(--line-soft);
    padding: 12px 18px;
  }
  .topbar-duty { width: 100%; justify-content: flex-start; }
  .topbar-duty-panel { position: static; margin-top: 10px; max-width: none; width: 100%; box-shadow: none; }
  .topbar-user { justify-content: space-between; }
}

/* Wide data tables scroll horizontally on narrow screens instead of
   squishing illegibly — wrapper added at runtime by responsive.js.
   overflow-x:auto only applies on mobile: setting it unconditionally would
   also force overflow-y to compute as auto (CSS quirk when only one axis is
   set to non-visible), clipping anything that pops out above/below a row —
   like the sparkline hover tooltips — even on desktop where no scrolling
   was ever needed. */
@media (max-width: 760px) {
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-scroll > table,
  .table-scroll > table.roster-table {
    width: max-content;
    min-width: 100%;
    table-layout: auto;
  }
  .kanban { grid-template-columns: 1fr; }
}

.section-title { font-size: 10px; text-transform: uppercase; color: var(--red-soft); font-weight: 700; letter-spacing: 1.5px; margin: 26px 0 0; padding-bottom: 10px; border-bottom: 1px solid var(--line-soft); }

/* MODULE GRID (dashboard) */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* Two-column page layout: main content + a fixed sidebar, so wide screens
   don't leave large dead space next to a single narrow column of cards. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.split .side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .split .side { position: static; }
}

/* Card-grid list (e.g. gangs) instead of a single stacked column */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gang-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--muted);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gang-card.hostility-high { border-left-color: var(--red-bright); }
.gang-card.hostility-medium { border-left-color: var(--warning); }
.gang-card.hostility-low { border-left-color: var(--success); }
.gang-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gang-card-stats { color: var(--muted); font-size: 11.5px; }
.gang-card-notes { color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.gang-card-aliases { color: var(--muted); font-size: 11px; }
.gang-card-actions { display: flex; gap: 6px; margin-top: auto; padding-top: 8px; }

/* Gang Map (Leaflet, atlas-style GTA map) */
.gang-map-canvas { width: 100%; height: 560px; background: #0a0808; }
.gang-map-canvas-sm { width: 100%; height: 260px; background: #0a0808; border-radius: 3px; overflow: hidden; }
.gang-map-canvas-xl { width: 100%; height: 100%; background: #0a0808; }

/* Gang Map page: narrow title/legend rail on the left, map takes over the
   entire right side of the screen. */
.gang-map-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; height: calc(100vh - 190px); min-height: 480px; }
.gang-map-layout-side { display: flex; flex-direction: column; height: 100%; overflow-y: auto; }
.gang-map-layout-side .card { margin-top: 6px; }
.gang-map-layout-main { height: 100%; }
@media (max-width: 900px) {
  .gang-map-layout { grid-template-columns: 1fr; height: auto; }
  .gang-map-layout-side { height: auto; }
  .gang-map-canvas-xl { height: 480px; }
}
.gang-map-pin { color: var(--red-bright); font-size: 26px; text-shadow: 0 1px 3px rgba(0,0,0,0.8); filter: drop-shadow(0 0 4px rgba(196,48,59,0.6)); }
/* Animate the inner icon glyph, not the marker's own element — Leaflet uses
   that element's `transform` to position it on the map, so animating
   `transform` there fights Leaflet every frame and the pin appears to
   vanish (it's being shoved off to the untransformed origin). */
.gang-map-pin-highlight { color: #ffd23f; }
.gang-map-pin-highlight i { display: inline-block; animation: gangPinPulse 0.6s ease-in-out 3; }
@keyframes gangPinPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.5); }
}

/* Gang Map side legend */
.turf-legend-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft); transition: background 0.15s ease;
}
.turf-legend-item:last-child { border-bottom: none; }
.turf-legend-item:hover, .turf-legend-item.active { background: rgba(196, 48, 59, 0.08); }
.turf-legend-item i { color: var(--red-bright); font-size: 14px; flex-shrink: 0; }
.turf-legend-item span { font-size: 13px; font-weight: 600; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #120e0e; color: var(--text); border: 1px solid var(--line-soft); }
.leaflet-popup-content a { color: var(--red-soft); font-weight: 600; }
.leaflet-container { background: #0a0808 !important; font-family: 'Inter', sans-serif; }

/* Visual "pick an already-uploaded photo" thumbnail picker (journal
   new-entry/edit forms) */
.image-picker { display: flex; flex-wrap: wrap; gap: 8px; max-height: 168px; overflow-y: auto; padding: 4px; border: 1px solid var(--line-soft); border-radius: 4px; }
.image-picker:empty::after { content: 'No photos uploaded yet.'; color: var(--muted); font-size: 12px; font-style: italic; padding: 4px; }
.image-picker-item {
  width: 64px; height: 64px; border-radius: 3px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; flex-shrink: 0; transition: 0.15s ease;
}
.image-picker-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-picker-item:hover { border-color: var(--line); }
.image-picker-item.selected { border-color: var(--red-bright); box-shadow: 0 0 0 2px rgba(196, 48, 59, 0.3); }

/* Gallery */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.photo-tile {
  position: relative; display: block; aspect-ratio: 1; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--line-soft); background: #0d0b0b;
  padding: 0; text-align: left; cursor: pointer; font: inherit; width: 100%;
}
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.photo-tile:hover img { transform: scale(1.06); }
.photo-tile-overlay {
  position: absolute; inset: auto 0 0 0; padding: 20px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: #f2efe9;
}
.photo-tile-caption { font-size: 12.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.photo-tile-caption i { color: var(--red-bright); margin-right: 4px; }
.photo-tile-meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

/* Beef timeline on a gang's profile */
.beef-timeline-item { display: flex; gap: 14px; }
.beef-timeline-rail { display: flex; flex-direction: column; align-items: center; width: 12px; flex-shrink: 0; }
.beef-timeline-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.beef-timeline-dot.active { background: var(--red-bright); box-shadow: 0 0 8px rgba(196, 48, 59, 0.6); }
.beef-timeline-dot.resolved { background: var(--success); }
.beef-timeline-line { width: 2px; flex: 1; min-height: 24px; background: var(--line-soft); margin-top: 4px; }
.beef-timeline-content { flex: 1; padding-bottom: 20px; }
.beef-timeline-item:last-child .beef-timeline-content { padding-bottom: 0; }
.beef-timeline-head { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; flex-wrap: wrap; }
.beef-timeline-date { font-size: 12px; color: var(--muted); }
.beef-timeline-desc { font-size: 13px; line-height: 1.55; color: var(--text); }

.member-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--muted);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.member-card:hover { background: rgba(196, 48, 59, 0.06); }
.member-card img { width: 40px; height: 40px; border-radius: 4px; border: 1px solid var(--line); filter: saturate(0.85); flex-shrink: 0; }
.member-card .name { font-weight: 600; font-size: 13.5px; }
.member-card.rank-1IC { border-left-color: var(--red-bright); }
.member-card.rank-2IC { border-left-color: var(--warning); }
.member-card.rank-3IC { border-left-color: var(--success); }
.member-card.rank-Member { border-left-color: var(--muted); }
.module-card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 3px; padding: 20px; }

/* Roster data table (grouped-by-rank employee-record style) */
.roster-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.roster-table td, .roster-table th { overflow: hidden; text-overflow: ellipsis; }
.roster-table th { background: rgba(15, 15, 15, 0.7); }
.roster-table thead tr:first-child th { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
th.rank-group-header { display: table-cell; }
th.rank-group-header .badge { margin-right: 8px; }
.rank-group-count { color: var(--muted); font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: 0; }
.roster-table thead th:not(.rank-group-header) { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; text-align: left; }
.roster-table tbody td { padding: 10px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.roster-table tbody tr:last-child td { border-bottom: none; }
.roster-table tbody tr:hover td { background: rgba(196, 48, 59, 0.035); }
.roster-avatar { width: 34px; height: 34px; border-radius: 4px; border: 1px solid var(--line); object-fit: cover; display: block; filter: saturate(0.85); }
.roster-name-link { font-weight: 600; font-size: 13.5px; color: var(--text); text-decoration: none; }
.roster-name-link:hover { color: var(--red-bright); }
.roster-sub { color: var(--muted); font-size: 11px; margin-top: 2px; }
.roster-muted { color: var(--muted); font-size: 13px; }
.discord-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 3px;
  border: 1px solid var(--line-soft); color: var(--muted); font-size: 11.5px; cursor: pointer; transition: 0.15s ease;
}
.discord-chip:hover { border-color: #7289da; color: #8ea1e1; background: rgba(114, 137, 218, 0.08); }
.discord-chip i { color: #7289da; }
.roster-kebab {
  background: none; border: none; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 3px; font-size: 15px;
}
.roster-kebab:hover { color: var(--red-bright); background: rgba(196, 48, 59, 0.08); }

/* Duty check-in card on the dashboard */
.duty-card {
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(196, 48, 59, 0.1), rgba(0, 0, 0, 0.85));
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.duty-card .duty-status { font-family: var(--font-display); font-size: 18px; letter-spacing: 0.5px; }
.duty-card .duty-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.duty-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.duty-dot.on { background: var(--success); box-shadow: 0 0 8px var(--success); }
.duty-dot.off { background: var(--muted); }

/* Activity heatmap (member profile) — one separated calendar block per
   month, like a real calendar, with a single shared Mon/Wed/Fri label
   column on the left. */
.heatmap-wrap { overflow-x: auto; padding-bottom: 6px; display: flex; gap: 14px; width: max-content; }
.heatmap-weekday-labels {
  display: grid; grid-template-rows: repeat(7, 12px); gap: 3px;
  font-size: 9px; color: var(--muted); text-align: right; flex-shrink: 0;
}
.heatmap-months-row { display: flex; gap: 16px; align-items: flex-start; }
.heatmap-month-block { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.heatmap-month-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.heatmap-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 12px); gap: 3px; }
.heatmap-cell {
  width: 12px; height: 12px; border-radius: 2px; background: rgba(255, 255, 255, 0.05);
  position: relative; cursor: default;
}
.heatmap-cell.empty { background: transparent; }
.heatmap-cell.active { background: var(--red); box-shadow: 0 0 4px rgba(196, 48, 59, 0.5); }
.heatmap-cell.future { background: transparent; }
/* A day leadership declared off — distinct from both "active" and "missed"
   so it doesn't read as a gap in someone's activity. */
.heatmap-cell.off-day {
  background: repeating-linear-gradient(45deg, rgba(185, 147, 72, 0.35) 0, rgba(185, 147, 72, 0.35) 2px, transparent 2px, transparent 5px);
}
.heatmap-cell.off-day.active { background: var(--warning); box-shadow: 0 0 4px rgba(185, 147, 72, 0.5); }
.heatmap-cell:not(.future):not(.empty):hover { outline: 1px solid var(--red-bright); }

/* Custom hover tooltip (no external library) */
.heatmap-cell[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d0b0b;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 20;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.heatmap-cell[data-tip]:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--line);
  z-index: 20;
  pointer-events: none;
}
.heatmap-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 10.5px; color: var(--muted); }

/* Compact single-row activity strip (Activity comparison page) — same idea
   as the calendar heatmap above, but flattened to the last 10 days so many
   members can be scanned/compared at a glance without scrolling. */
/* .roster-table td has overflow:hidden for text-ellipsis truncation
   elsewhere — that also clips this cell's hover tooltip, so this specific
   column needs it back to visible. */
.roster-table td.sparkline-td { overflow: visible; }
.sparkline { display: flex; gap: 3px; }
.sparkline-cell {
  width: 26px; height: 18px; border-radius: 2px; background: rgba(255, 255, 255, 0.05);
  position: relative; flex-shrink: 0; cursor: default;
}
.sparkline-cell.active { background: var(--red); }
.sparkline-cell.off {
  background: repeating-linear-gradient(45deg, rgba(185, 147, 72, 0.35) 0, rgba(185, 147, 72, 0.35) 2px, transparent 2px, transparent 5px);
}
.sparkline-cell.off.active { background: var(--warning); }
.sparkline-cell:hover { outline: 1px solid var(--red-bright); }
.sparkline-labels { margin-bottom: 2px; }
.sparkline-label {
  width: 26px; height: auto; background: none; display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; letter-spacing: 0.4px; color: var(--muted);
}
.sparkline-cell[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  background: #0d0b0b;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 3px;
  white-space: nowrap;
  z-index: 20;
  box-shadow: var(--shadow);
  pointer-events: none;
}
.module-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.module-card-head .icon { font-size: 18px; color: var(--red-soft); }
.module-card-head h3 { margin: 0; color: #f2efe9; font-family: var(--font-display); font-weight: 400; font-size: 17px; letter-spacing: 0.6px; text-transform: uppercase; }
.module-card p { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.module-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 2px;
  border: 1px solid var(--line); background: rgba(196, 48, 59, 0.07); color: var(--text);
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: 0.15s ease;
}
.pill-link:hover { background: rgba(196, 48, 59, 0.16); border-color: var(--red); }

/* TABLE TOOLBAR */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .search-input { flex: 1; min-width: 180px; max-width: 320px; }
.toolbar .search-input input { width: 100%; }
.count-pill { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; margin-left: auto; }

/* Highlighted "name of importance" — rival gangs mentioned in free text */
.gang-tag {
  background: rgba(196, 48, 59, 0.16);
  color: var(--red-bright);
  border-bottom: 1px solid var(--red);
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 700;
  cursor: pointer;
}
.gang-tag:hover { background: rgba(196, 48, 59, 0.28); }
.gang-edit-panel { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.gang-edit-panel.show { display: block; }
.mention-tag { color: var(--red-soft); font-weight: 600; cursor: pointer; }
.mention-tag:hover { text-decoration: underline; }

/* Journal-style timeline log */
.log-list { display: flex; flex-direction: column; gap: 2px; }
.log-entry {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--red);
  padding: 14px 18px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.log-entry:hover { background: rgba(196, 48, 59, 0.035); border-left-color: var(--red-bright); }
.log-entry-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.log-entry-date { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.5px; color: #f2efe9; }
.log-entry-ago { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.log-entry-body { font-size: 13.5px; line-height: 1.65; color: var(--text); }
.log-entry-body img { max-width: 100%; }

/* On a gang profile, long journal entries are split into lines/sentences —
   the one(s) that actually mention this gang get highlighted so they don't
   get lost in unrelated info; everything else is dimmed slightly. */
.log-line { padding: 2px 0; color: var(--muted); }
.log-line-hit {
  color: var(--text); background: rgba(196, 48, 59, 0.1);
  border-left: 2px solid var(--red-bright); padding: 6px 10px; margin: 3px 0;
  border-radius: 0 2px 2px 0;
}

/* MODAL */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  padding: 20px;
  place-items: center;
}
.modal-backdrop.show { display: grid; }
.modal {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(160deg, #150e0e, #070505 80%);
  box-shadow: var(--shadow);
  padding: 24px;
}
.modal.modal-lg { width: min(1000px, 94vw); }
.modal h3 {
  margin: 0 0 6px; color: #f2efe9; font-family: var(--font-display); font-weight: 400;
  font-size: 20px; letter-spacing: 1px; text-transform: uppercase;
}
.modal p { margin: 0 0 16px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.modal .field { margin-bottom: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* TOAST */
.toast-zone { position: fixed; right: 18px; bottom: 18px; z-index: 2100; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 36px)); }
.toast {
  padding: 12px 14px; border-radius: 2px; background: #0d0b0b; border: 1px solid var(--line-soft);
  box-shadow: var(--shadow); font-size: 12.5px; animation: toastIn 0.2s ease;
}
.toast.success { border-color: rgba(92, 156, 111, 0.4); color: #a3d4ae; }
.toast.error { border-color: rgba(196, 48, 59, 0.5); color: #e79aa0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
