:root {
  --bg: #f4f0e8;
  --panel: rgba(255, 250, 242, 0.88);
  --panel-strong: #fffaf2;
  --panel-dark: #10222b;
  --text: #172126;
  --muted: #5f6d73;
  --line: rgba(17, 34, 43, 0.12);
  --brand: #0d8b7d;
  --brand-deep: #0b645b;
  --accent: #ef7d57;
  --danger: #c53f3f;
  --shadow: 0 24px 70px rgba(20, 35, 37, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 139, 125, 0.18), transparent 32%),
    radial-gradient(circle at bottom right, rgba(239, 125, 87, 0.18), transparent 30%),
    linear-gradient(135deg, #efe6d8 0%, #f8f4ee 36%, #e8efea 100%);
}

button,
input,
textarea,
select {
  font: inherit;
}

.page-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.landing-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 520px);
  gap: 28px;
  padding: 28px;
  align-items: stretch;
}

.landing-panel,
.landing-auth {
  min-width: 0;
}

.brand-topline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f4fbf9;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-badge.soft {
  background: rgba(239, 125, 87, 0.16);
}

.brand-panel {
  padding: 42px;
  border-radius: 36px;
  background:
    linear-gradient(160deg, rgba(11, 35, 39, 0.96), rgba(22, 67, 74, 0.94)),
    linear-gradient(135deg, rgba(239, 125, 87, 0.22), rgba(13, 139, 125, 0.18));
  color: #eff5f3;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239, 125, 87, 0.28), transparent 70%);
}

.landing-copy {
  max-width: 680px;
  color: rgba(239, 245, 243, 0.8);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 28px;
}

.brand-feature-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(239, 245, 243, 0.82);
}

.feature-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef7d57, #f2b38a);
  box-shadow: 0 0 0 6px rgba(239, 125, 87, 0.12);
}

.landing-auth {
  display: grid;
  gap: 20px;
  align-content: center;
}

.auth-switch-card {
  padding: 16px;
  background: rgba(255, 251, 246, 0.9);
}

.auth-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  background: rgba(16, 34, 43, 0.05);
  border-radius: 20px;
  margin-bottom: 16px;
}

