:root {
  --ink: #162236;
  --muted: #657388;
  --line: #dce4ee;
  --paper: #ffffff;
  --canvas: #f4f7fb;
  --navy: #10243f;
  --navy-soft: #19375c;
  --accent: #0c7a59;
  --accent-soft: #e6f5ef;
  --danger: #b83232;
  --warning: #9b650c;
  --shadow: 0 16px 44px rgba(24, 45, 72, 0.09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang HK",
    "Noto Sans CJK SC", sans-serif;
}
a { color: #1259a7; }
button, input, select { font: inherit; }

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 66px;
  padding: 0 32px;
  color: #fff;
  background: linear-gradient(120deg, var(--navy), var(--navy-soft));
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  font-weight: 750;
  text-decoration: none;
}
.brand > span:last-child { display: grid; line-height: 1.2; }
.brand small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
}
.topnav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.topnav a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.topnav a:hover { color: #fff; }
.top-user { color: rgba(255, 255, 255, 0.72); font-size: 13px; }
.logout-form { margin: 0; }
.link-button {
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  cursor: pointer;
}

.shell { width: min(1180px, calc(100% - 36px)); margin: 34px auto 70px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.page-head h1 { margin: 0 0 7px; font-size: clamp(25px, 3vw, 34px); }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow {
  margin: 0 0 15px;
  color: #9cd9c4;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.2em;
}
.eyebrow.dark { color: var(--accent); }
.culture-strip {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: -4px 0 24px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #496174;
  background: linear-gradient(90deg, #fff, #f1f7f4);
  font-size: 13px;
  font-weight: 650;
}
.culture-strip i { width: 1px; height: 13px; background: #c8d7d1; }
.dashboard-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 30px;
  min-height: 290px;
  margin-bottom: 18px;
  padding: clamp(30px, 5vw, 54px);
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(120deg, #0b2039, #153d58 60%, #17574e);
  background-size: 46px 46px, 46px 46px, auto;
  box-shadow: var(--shadow);
}
.dashboard-hero::after {
  position: absolute;
  right: -90px;
  bottom: -190px;
  width: 450px;
  height: 450px;
  border: 1px solid rgba(150, 224, 196, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 74px rgba(150, 224, 196, 0.035);
  content: "";
}
.dashboard-hero-copy { position: relative; z-index: 1; max-width: 700px; }
.dashboard-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4.4vw, 55px);
  letter-spacing: -0.04em;
}
.dashboard-hero-copy > p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
}
.hero-actions { display: flex; gap: 10px; margin-top: 30px; }
.hero-button { background: #fff; color: var(--navy); }
.hero-button.ghost {
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.hero-date {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 190px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  padding-bottom: 5px;
  text-align: right;
}
.hero-date span { color: rgba(255, 255, 255, 0.58); font-size: 13px; }
.hero-date strong { margin: 7px 0 14px; font-size: 22px; }
.hero-date i { width: 34px; height: 1px; margin-bottom: 14px; background: rgba(255, 255, 255, 0.4); }
.hero-date small { color: rgba(255, 255, 255, 0.53); font-size: 11px; letter-spacing: 0.08em; }
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 36px;
}
.metric-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.metric-card span, .metric-card small { display: block; color: var(--muted); }
.metric-card span { font-size: 12px; }
.metric-card strong { display: block; margin: 7px 0 3px; font-size: 29px; }
.metric-card small { font-size: 10px; }
.metric-card.accent {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #107456, #155a66);
}
.metric-card.accent span, .metric-card.accent small { color: rgba(255, 255, 255, 0.68); }
.metric-card.wide { grid-column: span 3; }
.metric-card .metric-time { font-size: 18px; }
.compact-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 0 17px;
}
.section-heading h2, .panel-heading h2 { margin: 0; font-size: 24px; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.card-body { padding: 24px; }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
}
.tool-card::after {
  position: absolute;
  right: -50px;
  bottom: -80px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(12, 122, 89, 0.15), transparent 70%);
  content: "";
}
.tool-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 21px;
  font-weight: 800;
}
.tool-card h2 { margin: 0; font-size: 21px; }
.tool-card p { flex: 1; margin: 0; color: var(--muted); line-height: 1.65; }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; }
.tool-status {
  padding: 5px 9px;
  border-radius: 999px;
  color: #137353;
  background: #e9f7f0;
  font-size: 10px;
  font-weight: 700;
}
.tool-status.planned { color: #6e7c8e; background: #eef2f6; }
.muted-icon { color: #788798; background: #eef2f6; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.tool-meta span {
  padding: 5px 8px;
  border-radius: 6px;
  color: #5e7185;
  background: #f3f6f9;
  font-size: 10px;
}
.upcoming-card { box-shadow: none; background: rgba(255, 255, 255, 0.65); }
.upcoming-card::after { display: none; }
.split-panels {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  margin-top: 28px;
}
.recent-card, .culture-card { padding: 24px; }
.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 13px;
}
.panel-heading a { font-size: 12px; text-decoration: none; }
.recent-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.recent-row > div { display: grid; }
.recent-row small { color: var(--muted); }
.recent-row time { margin-left: auto; color: var(--muted); font-size: 11px; }
.avatar-mini {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #126b50;
  background: #e7f4ef;
  font-weight: 750;
}
.table-person { display: flex; align-items: center; gap: 10px; }
.table-person .avatar-mini { flex: 0 0 34px; }
.mini-empty { padding: 30px 0 10px; color: var(--muted); text-align: center; }
.culture-card {
  overflow: hidden;
  color: #fff;
  background: linear-gradient(140deg, #173850, #15594f);
}
.culture-card .eyebrow { color: #9ad9c3; }
.culture-card h2 { margin: 0 0 16px; font-size: 28px; line-height: 1.35; }
.culture-card p:not(.eyebrow) { color: rgba(255, 255, 255, 0.66); line-height: 1.7; }
.culture-lines { display: flex; gap: 7px; margin-top: 27px; }
.culture-lines i { width: 32px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.32); }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #fff;
  background: var(--accent);
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(0.95); }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button.danger { background: var(--danger); }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }
.empty { padding: 38px; color: var(--muted); text-align: center; }

