/* ============================================================
   OmniCore Group — Design System
   ============================================================ */

:root {
  --bg:          #0d0f1a;
  --surface:     #161824;
  --surface-2:   #1e2035;
  --surface-3:   #252840;
  --border:      #2a2d3e;
  --border-soft: #1e2138;

  --accent:       #c0190f;
  --accent-hover: #a0140c;
  --accent-muted: rgba(192, 25, 15, 0.12);
  --accent-glow:  rgba(192, 25, 15, 0.25);

  --success: #22c55e;
  --success-muted: rgba(34, 197, 94, 0.12);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.12);
  --danger:  #ef4444;
  --danger-muted: rgba(239, 68, 68, 0.12);
  --info:    #3b82f6;
  --info-muted: rgba(59, 130, 246, 0.12);

  --text:       #e8eaf6;
  --text-muted: #8b8fa8;
  --text-dim:   #4c5068;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow:    0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --nav-height: 68px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: opacity .15s; }
a:hover { opacity: .85; }

img { pointer-events: none; display: block; }

h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; color: var(--text); }

/* ---- Scrollbar ------------------------------------------- */
::-webkit-scrollbar { width: 6px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }

/* ---- Container ------------------------------------------- */
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 780px; }
.text-center { text-align: center; }

/* ---- Page wrap ------------------------------------------- */
.page-wrap { min-height: calc(100vh - var(--nav-height)); }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(13, 15, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  width: 100%;
  height: 100%;
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--text) !important;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.nav-brand img { border-radius: .375rem; width: 40px; height: 40px; }
.nav-brand:hover { opacity: 1 !important; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
  flex: 1;
}

.nav-link {
  padding: .45rem .85rem;
  border-radius: var(--radius-xs);
  color: var(--text-muted) !important;
  font-size: .875rem;
  font-weight: 500;
  transition: color .15s, background .15s;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nav-link:hover, .nav-link.active {
  color: var(--text) !important;
  background: var(--surface);
  opacity: 1 !important;
}
.nav-link.active { color: var(--text) !important; }
.nav-link--admin { color: var(--accent) !important; }
.nav-link--admin:hover, .nav-link--admin.active {
  background: var(--accent-muted);
  color: var(--accent) !important;
}

.nav-actions { display: flex; align-items: center; gap: .75rem; }

.nav-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
}
.nav-avatar { width: 24px; height: 24px; border-radius: 50%; }
.nav-username { font-size: .8125rem; font-weight: 500; color: var(--text-muted); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, opacity .15s, transform .1s;
  white-space: nowrap;
  text-decoration: none !important;
}
.btn:hover:not(:disabled) { opacity: .9; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn-accent  { background: var(--accent); color: #fff; }
.btn-accent:hover:not(:disabled) { background: var(--accent-hover); opacity: 1; }

.btn-ghost   { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); opacity: 1; }

.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--surface); opacity: 1; }

.btn-success { background: var(--success-muted); color: var(--success); border: 1px solid rgba(34,197,94,.25); }
.btn-success:hover { background: rgba(34,197,94,.22); opacity: 1; }

.btn-danger  { background: var(--danger-muted); color: var(--danger); border: 1px solid rgba(239,68,68,.25); }
.btn-danger:hover  { background: rgba(239,68,68,.22); opacity: 1; }

.btn-info    { background: var(--info-muted); color: var(--info); border: 1px solid rgba(59,130,246,.25); }
.btn-info:hover    { background: rgba(59,130,246,.22); opacity: 1; }

.btn-lg  { padding: .75rem 1.75rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sm  { padding: .35rem .85rem; font-size: .8125rem; }
.btn-xs  { padding: .2rem .55rem; font-size: .75rem; border-radius: var(--radius-xs); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: .9rem;
  font-weight: 500;
  border-left: 4px solid;
}
.alert--success { background: var(--success-muted); color: var(--success); border-color: var(--success); }
.alert--danger  { background: var(--danger-muted);  color: var(--danger);  border-color: var(--danger); }
.alert--info    { background: var(--info-muted);    color: var(--info);    border-color: var(--info); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge--pending { background: var(--warning-muted); color: var(--warning); }
.badge--success { background: var(--success-muted); color: var(--success); }
.badge--danger  { background: var(--danger-muted);  color: var(--danger); }
.badge--info    { background: var(--info-muted);    color: var(--info); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: block;
  margin-bottom: .5rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}
.form-hint { color: var(--text-muted); font-weight: 400; font-size: .8rem; }

.form-control {
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-dim); }

textarea.form-control { resize: vertical; min-height: 80px; line-height: 1.6; }

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b8fa8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
select.form-control option { background: var(--surface-2); color: var(--text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4rem 1.5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(3px);
  opacity: .58;
  transform: scale(1.05);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,9,18,.55) 0%, rgba(8,9,18,.75) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  padding: .3rem 1rem;
  background: var(--accent-muted);
  border: 1px solid rgba(192,25,15,.3);
  border-radius: 100px;
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-dim);
  animation: bounce 2s infinite;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  text-decoration: none !important;
}
.hero-scroll-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   FEATURES SECTION
   ============================================================ */