.auth-switch {
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.auth-switch.active {
  background: #10222b;
  color: #f7fbfa;
  box-shadow: 0 12px 24px rgba(16, 34, 43, 0.18);
}

.auth-panel {
  animation: panelEnter 0.26s ease;
}

.auth-card {
  padding: 28px;
}

.auth-head {
  margin-bottom: 22px;
}

.auth-form-grid {
  margin-bottom: 18px;
}

.main-auth-card {
  background: rgba(255, 252, 248, 0.94);
}

.secondary-auth-card {
  background: linear-gradient(180deg, rgba(255, 246, 238, 0.92), rgba(255, 251, 246, 0.9));
}

.landing-metrics {
  margin-top: 32px;
}

.brand-ribbon {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.brand-ribbon > div {
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-ribbon span {
  display: block;
  font-size: 13px;
  color: rgba(239, 245, 243, 0.64);
  margin-bottom: 6px;
}

.brand-ribbon strong {
  color: #f8fffd;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
}

.app-sidebar {
  padding: 28px 22px;
  background: linear-gradient(180deg, rgba(12, 31, 36, 0.98), rgba(16, 42, 48, 0.96));
  color: #eff5f3;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar .side-nav {
  flex: 1 1 auto;
  overflow-y: auto;
}

.app-sidebar .user-panel {
  flex-shrink: 0;
}

.app-sidebar .ghost-btn {
  color: rgba(239, 245, 243, 0.88);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 600;
  width: 100%;
}

.app-sidebar .ghost-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.app-sidebar-top h2 {
  margin: 0 0 10px;
}

.workspace-panel {
  padding: 24px;
  display: grid;
  gap: 20px;
}

.workspace-hero {
  padding: 24px 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 360px);
  gap: 18px;
  align-items: stretch;
}

.workspace-hero h2 {
  margin: 0 0 8px;
}

.workspace-hero-copy {
  min-width: 0;
}

.welcome-card {
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(16, 34, 43, 0.98), rgba(27, 72, 77, 0.94));
  color: #edf7f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.welcome-card h3 {
  margin: 0 0 8px;
}

.welcome-card p {
  margin: 0;
  color: rgba(237, 247, 245, 0.78);
  line-height: 1.6;
}

.welcome-badge {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f2fffc;
  font-size: 12px;
  margin-bottom: 16px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.overview-card {
  padding: 22px;
  background: rgba(255, 252, 247, 0.88);
}

.overview-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.overview-card strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.overview-card small {
  color: rgba(95, 109, 115, 0.92);
}

.sidebar {
  padding: 32px 28px;
  background: linear-gradient(180deg, rgba(12, 31, 36, 0.96), rgba(18, 47, 52, 0.92));
  color: #eff5f3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.sidebar h1,
.hero-card h2,
.panel-card h3,
.panel-card h4 {
  margin: 0;
  letter-spacing: -0.03em;
}

.sidebar-copy,
.card-head p,
.hero-card p,
.sidebar-panel p {
  color: rgba(239, 245, 243, 0.76);
}

.eyebrow.dark {
  color: rgba(23, 33, 38, 0.56);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: rgba(239, 245, 243, 0.72);
  margin-bottom: 12px;
}

.main-panel {
  padding: 28px;
}

.hero-card,
.panel-card {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  border-radius: 28px;
}

.hero-card {
  padding: 28px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-card p,
.card-head p,
label span,
.metric-card span,
.status-pill,
.sidebar-panel p,
.table-row small,
.empty-state {
  color: var(--muted);
}

.hero-grid,
.auth-grid,
.dashboard-grid {
  display: grid;
  gap: 20px;
}

.hero-grid {
  grid-template-columns: repeat(3, 1fr);
}

.metric-card {
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(241, 235, 224, 0.78));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.metric-card strong {
  font-size: 18px;
}

.auth-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-card,
.tab-panel {
  padding: 24px;
}

.accent-card {
  background: linear-gradient(180deg, rgba(255, 246, 238, 0.9), rgba(255, 251, 246, 0.88));
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
  transition: 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(13, 139, 125, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 139, 125, 0.12);
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 18px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: white;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(13, 139, 125, 0.24);
}

.primary-btn.alt {
  background: linear-gradient(135deg, #cc6e4d, var(--accent));
}

.ghost-btn {
  background: rgba(16, 34, 43, 0.06);
  color: var(--text);
}

.ghost-btn.strong {
  background: rgba(239, 125, 87, 0.12);
}

.primary-btn:hover,
.ghost-btn:hover,
.tab:hover {
  transform: translateY(-1px);
}

.sidebar-panel,
.status-pill,
.nav-tabs,
.table-row,
.result-card,
.stat-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-panel {
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
}

.status-pill {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #6ce0a6;
  box-shadow: 0 0 0 6px rgba(108, 224, 166, 0.14);
}

.hidden {
  display: none !important;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
}

.side-nav {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
}

.tab {
  border: 0;
  border-radius: 16px;
  background: transparent;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.side-nav .tab {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  color: rgba(239, 245, 243, 0.72);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}

.tab.active {
  background: #10222b;
  color: #f5f9f7;
}

.side-nav .tab.active {
  background: linear-gradient(135deg, rgba(13, 139, 125, 0.98), rgba(10, 93, 84, 0.96));
  color: #f8fffd;
  box-shadow: 0 14px 30px rgba(4, 20, 22, 0.28);
}

.tab-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.tab-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.tab-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tab-copy strong,
.tab-copy small {
  line-height: 1.2;
}

.tab-copy small {
  color: inherit;
  opacity: 0.68;
}

.inline-form {
  display: grid;
  gap: 14px;
}

.inline-form.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-form.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-form.single-row {
  grid-template-columns: 1fr auto;
  margin-top: 24px;
}

.full-row {
  grid-column: 1 / -1;
}

.card-head,
.split-head {
  margin-bottom: 18px;
}

.split-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.results-grid,
.table-list,
.stats-cards,
.bar-list {
  display: grid;
  gap: 14px;
}

.result-card,
.table-row,
.stat-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--line);
}

.result-card strong,
.table-row strong,
.stat-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
}

.result-card p,
.table-row p {
  margin: 4px 0;
  color: var(--muted);
}

.table-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 18px;
  align-items: center;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.inline-actions {
  align-items: center;
  flex-wrap: wrap;
}

.role-select {
  min-width: 140px;
}

.user-list {
  margin-top: 20px;
}

.stats-cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 20px;
}

.stat-card {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-card span {
  color: var(--muted);
}

.stat-card strong {
  font-size: 34px;
  margin: 0;
}

.stats-dual {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bar-item {
  display: grid;
  gap: 8px;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(16, 34, 43, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #10222b;
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.24s ease;
  max-width: 360px;
  z-index: 100;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

img.preview {
  width: 100%;
  max-width: 220px;
  border-radius: 14px;
  margin-top: 10px;
}

.result-card {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.result-card-header strong {
  font-size: 16px;
  flex: 1;
}

.severity-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(239, 125, 87, 0.15);
  color: #c53f3f;
}

.result-card-info {
  display: grid;
  gap: 6px;
}

.result-card-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.result-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.app-layout {
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  margin: 14px 22px 0;
  border: 1px solid rgba(16, 34, 43, 0.08);
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.8);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(16, 34, 43, 0.08);
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 360px);
  gap: 18px;
  margin-bottom: 18px;
}

.workspace-hero-copy,
.welcome-card,
.overview-card,
.tab-panel,
.content-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 34, 43, 0.08);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(16, 34, 43, 0.08);
}

.workspace-hero-copy {
  padding: 24px 26px;
  background:
    radial-gradient(circle at top right, rgba(13, 139, 125, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 251, 246, 0.78));
}

.workspace-eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6a7c82;
}

.workspace-hero-copy h2 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #173640;
}

