/* ==========================================================================
   AUTHENTIC FRUTIGER AERO THEME (Windows Vista / 7 Desktop Vibe)
   Glossy, Glassy, Skeuomorphic, Sky-Bokeh & Glowing Auroras
   ========================================================================== */

:root {
  --ink: #061e36;
  --muted: #3a5c7d;
  --line: #7baed3;
  --sky-1: #0e6db6;
  --sky-2: #38a5e5;
  --sky-3: #96e0ff;
  --sky-4: #e3f5ff;
  --ok: #289014;
  --warn: #d97700;
  --bad: #cb1c11;
  --money: #075faa;
}

* { -webkit-tap-highlight-color: transparent; }

html { background: var(--sky-4); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", "Frutiger", "Frutiger Linotype", "Myriad Pro", Tahoma, Geneva, sans-serif;
  background: var(--sky-4);
  position: relative;
  isolation: isolate;
}

/* ----------------------------------------------------------- Aero Sky, Aurora Rays & Floating Bubbles */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    /* Floating Glass Bubbles */
    radial-gradient(circle closest-side, rgba(255,255,255,.55) 0, rgba(255,255,255,.12) 60%, rgba(255,255,255,.75) 90%, rgba(255,255,255,.2) 98%, transparent 100%) 6% 15% / 110px 110px no-repeat,
    radial-gradient(circle closest-side, rgba(255,255,255,.45) 0, rgba(255,255,255,.08) 60%, rgba(255,255,255,.65) 90%, rgba(255,255,255,.15) 98%, transparent 100%) 91% 25% / 160px 160px no-repeat,
    radial-gradient(circle closest-side, rgba(255,255,255,.50) 0, rgba(255,255,255,.10) 60%, rgba(255,255,255,.70) 90%, rgba(255,255,255,.2) 98%, transparent 100%) 75% 6% / 65px 65px no-repeat,
    radial-gradient(circle closest-side, rgba(255,255,255,.40) 0, rgba(255,255,255,.08) 60%, rgba(255,255,255,.60) 90%, rgba(255,255,255,.15) 98%, transparent 100%) 18% 68% / 85px 85px no-repeat,
    radial-gradient(circle closest-side, rgba(255,255,255,.50) 0, rgba(255,255,255,.12) 60%, rgba(255,255,255,.75) 90%, rgba(255,255,255,.2) 98%, transparent 100%) 45% 35% / 240px 240px no-repeat,
    /* Frutiger Sunburst / Light Flare */
    radial-gradient(ellipse 90% 60% at 20% -10%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 75%),
    radial-gradient(ellipse 60% 40% at 85% -5%, rgba(180, 240, 255, 0.7), rgba(255, 255, 255, 0) 70%),
    /* Aurora Green & Turquoise Swirls */
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(85, 230, 165, 0.35), transparent 70%),
    /* Sky Gradient */
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 30%, var(--sky-3) 70%, var(--sky-4) 100%);
  animation: aero-drift 30s ease-in-out infinite alternate;
}

/* Rolling Frutiger Green Hill Horizon */
body::after {
  content: "";
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 28vh;
  z-index: -1;
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320' preserveAspectRatio='none'><defs><linearGradient id='g' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23a1ec4b'/><stop offset='.35' stop-color='%2344c21d'/><stop offset='1' stop-color='%2319690f'/></linearGradient><linearGradient id='h' x1='0' y1='0' x2='0' y2='1'><stop offset='0' stop-color='%23ffffff' stop-opacity='.7'/><stop offset='1' stop-color='%23ffffff' stop-opacity='0'/></linearGradient></defs><path fill='url(%23g)' d='M0,160 C280,70 500,60 760,130 C1000,195 1220,210 1440,120 L1440,320 L0,320 Z'/><path fill='url(%23h)' d='M0,160 C280,70 500,60 760,130 C1000,195 1220,210 1440,120 L1440,145 C1220,230 1000,210 760,150 C500,80 280,95 0,185 Z'/></svg>") bottom / 100% 100% no-repeat;
  filter: drop-shadow(0 -4px 12px rgba(45, 145, 20, 0.3));
}

@keyframes aero-drift {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(18px) scale(1.02); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .meter > span::after { animation: none !important; }
}

/* ----------------------------------------------------------- Real Aero Glass Window Panels */
.glass {
  position: relative;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(245, 252, 255, 0.72) 0%, rgba(190, 225, 250, 0.45) 100%);
  -webkit-backdrop-filter: blur(20px) saturate(1.9);
  backdrop-filter: blur(20px) saturate(1.9);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    0 16px 38px rgba(0, 40, 90, 0.3),
    0 4px 10px rgba(0, 30, 70, 0.15),
    inset 0 1px 1px #fff,
    inset 0 0 0 1px rgba(135, 200, 255, 0.5);
  overflow: hidden;
}

/* Glass Top Reflection / Gloss Layer */
.glass::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 46%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.1) 100%);
  pointer-events: none;
  border-radius: inherit;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}