.features-section {
  padding: 6rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: .5rem;
}
.section-header p { color: var(--text-muted); font-size: 1.05rem; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-muted);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: .65rem;
}
.feature-card p { color: var(--text-muted); font-size: .9rem; line-height: 1.7; }

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.service-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.service-img-wrap { width: 100%; }
.service-img-placeholder {
  width: 100%;
  height: 200px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-dim);
}
.service-img-placeholder svg { opacity: .4; }
.service-img-placeholder span { font-size: .8125rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

.service-img-wrap img { width: 100%; height: 200px; object-fit: cover; border-radius: 4px 4px 0 0; display: block; }

.service-body { padding: 1.75rem; }
.service-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.service-badge--recovery { background: var(--success-muted); color: var(--success); }
.service-badge--security { background: var(--info-muted);    color: var(--info); }

.service-body h3 { font-size: 1.25rem; margin-bottom: .6rem; }
.service-body > p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.25rem; line-height: 1.7; }

.service-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.service-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .875rem;
  color: var(--text-muted);
}
.service-list li svg { flex-shrink: 0; }

.service-learn-more {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: 1.1rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none !important;
  transition: gap .15s;
}
.service-learn-more:hover { gap: .65rem; opacity: 1; }

/* ============================================================
   STATS SECTION
   ============================================================ */
.stats-section { padding: 4rem 0; }

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.stat-card {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex: 0 1 260px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.stat-label { color: var(--text-muted); font-size: .875rem; font-weight: 500; }
.stat-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.stat-dot--open   { background: var(--success); box-shadow: 0 0 8px var(--success); }
.stat-dot--closed { background: var(--danger); }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}
.cta-card {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
}
.cta-card h2 { font-size: 1.75rem; margin-bottom: .75rem; }
.cta-card p  { color: var(--text-muted); margin-bottom: 2rem; }
.cta-closed  { color: var(--warning); font-style: italic; }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
  padding: 3rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
}
.page-header h1 { font-size: 2rem; margin-bottom: .4rem; }
.page-header p   { color: var(--text-muted); }
.page-header--admin { border-left: 4px solid var(--accent); padding-left: 0; }
.page-header--admin .container { border-left: none; }

/* ============================================================
   APPLICATION CONFIRMATION
   ============================================================ */
.confirmation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4rem 2rem;
  text-align: center;
  margin: 2rem 0;
}
.confirmation-icon {
  width: 80px;
  height: 80px;
  background: var(--success-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  color: var(--success);
}
.confirmation-card h2 { font-size: 1.75rem; margin-bottom: .75rem; }
.confirmation-card p  { color: var(--text-muted); max-width: 460px; margin: 0 auto .75rem; }
.confirmation-note {
  background: var(--warning-muted);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius-sm);
  padding: .85rem 1.25rem;
  color: var(--warning) !important;
  font-size: .875rem;
  max-width: 480px;
  margin: 1.5rem auto !important;
}
.confirmation-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ============================================================
   APPLICATION FORM
   ============================================================ */
.apply-form { }

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.form-section-title {
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  margin-right: .35rem;
  flex-shrink: 0;
}

.discord-join-btn { margin-bottom: .65rem; }

.form-submit-area {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-submit-note { color: var(--text-muted); font-size: .875rem; max-width: 420px; }

/* ============================================================
   ADMIN STATS
   ============================================================ */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.admin-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1rem;
  text-align: center;
}
.admin-stat-num   { font-size: 1.75rem; font-weight: 800; margin-bottom: .2rem; }
.admin-stat-label { color: var(--text-muted); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.admin-stat--pending .admin-stat-num { color: var(--warning); }
.admin-stat--success .admin-stat-num { color: var(--success); }
.admin-stat--danger  .admin-stat-num { color: var(--danger); }

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.filter-tab {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted) !important;
  font-size: .8125rem;
  font-weight: 500;
  transition: all .15s;
}
.filter-tab:hover { color: var(--text) !important; background: var(--surface-2); opacity: 1; }
.filter-tab--active { background: var(--accent-muted); border-color: var(--accent); color: var(--accent) !important; }
.filter-count {
  background: var(--surface-3);
  color: var(--text-muted);
  border-radius: 100px;
  padding: .05rem .4rem;
  font-size: .7rem;
  font-weight: 600;
}
.filter-tab--active .filter-count { background: rgba(192,25,15,.2); color: var(--accent); }