.login-page {
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at 10% 15%, rgba(87, 186, 151, 0.2), transparent 28%),
    radial-gradient(circle at 90% 90%, rgba(85, 146, 189, 0.17), transparent 30%),
    linear-gradient(135deg, #091a30 0%, #102b48 54%, #174a50 100%);
}
.login-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  width: min(1180px, 100%);
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.3);
}
.login-brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(34px, 5vw, 72px);
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, #0c213a, #163a55 64%, #16504f);
  background-size: 44px 44px, 44px 44px, auto;
}
.login-brand-panel::after {
  position: absolute;
  right: -150px;
  bottom: -190px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(136, 220, 190, 0.22);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(136, 220, 190, 0.035),
    0 0 0 140px rgba(136, 220, 190, 0.025);
  content: "";
}
.login-brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}
.login-symbol,
.login-card-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg, #138363, #0d5e4b);
  font-size: 23px;
  font-weight: 800;
}
.login-brand-top strong { display: block; font-size: 17px; letter-spacing: 0.04em; }
.login-brand-top span {
  display: block;
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  letter-spacing: 0.2em;
}
.login-brand-top .company-alias {
  margin-top: 7px;
  color: #a5dfca;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.34em;
}
.login-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: auto 0;
  padding: 50px 0;
}
.login-brand-copy h1 {
  margin: 0 0 24px;
  font-size: clamp(38px, 5.2vw, 68px);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.login-brand-copy > p:last-child {
  max-width: 520px;
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
  line-height: 1.8;
}
.culture-values {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 42px;
}
.culture-values span {
  min-width: 78px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.055);
  font-size: 12px;
  text-align: center;
}
.login-brand-foot {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.35);
  font-size: 9px;
  letter-spacing: 0.18em;
}
.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  padding: clamp(34px, 5vw, 68px);
  background: #fbfcfe;
}
.login-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.login-card-mark { display: none; }
.login-kicker {
  margin: 0 0 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.login-card h2 { margin: 0; font-size: 29px; letter-spacing: -0.025em; }
.login-intro {
  margin: 0 0 31px;
  color: var(--muted);
  line-height: 1.7;
}
.field { display: grid; gap: 7px; margin-bottom: 17px; }
.field label { font-size: 13px; font-weight: 650; }
.input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid #cbd6e3;
  border-radius: 11px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.input:focus {
  outline: none;
  border-color: #58a98b;
  box-shadow: 0 0 0 4px rgba(12, 122, 89, 0.1);
}
.login-card .button { width: 100%; min-height: 50px; margin-top: 7px; font-size: 15px; }
.login-security {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  color: #8996a7;
  font-size: 11px;
}
.security-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf88;
  box-shadow: 0 0 0 4px rgba(76, 175, 136, 0.12);
}
.alert { margin-bottom: 16px; padding: 11px 13px; border-radius: 9px; font-size: 13px; }
.alert.error { color: #822020; background: #ffeded; }
.alert.success { color: #146443; background: #e9f8f1; }
.muted { color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); background: #f8fafc; font-size: 12px; }
td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #476073;
  background: #eef3f8;
  font-size: 11px;
}
.badge.on { color: var(--accent); background: var(--accent-soft); }
.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 8px 0 22px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.check input { width: 18px; height: 18px; margin-top: 2px; }
.grid-form { max-width: 680px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.summary-box { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.summary-box strong { display: block; margin-top: 6px; font-size: 22px; }
.price-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  .topbar { padding: 12px 16px; flex-wrap: wrap; }
  .topnav { width: 100%; gap: 12px; margin-left: 0; overflow-x: auto; }
  .shell { width: min(100% - 24px, 1180px); margin-top: 22px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .login-page { padding: 0; }
  .login-stage {
    grid-template-columns: 1fr;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
  }
  .login-brand-panel { min-height: 330px; padding: 28px 24px; }
  .login-brand-copy { padding: 42px 0 26px; }
  .login-brand-copy h1 { margin-bottom: 17px; font-size: 39px; }
  .login-brand-copy > p:last-child { font-size: 14px; }
  .culture-values { margin-bottom: 0; }
  .login-brand-foot { display: none; }
  .login-card { justify-content: flex-start; padding: 34px 25px 48px; }
  .login-card-mark { display: grid; width: 42px; height: 42px; font-size: 20px; }
  .login-card h2 { font-size: 26px; }
  .culture-strip { gap: 12px; overflow-x: auto; white-space: nowrap; }
  .dashboard-hero { min-height: auto; padding: 28px 24px; flex-direction: column; }
  .dashboard-hero h1 { font-size: 34px; }
  .hero-date { display: none; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .metric-card.wide { grid-column: span 2; }
  .compact-metrics { grid-template-columns: 1fr 1fr; }
  .compact-metrics .metric-card:last-child { grid-column: span 2; }
  .split-panels { grid-template-columns: 1fr; }
  .section-heading > span { display: none; }
}
