:root {
  --ink: #0b1c20;
  --steel: #16343a;
  --teal: #1a7d6c;
  --teal-deep: #0f5c4f;
  --aqua: #3eb89f;
  --ice: #d8f5ee;
  --mist: #eaf4f1;
  --sand: #f3f7f6;
  --paper: #ffffff;
  --line: rgba(11, 28, 32, 0.1);
  --warn-bg: #fff4d6;
  --font-d: "Outfit", "Segoe UI", sans-serif;
  --font-b: "Source Sans 3", "Segoe UI", sans-serif;
  --shadow: 0 18px 50px rgba(11, 28, 32, 0.08);
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-b);
  font-size: 16px;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--mist);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.brand {
  font-family: var(--font-d);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand span { color: var(--aqua); }
.brand.lg { font-size: clamp(1.6rem, 3vw, 2rem); color: #fff; }
.brand.lg span { color: var(--aqua); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s;
  box-shadow: 0 10px 24px rgba(26, 125, 108, 0.28);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: var(--mist); filter: none; transform: none; }
.btn.sm { padding: 0.45rem 0.8rem; font-size: 0.88rem; }
.btn-block { width: 100%; }

.eyebrow {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ——— Login ——— */
.auth {
  min-height: 100vh;
  background: var(--ink);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 4vw;
  display: flex;
  align-items: flex-end;
  color: #eefaf7;
  background: linear-gradient(155deg, #071416 0%, #0f2c30 45%, #13443c 100%);
}

.auth-glow {
  position: absolute;
  width: 55%;
  height: 55%;
  right: -10%;
  top: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(62, 184, 159, 0.35), transparent 70%);
  animation: drift 10s ease-in-out infinite alternate;
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(62, 184, 159, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 184, 159, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 60%, #000 10%, transparent 75%);
  opacity: 0.7;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-6%, 4%) scale(1.08); }
}

.auth-copy {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  animation: rise 0.7s ease both;
}

.auth-copy h2 {
  margin: 1.2rem 0 0.6rem;
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.auth-copy > p {
  margin: 0 0 1.5rem;
  opacity: 0.75;
  font-size: 1.02rem;
}

.auth-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.auth-points li {
  padding: 0.65rem 0.85rem;
  border-left: 3px solid var(--aqua);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.95rem;
}

.auth-panel {
  display: grid;
  place-items: center;
  padding: 2.5rem 5vw;
  background:
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(62, 184, 159, 0.12), transparent),
    var(--sand);
}

.auth-panel-inner {
  width: min(400px, 100%);
  padding: 2rem 1.75rem;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.7);
  animation: rise 0.7s ease 0.08s both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.auth-panel h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-d);
  font-size: 1.65rem;
  letter-spacing: -0.03em;
}

.sub {
  margin: 0 0 1.4rem;
  color: rgba(11, 28, 32, 0.68);
  font-size: 0.98rem;
}

.auth-form {
  display: grid;
  gap: 0.9rem;
}

.auth-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--mist);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-form input:focus {
  outline: none;
  background: #fff;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26, 125, 108, 0.15);
}

.err {
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 8px;
  background: #fde8e8;
  color: #8a1f1f;
  font-size: 0.92rem;
}

.demo-chip {
  margin-top: 1.15rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  background: var(--mist);
  font-size: 0.84rem;
  color: rgba(11, 28, 32, 0.75);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.demo-chip > span {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.back {
  margin: 1.15rem 0 0;
  font-size: 0.92rem;
}

.back a {
  color: var(--teal);
  font-weight: 600;
}

.back a:hover { text-decoration: underline; }

/* ——— App shell ——— */
.app {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 50% 30% at 0% 0%, rgba(62, 184, 159, 0.08), transparent),
    var(--sand);
}

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 4vw;
  background: rgba(243, 247, 246, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.bar .brand { font-size: 1.2rem; }

.bar nav {
  display: flex;
  gap: 0.35rem;
  flex: 1;
}

.bar nav a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  opacity: 0.7;
  transition: background 0.2s, opacity 0.2s;
}

.bar nav a:hover { opacity: 1; background: rgba(26, 125, 108, 0.08); }
.bar nav a.on {
  opacity: 1;
  background: rgba(26, 125, 108, 0.12);
  color: var(--teal-deep);
  font-weight: 600;
}

.user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--teal), var(--aqua));
  color: #fff;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.avatar.sm {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.75rem;
}

