/*
 * ERROR 404 Universal Theme v1.1
 *
 * Shared colour tokens and visual styling.
 *
 * Aeroconomy styles are scoped to .aero-theme
 * to prevent unintended changes to Flight Operations.
 */

:root {
  --e404-universal-bg:#060b10;
  --e404-universal-panel:#0d141b;
  --e404-universal-panel2:#101920;
  --e404-universal-line:#202c35;
  --e404-universal-red:#e3262e;
  --e404-universal-red2:#ff343d;
  --e404-universal-text:#edf2f4;
  --e404-universal-muted:#89949e;
  --e404-universal-green:#6be6ad;
}

/* Main Aeroconomy theme */

.aero-theme {
  --bg:var(--e404-universal-bg);
  --panel:var(--e404-universal-panel);
  --line:var(--e404-universal-line);
  --red:var(--e404-universal-red);
  --muted:var(--e404-universal-muted);

  color:var(--e404-universal-text);

  background:
    radial-gradient(
      circle at 15% 0%,
      rgba(70,110,130,.12),
      transparent 35%
    ),
    linear-gradient(
      180deg,
      #070b0f,
      #090e13 55%,
      #070b0f
    );

  font-family:
    Inter,"Segoe UI",Arial,sans-serif;

  min-height:100vh;
}

/* Subtle ERROR 404 grid background */

.aero-theme::before {
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;

  background-image:
    linear-gradient(
      rgba(255,255,255,.018) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,.018) 1px,
      transparent 1px
    );

  background-size:42px 42px;

  mask-image:linear-gradient(
    to bottom,
    black,
    transparent 80%
  );

  opacity:.35;
}

.aero-theme header,
.aero-theme main,
.aero-theme footer {
  position:relative;
  z-index:1;
}

/* ERROR 404 header */

.aero-theme header {
  min-height:76px;
  padding:14px 28px;

  background:rgba(7,13,19,.94);
  border-bottom:1px solid #1b2730;

  box-shadow:0 8px 30px rgba(0,0,0,.2);
  backdrop-filter:blur(14px);

  position:sticky;
  top:0;
  z-index:100;
}

.aero-theme .brand {
  display:flex;
  align-items:center;
  gap:13px;

  font-size:15px;
  font-weight:900;
  letter-spacing:1.5px;
}

.aero-theme .brand::before {
  content:"404";

  display:flex;
  align-items:center;
  justify-content:center;

  width:51px;
  height:43px;

  font-size:23px;
  font-weight:900;
  letter-spacing:-2px;

  color:#fff;
  border:2px solid var(--e404-universal-red);

  flex-shrink:0;
}

.aero-theme .brand span {
  color:var(--e404-universal-red);
}

.aero-theme header nav {
  display:flex;
  align-items:center;
  gap:12px;

  border:0;
  padding:0;
  background:transparent;
}

.aero-theme header nav a {
  color:#b8c3cb;
  font-size:12px;
  font-weight:700;
  transition:color .2s;
}

.aero-theme header nav a:hover {
  color:#fff;
}

/* Main page layout */

.aero-theme main {
  max-width:1540px;
  margin:0 auto;
  padding:28px 24px;
}

.aero-theme h1 {
  color:#edf2f4;
  font-size:32px;
  font-weight:900;
  letter-spacing:-.8px;
}

.aero-theme h2 {
  color:#f1f4f5;
  font-weight:850;
  letter-spacing:-.4px;
}

.aero-theme .subtitle,
.aero-theme .muted {
  color:var(--e404-universal-muted);
}

/* Aeroconomy homepage cards */

.aero-theme .grid {
  gap:14px;
}

.aero-theme .tile {
  position:relative;
  min-height:175px;

  background:
    linear-gradient(
      145deg,
      #101820,
      #0b1218
    );

  border:1px solid #202d36;
  border-top:3px solid var(--e404-universal-red);

  border-radius:10px;
  padding:22px;

  box-shadow:none;
  color:#edf2f4;

  transition:
    border-color .2s,
    background .2s,
    transform .2s,
    box-shadow .2s;
}

.aero-theme .tile:hover {
  background:
    linear-gradient(
      145deg,
      #14212b,
      #0e171f
    );

  border-color:rgba(227,38,46,.65);

  transform:translateY(-2px);

  box-shadow:
    0 12px 30px rgba(0,0,0,.22);
}

.aero-theme .tile:focus-visible {
  outline:2px solid var(--e404-universal-red);
  outline-offset:3px;
}

.aero-theme .tile-icon {
  font-size:29px;
}

.aero-theme .tile-title {
  font-size:19px;
  color:#f3f6f7;
}