.workspace-hero-copy p:last-child {
  margin: 0;
  color: #60727a;
  line-height: 1.7;
  font-size: 15px;
}

.welcome-card {
  padding: 22px;
  background: linear-gradient(135deg, rgba(16, 34, 43, 0.98), rgba(23, 71, 77, 0.94));
  color: #eff7f5;
}

.welcome-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.welcome-card p {
  margin: 0;
  color: rgba(239, 247, 245, 0.8);
  line-height: 1.6;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f6fffd;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.overview-card {
  padding: 18px 20px;
}

.overview-card span {
  display: block;
  color: #6b7c83;
  font-size: 13px;
  margin-bottom: 8px;
}

.overview-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.15;
  color: #173640;
  margin-bottom: 8px;
}

.overview-card small {
  color: #6b7c83;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(13, 139, 125, 0.2);
}

.brand-logo.sm {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 22px;
}

.header-brand-name {
  font-size: 24px;
  font-weight: 800;
  color: #173640;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.nav-btn {
  border: 1px solid rgba(16, 34, 43, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #3c535c;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(13, 139, 125, 0.28);
  box-shadow: 0 10px 18px rgba(16, 34, 43, 0.08);
}

.nav-btn.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  border-color: transparent;
  box-shadow: 0 14px 26px rgba(13, 139, 125, 0.22);
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.header-user-info {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(16, 34, 43, 0.06);
  color: #29434d;
  font-weight: 700;
  white-space: nowrap;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 12px 24px rgba(13, 139, 125, 0.2);
}

.btn-ghost-sm,
.btn-ghost {
  color: #1f3741;
  background: rgba(16, 34, 43, 0.06);
}

.btn-ghost-sm {
  padding: 10px 14px;
}

.btn-block {
  width: 100%;
}

.page-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}

.tab-panel {
  padding: 22px;
}

.page-title-bar h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.03em;
  color: #173640;
}

.page-title-bar p {
  margin: 0;
  color: #60727a;
}

.search-block {
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(16, 34, 43, 0.08);
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-main-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.88);
}

.search-tip {
  margin: 10px 0 0;
  color: #66777f;
  font-size: 13px;
}

.results-area {
  display: grid;
  gap: 14px;
}

.app-main {
  padding: 20px 22px 32px;
}

.content-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}

.upload-form {
  display: grid;
  gap: 14px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-item {
  display: grid;
  gap: 8px;
  align-content: start;
}

.custom-note-wrap {
  min-width: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
  border-radius: 16px;
  padding: 4px;
}

.custom-note-wrap.is-hidden {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
}

.custom-note-wrap.is-active {
  opacity: 1;
  transform: translateY(0);
  background: linear-gradient(180deg, rgba(13, 139, 125, 0.08), rgba(13, 139, 125, 0.03));
  box-shadow: 0 10px 22px rgba(13, 139, 125, 0.12);
}

.custom-note-wrap.is-active .form-label {
  color: var(--brand-deep);
}

.custom-note-wrap.is-active .form-input {
  border-color: rgba(13, 139, 125, 0.38);
  box-shadow: 0 0 0 4px rgba(13, 139, 125, 0.08);
}

.form-label {
  font-weight: 700;
  color: #21343f;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.88);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-section-title {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
  color: #1b3642;
}

.detail-section-shell {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(13, 139, 125, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(13, 139, 125, 0.04));
}

.section-helper-text {
  margin: -2px 0 0;
  color: #60727a;
  font-size: 13px;
  line-height: 1.5;
}

.severity-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.severity-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease, background-color 0.2s ease;
}

.severity-card:hover {
  border-color: rgba(16, 34, 43, 0.25);
  box-shadow: 0 8px 18px rgba(16, 34, 43, 0.08);
  transform: translateY(-1px);
}

.severity-card.active {
  border-color: rgba(13, 139, 125, 0.7);
  background: rgba(13, 139, 125, 0.08);
  box-shadow: 0 12px 24px rgba(13, 139, 125, 0.18);
}

.severity-card input[type="radio"] {
  margin-top: 3px;
}

.severity-card-body {
  display: grid;
  gap: 6px;
}