.glass > * { position: relative; }

.glass.warn-ring { 
  box-shadow: 0 16px 38px rgba(180, 30, 20, 0.35), inset 0 1px 1px #fff, inset 0 0 0 2px rgba(230, 60, 40, 0.7); 
}
.glass.selected  { 
  box-shadow: 0 16px 38px rgba(0, 110, 220, 0.4), inset 0 1px 1px #fff, inset 0 0 0 2px rgba(45, 160, 255, 1); 
  background: linear-gradient(180deg, rgba(215, 240, 255, 0.92), rgba(160, 215, 252, 0.8)); 
}

/* Window Titlebar (Vista/7 Glass Frame) */
.window > .titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #04192d;
  text-shadow: 0 0 8px #ffffff, 0 0 3px #ffffff;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.15) 48%, rgba(255,255,255,0) 49%),
    linear-gradient(180deg, rgba(160, 215, 255, 0.9), rgba(85, 160, 230, 0.75));
  border-bottom: 1px solid rgba(40, 95, 150, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.window > .titlebar .title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.window > .body { padding: 16px; }

/* Aero Titlebar Buttons */
.caption-btns { display: flex; gap: 4px; }
.caption-btns i {
  display: block;
  width: 26px; height: 17px;
  border-radius: 3px;
  border: 1px solid rgba(15, 45, 80, 0.6);
  background: linear-gradient(180deg, #ffffff 0%, #c4e0f9 45%, #88bde8 50%, #adcef0 100%);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0,0,0,0.2);
}
.caption-btns i:last-child {
  width: 44px;
  border-color: rgba(100, 10, 0, 0.7);
  background: linear-gradient(180deg, #fcaea1 0%, #e0442e 45%, #b81a05 50%, #e65c47 100%);
  position: relative;
}
.caption-btns i:last-child::after {
  content: "✕";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-style: normal; font-weight: 800;
  text-shadow: 0 1px 2px rgba(60, 0, 0, 0.9);
}

/* ----------------------------------------------------------- Ultra-Glossy Aero Buttons */
.btn {
  --c1: #ffffff; --c2: #c3dcf2; --edge: #316795; --fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 6px;
  border: 1px solid var(--edge);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(180deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.95), 
    inset 0 -2px 3px rgba(0, 30, 70, 0.15), 
    0 2px 6px rgba(0, 35, 75, 0.3);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transition: all .15s ease-in-out;
  user-select: none;
}

/* Glass curved light arc on top of buttons */
.btn::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.25) 100%);
  border-radius: 5px 5px 50% 50% / 5px 5px 12px 12px;
  pointer-events: none;
}
.btn > * { position: relative; }

.btn:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow: 
    inset 0 1px 0 #fff, 
    0 0 14px rgba(60, 185, 255, 0.85), 
    0 3px 8px rgba(0, 35, 75, 0.35);
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
  background: linear-gradient(180deg, var(--c2) 0%, var(--c1) 100%);
  box-shadow: inset 0 2px 4px rgba(0, 20, 50, 0.3), 0 1px 2px rgba(0,0,0,0.2);
}
.btn:disabled { filter: grayscale(0.9); opacity: 0.55; cursor: not-allowed; }

