:root {
  --navy: #102f62;
  --navy-2: #0a234a;
  --gold: #d7a720;
  --gold-2: #f0d887;
  --ink: #142033;
  --muted: #6a7280;
  --line: #dde4ee;
  --soft: #f7f8fa;
  --mist: #eef4fb;
  --card: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 48px rgba(16, 47, 98, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(239, 245, 251, 0.92)),
    radial-gradient(circle at 74% 8%, rgba(215, 167, 32, 0.15), transparent 22rem),
    var(--soft);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.brand-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 46px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(150deg, var(--navy), var(--navy-2));
}

.brand-hero::before,
.brand-hero::after,
.vi-wave::before,
.vi-wave::after {
  content: "";
  position: absolute;
  height: 1px;
  background: var(--gold);
  opacity: 0.82;
  transform: rotate(-8deg);
}

.brand-hero::before {
  left: -10%;
  right: 10%;
  bottom: 28%;
}

.brand-hero::after {
  left: 12%;
  right: -14%;
  bottom: 23%;
  opacity: 0.45;
}

.vi-wave {
  position: absolute;
  inset: auto -20% 10% 0;
  height: 220px;
  opacity: 0.35;
  background:
    linear-gradient(140deg, transparent 0 44%, rgba(255, 255, 255, 0.12) 45%, transparent 46%),
    linear-gradient(158deg, transparent 0 55%, rgba(255, 255, 255, 0.1) 56%, transparent 57%);
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.logo-lockup img,
.brand-logo img {
  width: 76px;
  height: 76px;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}

.logo-lockup strong {
  display: block;
  font-size: 34px;
  letter-spacing: 0;
}

.logo-lockup span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.brand-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
}

.brand-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1;
  letter-spacing: 0;
}

.brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.brand-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.brand-stats div {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.brand-stats strong {
  display: block;
  color: var(--gold-2);
  font-size: 26px;
}

.brand-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 40px;
}

.login-card {
  width: min(560px, 100%);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.muted {
  color: var(--muted);
  line-height: 1.7;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.role-card {
  min-height: 118px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
}

.role-card.active {
  border-color: var(--navy);
  box-shadow: 0 10px 28px rgba(16, 47, 98, 0.12);
}

.role-card i {
  color: var(--gold);
}

.role-card strong {
  display: block;
  margin: 10px 0 4px;
  color: var(--navy);
}

.role-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-row {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.form-row label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: #fff;
}

.form-row textarea {
  min-height: 96px;
  resize: vertical;
}

.primary,
.secondary,
.text-btn,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  font-weight: 900;
}

.primary {
  color: #fff;
  border: 1px solid var(--navy);
  background: var(--navy);
}

.secondary {
  color: var(--navy);
  border: 1px solid #cbd5e1;
  background: #fff;
}

.text-btn {
  color: var(--navy);
  border: 0;
  background: #eef4fb;
}

.danger {
  color: #8b1e1e;
  border: 1px solid #f1c9c9;
  background: #fff6f6;
}

.demo-strip {
  margin-top: 16px;
  padding: 12px;
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo img {
  width: 52px;
  height: 52px;
}

.brand-logo strong {
  display: block;
  color: var(--navy);
  font-size: 22px;
}

.brand-logo small {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 7px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 0 13px;
  color: #4b5565;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  text-align: left;
}

.nav button.active,
.nav button:hover {
  color: var(--navy);
  background: var(--mist);
}

.user-box {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.user-box strong {
  display: block;
}

.user-box span {
  color: var(--muted);
  font-size: 13px;
}

.main {
  min-width: 0;
  padding: 22px 28px 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  color: var(--navy);
  font-size: 30px;
}

.topbar p {
  margin: 4px 0 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 22px;
  margin-bottom: 18px;
  padding: 28px;
  color: #fff;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--navy), #173f78);
  box-shadow: var(--shadow);
}

.hero-band::after {
  content: "";
  position: absolute;
  left: 36%;
  right: -12%;
  bottom: 42px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: rotate(-8deg);
}

.hero-band h2 {
  margin-bottom: 10px;
  font-size: 36px;
}

.hero-band p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.75;
}

.hero-card {
  position: relative;
  z-index: 1;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.hero-card strong {
  display: block;
  color: var(--gold-2);
  font-size: 38px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.span-5 {
  grid-column: span 5;
}

.span-6 {
  grid-column: span 6;
}

.span-7 {
  grid-column: span 7;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 21px;
}

.kpi strong {
  display: block;
  color: var(--navy);
  font-size: 32px;
}

.kpi span {
  color: var(--muted);
}

.journey {
  display: grid;
  grid-template-columns: repeat(6, minmax(170px, 1fr));
  gap: 12px;
  overflow-x: auto;
}

.journey-step {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.journey-step.active {
  border-color: var(--navy);
}

.journey-step h3 {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 16px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 9px;
  color: var(--navy);
  border-radius: 999px;
  background: var(--mist);
  font-size: 12px;
  font-weight: 900;
}

.tag.gold {
  color: #7c5600;
  background: #fff3c9;
}

.tag.green {
  color: #166044;
  background: #dff5ea;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 12px;
  overflow-x: auto;
}

.column {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfd;
}

.column h3 {
  color: var(--navy);
  font-size: 15px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: 360px;
  padding: 14px 16px;
  color: #fff;
  border-radius: var(--radius);
  background: var(--navy);
  box-shadow: var(--shadow);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(4, minmax(130px, 0.8fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.filter-grid .form-row {
  margin-bottom: 0;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1080px) {
  .login-shell,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding-bottom: 92px;
  }

  .hero-band {
    grid-template-columns: 1fr;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-3,
  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: span 12;
  }

  .mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
  }

  .mobile-nav button {
    display: grid;
    place-items: center;
    min-height: 48px;
    color: var(--muted);
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 12px;
    font-weight: 900;
  }
}

@media (max-width: 680px) {
  .brand-hero {
    min-height: 440px;
    padding: 28px;
  }

  .login-panel,
  .login-card {
    padding: 20px;
  }

  .role-grid,
  .brand-stats,
  .filter-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .main {
    padding: 16px 14px 92px;
  }

  .grid {
    gap: 12px;
  }

  .panel,
  .hero-band {
    padding: 16px;
  }

  .hero-band h2 {
    font-size: 28px;
  }
}