.severity-badge {
  display: inline-block;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.sev1-badge {
  background: rgba(197, 63, 63, 0.12);
  color: #b43737;
}

.sev2-badge {
  background: rgba(226, 155, 24, 0.18);
  color: #945f09;
}

.sev3-badge {
  background: rgba(13, 139, 125, 0.15);
  color: #0c5f56;
}

.severity-desc {
  color: #384f58;
  line-height: 1.4;
}

.severity-desc small {
  color: #61757d;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .app-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .workspace-hero,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .header-left,
  .header-right {
    justify-content: space-between;
  }

  .header-nav {
    justify-content: flex-start;
  }

  .page-title-bar,
  .search-row,
  .form-grid-2,
  .severity-group {
    grid-template-columns: 1fr;
  }

  .page-title-bar {
    align-items: start;
  }
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1200px) {
  .page-shell,
  .landing-shell,
  .app-shell,
  .hero-card,
  .workspace-hero,
  .auth-grid,
  .stats-dual,
  .stats-cards,
  .overview-grid,
  .inline-form.two-col,
  .inline-form.three-col {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 16px;
  }

  .app-sidebar {
    padding-bottom: 20px;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .table-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .main-panel {
    padding: 18px;
  }

  .landing-shell,
  .workspace-panel {
    padding: 18px;
  }

  .sidebar {
    padding: 24px 18px;
  }

  .brand-panel,
  .auth-card,
  .workspace-hero {
    padding: 22px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .auth-switcher,
  .brand-ribbon {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   手机端顶部导航栏（桌面隐藏）
   ============================================================ */

.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: linear-gradient(180deg, #0c1f24 0%, #102a30 100%);
  color: #eff5f3;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  z-index: 150;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.menu-toggle-btn {
  width: 38px;
  height: 38px;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #eff5f3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease;
}

.menu-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.menu-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mobile-brand {
  font-weight: 700;
  font-size: 15px;
  flex: 1;
  letter-spacing: -0.01em;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 149;
}

.sidebar-overlay.visible {
  display: block;
}

/* ============================================================
   手机端布局（≤768px）
   ============================================================ */

@media (max-width: 768px) {
  /* 显示手机顶栏 */
  .mobile-topbar {
    display: flex;
  }

  /* 防止页面内容被顶栏挑盖 */
  .app-shell {
    display: block;
    padding-top: 52px;
    min-height: 100vh;
  }

  /* 侧边栏改为固定层抖出抗屉 */
  .app-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(290px, 85vw);
    transform: translateX(-100%);
    z-index: 200;
    overflow-y: auto;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  /* 内容区内边距 */
  .workspace-panel {
    padding: 14px;
  }

  /* 登录页：隐藏品牌介绍面板，仅显示登录/注册表单 */
  .brand-panel {
    display: none;
  }

  .landing-shell {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px 12px;
    min-height: 100vh;
    gap: 0;
  }

  .landing-auth {
    order: 0;
    width: 100%;
    max-width: 480px;
    align-content: start;
  }

  /* 工作台 hero：手机端完全隐藏，直接进入功能区 */
  .workspace-hero {
    display: none;
  }

  /* 概览卡片：2列 */
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 统计卡片：2列 */
  .stats-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* 统计双栏改单栏 */
  .stats-dual {
    grid-template-columns: 1fr;
  }

  /* 分割标题改为竞列 */
  .split-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* 表格行：全部占满一行 */
  .table-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .table-actions {
    justify-content: flex-start;
  }

  /* 内行表单全部单列 */
  .inline-form.two-col,
  .inline-form.three-col {
    grid-template-columns: 1fr;
  }

  .inline-form.single-row {
    grid-template-columns: 1fr;
  }

  .inline-form.single-row button {
    width: 100%;
  }

  /* 注册表单网格单列 */
  .auth-form-grid {
    grid-template-columns: 1fr;
  }

  /* Toast 全宽 */
  .toast {
    right: 12px;
    left: 12px;
    bottom: 14px;
    max-width: none;
  }

  /* panel 圆角微小 */
  .panel-card,
  .hero-card {
    border-radius: 20px;
  }

  .brand-panel {
    border-radius: 24px;
  }
}

/* ============================================================
   小屏手机补充优化（≤480px）
   ============================================================ */

@media (max-width: 480px) {
  .landing-shell {
    padding: 8px;
    gap: 8px;
  }

  .brand-panel {
    padding: 18px 14px;
  }

  .brand-panel h1 {
    font-size: 22px;
    line-height: 1.3;
  }

  .auth-card {
    padding: 18px 14px;
  }

  .auth-switch-card {
    padding: 12px;
  }

  .overview-card {
    padding: 16px;
  }

  .overview-card strong {
    font-size: 22px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .tab-panel {
    padding: 14px;
  }

  .form-card {
    padding: 14px;
  }

  h1 {
    font-size: 22px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 17px;
  }
}