/* Vibrant Color Variants */
.btn-blue, .btn-green, .btn-red, .btn-orange {
  color: #ffffff;
  text-shadow: 0 -1px 1px rgba(0, 30, 70, 0.7);
}
.btn-blue   { --c1: #63cdff; --c2: #0866b8; --edge: #04437a; }
.btn-green  { --c1: #9fee59; --c2: #248b12; --edge: #135508; }
.btn-red    { --c1: #ff8e78; --c2: #b81f12; --edge: #781007; }
.btn-orange { --c1: #ffd05b; --c2: #d67800; --edge: #8c4c00; }
.btn.active { --c1: #63cdff; --c2: #0866b8; --edge: #04437a; color: #fff; text-shadow: 0 -1px 1px rgba(0, 30, 70, 0.7); }

.btn-lg { padding: 14px 22px; font-size: 16px; border-radius: 8px; }
.btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 4px; }

/* Glossy Aero Orb Logo */
.orb {
  position: relative;
  width: 48px; height: 48px;
  border-radius: 50%;
  flex: none;
  background: radial-gradient(circle at 50% 120%, #8be7ff 0%, #168ad9 50%, #064082 100%);
  box-shadow: 
    0 0 0 2px rgba(255, 255, 255, 0.9), 
    0 4px 14px rgba(0, 45, 100, 0.5), 
    inset 0 -5px 12px rgba(160, 240, 255, 0.85);
}
.orb::before {
  content: "";
  position: absolute;
  left: 10%; right: 10%; top: 4%;
  height: 48%;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.1) 100%);
}
.orb::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.9);
}

/* ----------------------------------------------------------- Glossy Status Pills */
.pill {
  position: relative;
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .5px;
  color: #fff;
  text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(0, 20, 50, 0.4);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
  white-space: nowrap;
}
.pill::before {
  content: "";
  position: absolute; left: 1px; right: 1px; top: 1px; height: 50%;
  border-radius: 999px 999px 40% 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.15));
}
.pill > span { position: relative; }
.pill-ok   { background: linear-gradient(180deg, #8ae652, #248a12); }
.pill-low  { background: linear-gradient(180deg, #ffd359, #d67300); }
.pill-out  { background: linear-gradient(180deg, #ff846e, #b81d12); animation: glow-red 1.6s ease-in-out infinite alternate; }
.pill-info { background: linear-gradient(180deg, #7ad5ff, #0c71c4); }
.pill-plain{ background: linear-gradient(180deg, #ffffff, #abc5de); color: var(--ink); text-shadow: 0 1px 0 #fff; }
@keyframes glow-red { 100% { box-shadow: 0 0 12px 3px rgba(230, 40, 20, 0.85); } }

/* ----------------------------------------------------------- Classic Windows 7 Progress Meter */
.meter {
  height: 16px;
  border-radius: 3px;
  border: 1px solid #6b9ac1;
  background: linear-gradient(180deg, #cbe0f2 0%, #f4f9fe 100%);
  box-shadow: inset 0 1px 3px rgba(0, 35, 75, 0.35);
  overflow: hidden;
}
.meter > span {
  display: block;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #bbf08b 0%, #57c727 45%, #25960c 50%, #46be18 100%);
  transition: width .6s ease;
}
.meter.low > span { 
  background: linear-gradient(180deg, #ffb5a6 0%, #e84c35 45%, #b81b09 50%, #d83d27 100%); 
}
.meter > span::after {
  content: "";
  position: absolute; top: 0; bottom: 0; width: 50%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: shine 2.2s linear infinite;
}
@keyframes shine { from { left: -50%; } to { left: 110%; } }

/* ----------------------------------------------------------- Inset Glass Inputs */
.field {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border-radius: 5px;
  border: 1px solid #719ec4;
  background: linear-gradient(180deg, #eef6fc 0%, #ffffff 40%);
  color: var(--ink);
  font: inherit;
  box-shadow: inset 0 1px 3px rgba(0, 35, 80, 0.25);
  outline: none;
  transition: all .15s ease-in-out;
}
.field:focus { 
  border-color: #278ee4; 
  box-shadow: inset 0 1px 2px rgba(0,35,80,0.2), 0 0 0 3px rgba(70, 175, 255, 0.45), 0 0 12px rgba(70, 175, 255, 0.6); 
}
select.field { 
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: 
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%23061e36' stroke-width='2' fill='none'/></svg>") right 12px center no-repeat, 
    linear-gradient(180deg, #ffffff 0%, #cce0f2 100%); 
}
.label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 700; }

/* ----------------------------------------------------------- Text & Typography */
.glow-title {
  color: #ffffff;
  text-shadow: 
    0 1px 2px rgba(0, 20, 50, 0.8), 
    0 0 10px rgba(0, 40, 90, 0.5), 
    0 0 22px rgba(255, 255, 255, 0.95);
  letter-spacing: .4px;
}
.muted { color: var(--muted); }
.big-num { font-weight: 300; letter-spacing: -1px; line-height: 1; }
.c-ok { color: var(--ok); } .c-bad { color: var(--bad); } .c-warn { color: var(--warn); } .c-money { color: var(--money); }
.tabular { font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------- Tables & Lists */
.aero-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.aero-table th {
  text-align: left; font-weight: 700; font-size: 12px; color: #1c456e;
  padding: 8px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #d5e5f5 100%);
  border-bottom: 1px solid #9abedc;
  border-right: 1px solid #cce0f0;
  text-shadow: 0 1px 0 rgba(255,255,255,0.9);
}
.aero-table td { padding: 9px 12px; border-bottom: 1px solid rgba(140, 180, 215, 0.4); }
.aero-table tbody tr:hover td { background: linear-gradient(180deg, rgba(220, 240, 255, 0.95), rgba(185, 222, 250, 0.85)); }
.row-hover:hover { background: linear-gradient(180deg, rgba(220, 240, 255, 0.95), rgba(185, 222, 250, 0.85)); border-radius: 5px; }

@keyframes flash-in { 0% { background: rgba(120, 230, 80, 0.6); } 100% { background: transparent; } }
.flash { animation: flash-in 2s ease-out; }

/* ----------------------------------------------------------- Aero Glass Toasts */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: calc(100% - 32px); max-width: 440px; z-index: 50;
  padding: 12px 16px; font-weight: 700;
  display: flex; align-items: center; gap: 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(210,235,255,0.85));
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 12px 30px rgba(0,40,90,0.35), inset 0 1px 0 #fff;
  backdrop-filter: blur(15px);
}
.toast .dot { 
  width: 14px; height: 14px; border-radius: 50%; flex: none; 
  box-shadow: inset 0 -2px 3px rgba(0,0,0,0.3), 0 0 8px rgba(0,0,0,0.25); 
}

.hidden { display: none !important; }