.aero-theme .tile-desc {
  color:#96a2ac;
  font-size:12px;
}

.aero-theme .tile-arrow {
  color:var(--e404-universal-red2);
}

/* Banking panels */

.aero-theme .panel,
.aero-theme .kpi {
  background:
    linear-gradient(
      145deg,
      #0e161d,
      #0a1117
    );

  border:1px solid #202c35;
  border-radius:10px;
  box-shadow:none;
}

.aero-theme .panel {
  padding:20px;
}

.aero-theme .panel h2 {
  font-size:16px;

  display:flex;
  align-items:center;
  gap:9px;
}

.aero-theme .panel h2::before {
  content:"";

  width:3px;
  min-width:3px;
  height:16px;

  border-radius:2px;
  background:var(--e404-universal-red);
}

/* Financial statistic cards */

.aero-theme .kpi {
  padding:19px;
}

.aero-theme .kpi small {
  display:block;

  font-size:10px;
  color:#9aa5ae;

  text-transform:uppercase;
  letter-spacing:1.1px;
}

.aero-theme .kpi strong {
  color:var(--e404-universal-red);

  font-weight:900;
  font-size:26px;
}

/* Buttons */

.aero-theme button {
  border-radius:7px;
  border:1px solid #2a3740;

  background:#111a21;
  color:#e8eef0;

  font-size:12px;
  font-weight:800;

  transition:
    background .15s,
    border-color .15s,
    color .15s;
}

.aero-theme button:hover {
  background:#18232c;
  border-color:rgba(227,38,46,.5);
}

.aero-theme button.active,
.aero-theme button.primary {
  background:
    linear-gradient(
      90deg,
      #8f151b,
      #b31c22
    );

  border-color:rgba(227,38,46,.6);
  color:#fff;

  box-shadow:
    0 8px 22px rgba(227,38,46,.14);
}

.aero-theme button.active:hover,
.aero-theme button.primary:hover {
  filter:brightness(1.13);
}

.aero-theme button:disabled {
  opacity:.45;
  cursor:not-allowed;
}

.aero-theme button:focus-visible,
.aero-theme select:focus-visible,
.aero-theme input:focus-visible {
  outline:2px solid var(--e404-universal-red);
  outline-offset:2px;
}

.aero-theme .toolbar {
  gap:9px;
}

/* Financial history sync status */

.aero-theme .status {
  background:#0d151c;

  border:1px solid #202d36;
  border-left:3px solid var(--e404-universal-red);

  border-radius:7px;
  padding:14px;

  color:#a9b5be;
  font-size:12px;
}

/* Financial charts */

.aero-theme .bar-row {
  padding:10px 0;
  border-bottom:1px solid #202c35;
}

.aero-theme .bar-heading {
  color:#dce5ea;
  font-size:12px;
  font-weight:650;
}

.aero-theme .track {
  height:11px;
  background:#202b35;
  border-radius:10px;
}

.aero-theme .fill {
  background:
    linear-gradient(
      90deg,
      #a31c24,
      #e3262e
    );

  border-radius:10px;
}

.aero-theme .fill.expense {
  background:
    linear-gradient(
      90deg,
      #526474,
      #8598aa
    );
}

/* Transaction tables */

.aero-theme table {
  font-size:12px;
}

.aero-theme th {
  color:#8996a5;

  font-size:10px;
  font-weight:800;

  text-transform:uppercase;
  letter-spacing:1px;
}

.aero-theme th,
.aero-theme td {
  padding:13px 10px;
  border-bottom:1px solid #202c35;
}

.aero-theme tbody tr:hover {
  background:#121a23;
}

.aero-theme .credit {
  color:#6be6ad;
}

.aero-theme .debit {
  color:#ff7078;
}

/* Form controls */

.aero-theme select,
.aero-theme input {
  background:#101820;
  border:1px solid #293641;

  border-radius:7px;
  color:#edf2f4;
  font-size:12px;
}

/* Footer */

.aero-theme footer {
  border-top:1px solid #1e2935;

  color:#89949e;
  font-size:10px;
  letter-spacing:1px;
}

/* Mobile layout */

@media(max-width:800px) {
  .aero-theme header {
    position:relative;
    padding:15px;
  }

  .aero-theme main {
    padding:16px;
  }

  .aero-theme .grid {
    grid-template-columns:
      repeat(auto-fit,minmax(240px,1fr));
  }

  .aero-theme .brand {
    font-size:13px;
  }
}

@media(max-width:550px) {
  .aero-theme .grid {
    grid-template-columns:1fr;
  }

  .aero-theme .kpis {
    grid-template-columns:1fr 1fr;
  }

  .aero-theme .kpi strong {
    font-size:19px;
  }
}