.uname { font-weight: 600; opacity: 0.85; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.75rem 4vw 3.5rem;
}

.hero-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}

.hero-strip h1 {
  margin: 0;
  font-family: var(--font-d);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lead {
  margin: 0.35rem 0 0;
  color: rgba(11, 28, 32, 0.65);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 600;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0 0 rgba(62, 184, 159, 0.5);
  animation: ping 1.8s ease infinite;
}

@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(62, 184, 159, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(62, 184, 159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(62, 184, 159, 0); }
}

.banner.soft {
  margin-bottom: 1.35rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--warn-bg);
  border: 1px solid rgba(201, 162, 39, 0.25);
  font-size: 0.92rem;
  color: #5c4a12;
}

.kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.35rem;
}

.kpi article {
  padding: 1.15rem 1.1rem 1.05rem;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(11, 28, 32, 0.03);
  transition: transform 0.2s ease;
}

.kpi article:hover { transform: translateY(-2px); }

.kpi .k {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(11, 28, 32, 0.55);
}

.kpi .v {
  margin: 0.35rem 0 0;
  font-family: var(--font-d);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.kpi .v small {
  font-size: 0.55em;
  margin-left: 0.1rem;
  opacity: 0.7;
}

.kpi .hint-line {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  color: rgba(11, 28, 32, 0.55);
}

.meter {
  margin-top: 0.75rem;
  height: 5px;
  border-radius: 999px;
  background: var(--mist);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--aqua));
}

.split {
  display: grid;
  gap: 1.1rem;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.05rem 0.5rem;
  box-shadow: 0 8px 28px rgba(11, 28, 32, 0.035);
  margin-bottom: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0 0.15rem;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-d);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: var(--ice);
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 560px;
}

th, td {
  padding: 0.75rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  font-family: var(--font-d);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(11, 28, 32, 0.55);
  background: transparent;
}

tbody tr {
  transition: background 0.15s;
}

tbody tr:hover { background: rgba(62, 184, 159, 0.05); }

.person {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  opacity: 0.85;
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
}

.badge.ok { background: #d8f3eb; color: #0f5c4c; }
.badge.mid { background: #fff0cc; color: #7a5a00; }
.badge.warn { background: #fde2e2; color: #8a1f1f; }

.state.on {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--teal-deep);
  font-size: 0.88rem;
}

.state.on::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua);
}

.roadmap {
  margin-top: 1.25rem;
  padding: 1.4rem 1.35rem;
  border-radius: var(--radius);
  color: #eefaf7;
  background:
    radial-gradient(ellipse at top right, rgba(62, 184, 159, 0.22), transparent 50%),
    linear-gradient(135deg, #0f2c30, #13443c 55%, #0b1c20);
  display: grid;
  gap: 1rem;
}

.roadmap h2 {
  margin: 0 0 0.25rem;
  font-family: var(--font-d);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.roadmap > div > p {
  margin: 0;
  opacity: 0.75;
  font-size: 0.95rem;
}

.roadmap ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.roadmap li {
  padding: 0.85rem 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.roadmap li span {
  font-family: var(--font-d);
  font-weight: 700;
  color: var(--aqua);
  font-size: 0.85rem;
}

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { min-height: 280px; padding: 2rem 6vw; }
  .kpi { grid-template-columns: 1fr 1fr; }
  .roadmap ol { grid-template-columns: 1fr 1fr; }
  .bar nav { display: none; }
}

@media (max-width: 560px) {
  .kpi { grid-template-columns: 1fr; }
  .roadmap ol { grid-template-columns: 1fr; }
  .uname { display: none; }
}
