:root {
  --navy: #03162c;
  --navy-2: #05203c;
  --card: #0b3258;
  --card-2: #0e3c66;
  --line: #1a6a8a;
  --cyan: #00d2ee;
  --cyan-2: #19c6e6;
  --orange: #ff9a1f;
  --green: #2ecc71;
  --yellow: #f4c430;
  --red: #ff5a3d;
  --text: #f4fbff;
  --muted: #9ec4d8;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
body {
  position: relative;
  font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 80% -10%, #0b4d73 0%, transparent 55%),
    linear-gradient(180deg, #04182f 0%, #031221 100%);
}

.wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 12px 16px;
}

.topbar {
  display: grid;
  grid-template-columns: 180px 1fr 190px;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}
.brand-left, .brand-right {
  font-size: 10px;
  letter-spacing: 0.6px;
  line-height: 1.25;
  text-transform: uppercase;
  color: #d7f4ff;
  font-weight: 700;
}
.brand-right { text-align: right; }
.brand-left span, .brand-right span { color: var(--cyan); display: block; }
.title-block { text-align: center; }
.title-block h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.4px;
  font-weight: 800;
  color: #fff;
}
.title-block p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #cfe8f5;
}
.sample-pill {
  display: inline-block;
  margin-top: 4px;
  background: #123a5c;
  border: 1px solid #4aa3c7;
  color: #d9f6ff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.4px;
}