/* ============================================================
   APPLICATION TABLE
   ============================================================ */
.app-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}
.app-table thead th {
  padding: .85rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.app-table tbody tr { transition: background .1s; }
.app-table tbody tr:not(.app-detail-row):hover { background: var(--surface); }
.app-table tbody td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
.app-table tbody tr:last-child td { border-bottom: none; }

.app-id    { color: var(--text-dim); font-family: monospace; }
.app-user  { display: flex; align-items: center; gap: .6rem; white-space: nowrap; font-weight: 500; }
.app-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.app-date  { color: var(--text-muted); white-space: nowrap; font-size: .8125rem; }
.app-actions-cell { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }

/* Expanded detail row */
.app-detail-row { background: var(--surface-2) !important; }
.app-detail-row:hover { background: var(--surface-2) !important; }
.app-detail-row.hidden { display: none; }

.app-detail { padding: 1rem 0; }

.app-detail-list { list-style: none; }
.app-detail-entry {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.app-detail-entry:last-child { border-bottom: none; }
.app-detail-entry dt {
  flex-shrink: 0;
  width: 200px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.app-detail-entry dd {
  color: var(--text);
  font-size: .9rem;
  line-height: 1.6;
}

.view-btn { cursor: pointer; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty-state svg   { margin: 0 auto 1rem; }
.empty-state p     { font-size: 1rem; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow);
}
.modal h3 { margin-bottom: .75rem; }
.modal p  { color: var(--text-muted); font-size: .9rem; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  margin-top: 1.5rem;
}

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-card { margin-bottom: 1.5rem; }
.settings-card-title {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border-soft);
}
.settings-hint { color: var(--text-muted); font-size: .8125rem; margin-bottom: .75rem; }
.settings-hint code {
  background: var(--surface-3);
  padding: .1rem .35rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: .8rem;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.toggle-label { font-weight: 600; font-size: .9rem; }

.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border-radius: 100px;
  cursor: pointer;
  transition: .2s;
  border: 1px solid var(--border);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-dim);
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle-slider::before { background: #fff; transform: translateY(-50%) translateX(20px); }

/* ============================================================
   ADMIN NAV BAR (bottom of admin pages)
   ============================================================ */
.admin-nav-bar {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  gap: .5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .5rem .6rem;
  box-shadow: var(--shadow);
  z-index: 50;
}
.admin-nav-link {
  padding: .45rem .85rem;
  border-radius: var(--radius-xs);
  color: var(--text-muted) !important;
  font-size: .8125rem;
  font-weight: 500;
}
.admin-nav-link:hover, .admin-nav-link.active {
  background: var(--accent-muted);
  color: var(--accent) !important;
  opacity: 1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: auto;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: var(--text);
}
.footer-brand img { border-radius: 50%; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--text-muted); font-size: .875rem; }
.footer-links a:hover { color: var(--text); opacity: 1; }
.footer-copy { color: var(--text-dim); font-size: .8rem; }

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel {
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: 4px 4px 0 0;
  /* height set per context below */
}
.service-img-wrap .carousel { height: 220px; }
.gov-card-img               { width: 100%; min-height: 260px; }
.gov-card-img .carousel     { height: 100%; min-height: 260px; border-radius: 0; }

.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity .7s ease-in-out;
  display: block;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide--contain { object-fit: contain; background: var(--surface-3); }

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,.65);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background .15s;
  padding: 0;
  user-select: none;
}
.carousel-btn:hover { background: rgba(0,0,0,.9); }
.carousel-btn--prev { left: .65rem; }
.carousel-btn--next { right: .65rem; }

.carousel-counter {
  position: absolute;
  bottom: .55rem;
  right: .7rem;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .5rem;
  border-radius: .25rem;
  z-index: 5;
  pointer-events: none;
}

/* ============================================================
   GOVERNMENT PROTECTION SECTION
   ============================================================ */
.gov-section {
  padding: 6rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.gov-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 45% 55%;
  transition: border-color .2s, transform .2s;
}
.gov-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.gov-badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 100px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  background: rgba(168,85,247,.15);
  color: #a855f7;
}
.gov-card-body          { padding: 1.75rem; }
.gov-card-body h3       { font-size: 1.25rem; margin-bottom: .6rem; }
.gov-card-body > p      { color: var(--text-muted); font-size: .9rem; margin-bottom: 1.25rem; line-height: 1.7; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .form-submit-area { flex-direction: column; align-items: flex-start; }
  .app-actions-cell { flex-direction: column; align-items: flex-start; }
  .gov-card { grid-template-columns: 1fr; }
  .gov-card-img .carousel { height: 220px; border-radius: 0; }
}

@media (max-width: 520px) {
  .stats-grid  { flex-direction: column; align-items: center; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; align-items: center; }
}
