:root {
  --app-bg: #dfe5ec;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-muted: rgba(10, 28, 45, 0.78);
  --ink: #0f2233;
  --ink-soft: #4f6476;
  --line: rgba(18, 42, 66, 0.12);
  --line-strong: rgba(18, 42, 66, 0.22);
  --brand: #12344f;
  --brand-alt: #1d5c83;
  --accent: #ca8a04;
  --success: #177245;
  --danger: #8f2d2d;
  --shadow-lg: 0 24px 60px rgba(12, 32, 49, 0.15);
  --shadow-md: 0 14px 35px rgba(12, 32, 49, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

html {
  background:
    radial-gradient(circle at top left, rgba(29, 92, 131, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(202, 138, 4, 0.12), transparent 24%),
    linear-gradient(180deg, #eef3f7 0%, var(--app-bg) 100%);
}

body.public-app,
body.public-auth {
  min-height: 100vh;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: transparent;
}

.public-app::before,
.public-auth::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 52, 79, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 52, 79, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}

.public-shell {
  padding: 0 0 3rem;
}

.public-navbar {
  background: rgba(7, 21, 34, 0.9) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.public-navbar .container-fluid {
  max-width: 1320px;
  padding: 0.9rem 1.5rem;
}

.public-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #f7fafc;
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-kicker {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(241, 245, 249, 0.65);
}

.brand-name {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}

.public-navbar .navbar-nav {
  align-items: center;
  gap: 0.5rem;
}

.public-navbar .nav-link {
  color: rgba(236, 243, 248, 0.78) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 0.95rem !important;
  border-radius: 999px;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link:focus,
.public-navbar .nav-link.active {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.08);
}

.public-nav-login {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}

.operations-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 1.25rem auto 0;
  max-width: 1360px;
  border-radius: 0 0 32px 32px;
  min-height: 500px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(5, 16, 27, 0.88) 0%, rgba(12, 36, 57, 0.82) 48%, rgba(15, 67, 103, 0.7) 100%),
    url("../assets/images/hero.jpg") center center / cover no-repeat;
}

.operations-hero::after {
  content: "";
  position: absolute;
  inset: auto -6% -24% auto;
  width: 42%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(202, 138, 4, 0.28), transparent 62%);
  filter: blur(10px);
  z-index: -1;
}

.operations-hero__inner {
  padding: 4rem 1.5rem 3.5rem;
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 2rem;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-title {
  margin: 1.15rem 0 1rem;
  max-width: 11ch;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-copy {
  max-width: 46rem;
  color: rgba(241, 245, 249, 0.86);
  font-size: 1.05rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.hero-meta-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 180px;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(6, 20, 32, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-meta-chip span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.62);
}

.hero-meta-chip strong {
  font-size: 1rem;
  color: #fff;
}

.hero-brief {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: rgba(6, 20, 32, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.hero-brief__label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.62);
}

.hero-brief__headline {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.hero-brief__copy {
  margin: 0.7rem 0 0;
  color: rgba(241, 245, 249, 0.82);
}

.operations-main {
  max-width: 1320px;
  margin: -3.5rem auto 0;
  padding: 0 1.5rem;
}

.section-shell {
  margin-bottom: 2rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.92));
  box-shadow: var(--shadow-lg);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-header p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

.section-meta {
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card,
.status-card-shell,
.forecast-panel,
.feed-panel,
.auth-panel {
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.metric-card .card-body,
.status-card-shell .card-body {
  padding: 1.5rem;
}

.metric-card {
  background: linear-gradient(145deg, #12344f 0%, #1d5c83 100%);
  color: #fff;
}

.metric-card .metric-label,
.status-card-shell .status-why-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.metric-card .metric-value {
  margin-top: 0.4rem;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.metric-card .metric-support {
  margin-top: 0.7rem;
  color: rgba(241, 245, 249, 0.76);
}

.status-card-shell {
  display: block;
  color: inherit;
  background: linear-gradient(145deg, rgba(18, 52, 79, 0.98), rgba(29, 92, 131, 0.95));
  text-decoration: none;
}

.status-card-shell .card-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
  color: #fff;
}

.status-card-shell:hover {
  transform: translateY(-2px);
}

.status-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.status-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.status-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.4rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-pill {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.status-msg {
  font-size: 1rem;
  color: rgba(241, 245, 249, 0.92);
}

.status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.status-tag {
  display: inline-flex;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
}

.status-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.84rem;
}

.forecast-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.forecast-card {
  min-height: 310px;
  perspective: 1200px;
}

.card-inner {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

.card-inner.is-flipped {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 1.35rem;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.card-front {
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(228, 238, 246, 0.96));
}

.card-back {
  transform: rotateY(180deg);
  background: linear-gradient(180deg, rgba(18, 52, 79, 0.98), rgba(29, 92, 131, 0.96));
  color: #fff;
}

.forecast-icon {
  width: 64px;
  height: 64px;
}

.forecast-day {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forecast-temps {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.card-back .forecast-temps,
.card-back .forecast-summary {
  color: rgba(241, 245, 249, 0.88);
}

.forecast-summary,
.forecast-detail {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
}

.feed-panel {
  padding: 1rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(240, 245, 249, 0.95));
}

.feed-frame {
  min-height: 220px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.public-footer {
  margin-top: 1rem;
  padding: 1.4rem 1.5rem 2rem;
  color: var(--ink-soft);
}

.public-footer__inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--line-strong);
  font-size: 0.92rem;
}

.alert.app-alert {
  border: 1px solid rgba(202, 138, 4, 0.28);
  border-radius: var(--radius-md);
  background: rgba(255, 247, 237, 0.95);
}

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
}

.auth-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 460px);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
}

.auth-aside {
  position: relative;
  min-height: 680px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(5, 16, 27, 0.88), rgba(12, 36, 57, 0.76)),
    var(--auth-background, linear-gradient(145deg, #12344f, #1d5c83));
  background-size: cover;
  background-position: center;
}

.auth-aside__body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem;
}

.auth-kicker {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}

.auth-title {
  margin: 0.7rem 0 0.9rem;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-copy {
  max-width: 34rem;
  color: rgba(241, 245, 249, 0.86);
}

.auth-panel {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.96);
  border: none;
  box-shadow: none;
}

.auth-logo {
  width: 88px;
  height: 88px;
  object-fit: contain;
  padding: 0.65rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: #fff;
}

.auth-panel .form-label {
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel .form-control {
  min-height: 52px;
  border-radius: 14px;
  border-color: var(--line-strong);
  padding: 0.85rem 1rem;
}

.auth-panel .form-control:focus {
  border-color: var(--brand-alt);
  box-shadow: 0 0 0 0.25rem rgba(29, 92, 131, 0.14);
}

.auth-panel .btn-primary {
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-alt));
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-panel .btn-primary:hover,
.auth-panel .btn-primary:focus {
  background: linear-gradient(135deg, #0d2a41, #174c6c);
}

.auth-panel .btn-outline-secondary {
  border-radius: 14px;
}

.form-error {
  color: var(--danger);
  font-size: 0.92rem;
}

.text-link {
  color: var(--brand-alt);
}

.kbdi-meter {
  width: 100%;
  max-width: 260px;
  padding-top: 26px;
}

.kbdi-track {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: visible;
}

.kbdi-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #2ecc71 0%, #f1c40f 55%, #e67e22 75%, #e74c3c 100%);
  opacity: 0.95;
}

.kbdi-needle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 24px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.kbdi-needle::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
}

.kbdi-needle-na {
  left: 50% !important;
  opacity: 0.35;
}

.kbdi-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.82;
}

.kbdi-burnline {
  position: absolute;
  top: -6px;
  bottom: -6px;
  width: 4px;
  background: #000;
  z-index: 10;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.45);
}

.kbdi-burnline-label {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  text-transform: uppercase;
  z-index: 11;
}

@media (max-width: 991.98px) {
  .operations-grid,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .operations-hero {
    border-radius: 0 0 24px 24px;
    min-height: auto;
  }

  .operations-main {
    margin-top: -2rem;
  }

  .auth-aside {
    min-height: 360px;
  }
}

@media (max-width: 767.98px) {
  .operations-hero__inner,
  .section-shell,
  .auth-panel,
  .auth-aside__body {
    padding: 1.4rem;
  }

  .section-header,
  .public-footer__inner,
  .status-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-title {
    max-width: 100%;
  }
}