.heroes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.hero {
  position: relative;
  min-height: 168px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background-size: cover;
  background-position: center;
}
.hero.onshore { background-image: url("/static/hero-onshore.jpg"); background-position: 30% 55%; }
.hero.offshore { background-image: url("/static/hero-offshore.jpg"); background-position: 55% 40%; }
.hero .shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,22,44,0.55), rgba(3,22,44,0.08) 45%, rgba(3,22,44,0.35));
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 14px 16px;
  max-width: 54%;
}
.hero h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.hero .sub {
  margin-top: 4px;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--cyan);
  font-weight: 700;
}
.hero.offshore .hero-copy { max-width: 46%; }
.hero.offshore h2 { font-size: 16px; line-height: 1.15; }
.hero.offshore .tag {
  margin-top: 8px;
  font-size: 10px;
  color: #d7f7ff;
  max-width: 220px;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.kpi {
  background: linear-gradient(180deg, #0d3b64, #0a2f52);
  border: 1px solid #1c6d92;
  border-radius: 8px;
  padding: 10px 10px 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 76px;
  box-shadow: var(--shadow);
}
.kpi .icon, .kpi .donut, .kpi .ico, .kpi .lucide {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.kpi .lucide, .kpi svg.ico {
  width: 30px;
  height: 30px;
  color: #eaf8ff;
  stroke: currentColor;
}
.kpi.orange .lucide, .kpi.orange .ico { color: var(--orange); }
.kpi.teal .lucide { color: #3ad0c8; }
.kpi .val.sm { font-size: 16px; }
.kpi h3 {
  margin: 0;
  font-size: 11px;
  color: #c5e6f5;
  font-weight: 700;
}
.kpi .val {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.05;
}
.kpi .hint { font-size: 10px; color: var(--muted); }
.kpi.cyan .val { color: var(--cyan); }
.kpi.orange .val { color: var(--orange); }
.kpi.teal .val { color: #3ad0c8; }

.grid-5 {
  display: grid;
  grid-template-columns: 1.05fr 1.15fr 1.35fr 0.95fr 1.05fr;
  gap: 8px;
  margin-bottom: 8px;
}
.card {
  background: linear-gradient(180deg, #0e3a61 0%, #0b2f50 100%);
  border: 1px solid #1a6a8c;
  border-radius: 8px;
  padding: 10px 10px 8px;
  box-shadow: var(--shadow);
  min-height: 250px;
}
.card h4 {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.6px;
  color: var(--cyan);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.card h4 .lucide, .card h4 svg { width: 14px; height: 14px; }
.snap-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}
.snap-row p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: #e8f6ff;
}
.snap-row b { color: #fff; }
.snap-row .lucide, .snap-row .row-ico {
  width: 16px;
  height: 16px;
  color: var(--cyan);
  margin-top: 1px;
}

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1.15fr) minmax(70px, 1fr) 36px;
  gap: 6px;
  align-items: center;
}
.bar-row span { font-size: 11px; color: #dff3ff; line-height: 1.2; }
.bar-row em { font-style: normal; font-size: 11px; font-weight: 800; text-align: right; }
.bar-row .lucide, .bar-row .row-ico,
.eq-row .lucide, .eq-row .row-ico,
.row-ico {
  width: 16px;
  height: 16px;
  color: var(--cyan);
  display: block;
  overflow: visible;
  flex-shrink: 0;
}
.track {
  height: 10px;
  background: #08243c;
  border-radius: 99px;
  overflow: hidden;
}
.track i { display: block; height: 100%; border-radius: 99px; }
.g { background: var(--green); }
.y { background: var(--yellow); }
.o { background: var(--orange); }
.thumb {
  margin-top: 10px;
  height: 58px;
  border-radius: 6px;
  background: url("/static/thumb-yard.jpg") center/cover;
  position: relative;
  overflow: hidden;
}
.thumb b {
  position: absolute;
  left: 8px;
  bottom: 6px;
  font-size: 10px;
  letter-spacing: 0.4px;
}
.caption {
  margin: 6px 0 0;
  font-size: 10px;
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.process {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 6px 8px;
}
.step { text-align: center; font-size: 11px; }
.bubble {
  width: 46px;
  height: 46px;
  margin: 0 auto 6px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  position: relative;
  background: #d9f4ff;
}
.bubble .lucide, .bubble .row-ico {
  width: 20px;
  height: 20px;
  color: #fff;
  stroke: currentColor;
}
.bubble span {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.85);
}
.bubble.n1 { background: #2f6dff; }
.bubble.n1 span { background: #1d4ed8; }
.bubble.n2 { background: #1aa6e6; }
.bubble.n2 span { background: #0284c7; }
.bubble.n3 { background: #12c2b8; }
.bubble.n3 span { background: #0f766e; }
.bubble.n4 { background: var(--orange); }
.bubble.n4 span { background: #c2410c; }
.bubble.n5 { background: #2ecc71; }
.bubble.n5 span { background: #15803d; }
.bubble.n6 { background: #3b82f6; }
.bubble.n6 span { background: #1d4ed8; }
.bubble.n7 { background: #64748b; }
.bubble.n7 span { background: #334155; }
.bubble.n8 { background: #ef4444; }
.bubble.n8 span { background: #b91c1c; }
.step b { display: block; font-size: 11px; }
.step small { color: var(--muted); font-size: 10px; }

.tl { list-style: none; margin: 0; padding: 0; }
.tl li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
  font-size: 11.5px;
  margin-bottom: 7px;
  align-items: start;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 3px;
}
.d1 { background: #3b82f6; }
.d2 { background: #22c55e; }
.d3 { background: #eab308; }
.d4 { background: #f97316; }
.d5 { background: #06b6d4; }
.d6 { background: #a855f7; }
.d7 { background: #64748b; }
.d8 { background: #ef4444; }

.eq { display: flex; flex-direction: column; gap: 8px; }
.eq-row {
  display: grid;
  grid-template-columns: 18px 1fr 40px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}
.eq-row b { color: var(--cyan); text-align: right; }
.watch {
  margin-top: 10px;
  background: #12324c;
  border: 1px solid #c45a2a;
  border-radius: 6px;
  padding: 8px;
}
.watch h5 {
  margin: 0 0 6px;
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.watch h5 .lucide { width: 14px; height: 14px; }
.watch li { font-size: 11px; margin: 0 0 4px 14px; color: #eaf7ff; }
.night {
  margin-top: 8px;
  height: 48px;
  border-radius: 6px;
  background: url("/static/thumb-night.jpg") center/cover;
}

.bottom {
  background: linear-gradient(180deg, #0c355a, #0a2c4c);
  border: 1px solid #1a6a8c;
  border-radius: 8px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.bottom h4 {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.6px;
}
.tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th, td { padding: 6px 6px; text-align: left; }
th { color: #9fd3ea; font-weight: 700; border-bottom: 1px solid #245e7c; }
td { border-bottom: 1px solid rgba(255,255,255,0.06); }
.prog {
  height: 8px;
  background: #08243c;
  border-radius: 99px;
  overflow: hidden;
  width: 88px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}
.prog i { display: block; height: 100%; }
.st {
  font-size: 11px;
  font-weight: 800;
}
.st.ok { color: var(--green); }
.st.go { color: var(--orange); }
.st.wait { color: var(--yellow); }

.footer-note {
  margin-top: 8px;
  font-size: 10px;
  color: #8fb6c9;
  display: flex;
  justify-content: space-between;
}

.logout {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: 1px solid #4aa3c7;
  color: #d9f6ff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

/* login */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(3,22,44,0.82), rgba(3,18,32,0.92)),
    url("/static/hero-offshore.jpg") center/cover;
}
.login-card {
  width: min(440px, 92vw);
  background: linear-gradient(180deg, #0d3b64, #0a2f52);
  border: 1px solid #1c6d92;
  border-radius: 12px;
  padding: 28px 26px 22px;
  box-shadow: var(--shadow);
}
.login-card h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.3px;
}
.login-card .lede {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 13px;
}
label { display: block; font-size: 12px; margin: 10px 0 4px; color: #cfe8f5; font-weight: 700; }
input[type=text], input[type=password] {
  width: 100%;
  border: 1px solid #2a7a9c;
  background: #06243c;
  color: #fff;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
}
button.primary, .primary {
  margin-top: 16px;
  width: 100%;
  border: 0;
  background: linear-gradient(180deg, #00d2ee, #0891b2);
  color: #042033;
  font-weight: 800;
  padding: 11px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.err {
  background: #4a1d1d;
  color: #ffd7d0;
  border: 1px solid #c45a2a;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
}
.login-foot { margin-top: 14px; font-size: 11px; color: #8fb6c9; text-align: center; }

.hub, .control {
  width: min(960px, 94vw);
  margin: 32px auto;
  color: #fff;
}
.hub-head h1 { margin: 8px 0 0; }
.control-nav .dash-link {
  color: #cfe9f7;
  text-decoration: none;
  font-weight: 700;
  padding: 8px 4px;
}
.hub-head, .control-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.control-nav {
  align-items: center;
  flex-wrap: wrap;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 150px;
  padding: 20px 18px;
  border: 1px solid #1c6d92;
  border-radius: 12px;
  background: linear-gradient(180deg, #0d3b64, #0a2f52);
  color: #fff;
  text-decoration: none;
}
.hub-card:hover { border-color: #00d2ee; }
.hub-card-admin { border-color: #c9a227; }
.hub-kicker {
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8fb6c9;
}
.hub-card strong { font-size: 22px; }
.ghost {
  border: 1px solid #2a7a9c;
  background: transparent;
  color: #cfe8f5;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}
.control-card {
  margin-top: 18px;
  padding: 20px 18px;
  border: 1px solid #1c6d92;
  border-radius: 12px;
  background: linear-gradient(180deg, #0d3b64, #0a2f52);
}
.control-card h2 { margin: 0 0 12px; font-size: 16px; }
.create-user, .create-board, .password-form, .access-form { display: grid; gap: 6px; }
.hint { margin: 0 0 10px; color: #9ec4d8; font-size: 13px; line-height: 1.45; }
.kind-pick { display: grid; gap: 8px; }
.kind-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid #1c6d92;
  border-radius: 8px;
  cursor: pointer;
}
.kind-option:has(input:checked) { border-color: #00d2ee; background: #0a3d66; }
.board-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.board-list li { display: grid; gap: 2px; }
.board-list a { color: #7fe9ff; font-weight: 800; text-decoration: none; }
.board-list span { color: #9ec4d8; font-size: 13px; }
fieldset {
  border: 1px solid #1c6d92;
  border-radius: 8px;
  margin: 8px 0 0;
}
.check { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; font-weight: 600; }
.user-table-wrap { overflow-x: auto; }
.user-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.user-table th, .user-table td {
  border-bottom: 1px solid #1c6d92;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}
.user-table tr.is-inactive { opacity: .55; }
.you {
  margin-left: 6px;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #00d2ee;
}
.notice {
  margin: 12px 0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}
.notice.ok { background: #134e4a; color: #d1fae5; border: 1px solid #14b8a6; }
.small-primary {
  border: 0;
  background: #0891b2;
  color: #042033;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .kpis, .grid-5, .tables, .heroes, .topbar { grid-template-columns: 1fr 1fr; }
  .grid-5 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .kpis, .heroes, .tables, .topbar { grid-template-columns: 1fr; }
}
