@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Space+Grotesk:wght@400;500;700&display=swap");

:root {
  --bg: #f6f8fc;
  --bg-strong: #ffffff;
  --surface: rgba(255, 255, 255, 0.76);
  --surface-strong: rgba(255, 255, 255, 0.92);
  --line: rgba(17, 24, 39, 0.08);
  --line-strong: rgba(37, 99, 235, 0.16);
  --text: #10203a;
  --muted: #5f6f8c;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --primary-deep: #163d9a;
  --accent: #f59e0b;
  --accent-soft: #fff3d6;
  --success: #0f9f6e;
  --danger: #d94444;
  --shadow: 0 24px 80px rgba(25, 60, 120, 0.12);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body,
#app {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.12), transparent 24%),
    linear-gradient(180deg, #fcfdff 0%, #f3f6fb 62%, #edf2f9 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
p,
strong,
span,
label,
button,
td,
th,
div {
  overflow-wrap: anywhere;
  word-break: break-word;
}

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

button {
  cursor: pointer;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
}

.shell::before,
.shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  z-index: 0;
}

.shell::before {
  width: 340px;
  height: 340px;
  top: 90px;
  right: -80px;
  background: rgba(37, 99, 235, 0.18);
}

.shell::after {
  width: 280px;
  height: 280px;
  bottom: 120px;
  left: -80px;
  background: rgba(245, 158, 11, 0.12);
}

.topbar-wrap {
  position: sticky;
  top: 16px;
  z-index: 30;
  padding: 16px 20px 0;
}

.topbar {
  max-width: 1440px;
  margin: 0 auto;
  padding: 16px 22px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 40px rgba(44, 79, 151, 0.12);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.brand-mark,
.topbar-actions,
.role-switch,
.topbar,
.layout,
.sidebar,
.sidebar-panel,
main,
.hero,
.hero-side,
.content-grid,
.grid-2,
.grid-3,
.stats-grid,
.sidebar-menu button,
.metric-card,
.card,
.table-card,
.timeline-item,
.project-summary,
.login-card,
.stat-badge,
.view-chip,
.list-item {
  position: relative;
  z-index: 1;
  min-width: 0;
}

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

.brand-copy,
.sidebar-heading,
.topbar-shortcuts,
.sidebar-summary {
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #2457e8 0%, #4f8dff 58%, #f59e0b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
}

.brand-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-subtitle,
.muted {
  color: var(--muted);
}

.topbar-actions,
.role-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-shortcuts {
  display: flex;
  align-items: center;
  gap: 10px;
}

.segmented {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
}

.segmented button {
  padding: 9px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  transition: 180ms ease;
}

.segmented button.active {
  background: linear-gradient(135deg, var(--primary) 0%, #5d9cff 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
}

.ghost-btn,
.primary-btn,
.soft-btn,
.danger-btn {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  border: 1px solid rgba(17, 24, 39, 0.06);
}

.soft-btn {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary) 0%, #5a8fff 100%);
  color: white;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
}

.active-chip {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-deep);
}

.danger-btn {
  background: rgba(217, 68, 68, 0.12);
  color: var(--danger);
}

.ghost-btn:hover,
.primary-btn:hover,
.soft-btn:hover,
.danger-btn:hover {
  transform: translateY(-1px);
}

.layout {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
}

.sidebar {
  position: sticky;
  top: 118px;
  align-self: start;
}

.sidebar-panel,
.hero,
.card,
.table-card,
.login-card {
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.76));
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.sidebar-panel {
  padding: 22px;
  border-radius: 28px;
}

.sidebar-summary {
  display: grid;
  gap: 10px;
}

.sidebar-menu {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.sidebar-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  padding: 15px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  border: 1px solid transparent;
  transition: 180ms ease;
  min-width: 0;
}

.sidebar-menu button.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(245, 158, 11, 0.12));
  border-color: rgba(37, 99, 235, 0.12);
}

.menu-count {
  min-width: 28px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-deep);
  font-size: 12px;
  text-align: center;
}

.hero {
  padding: 28px;
  border-radius: 34px;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 20px;
  margin-bottom: 20px;
}

.hero-spotlight {
  position: relative;
  overflow: hidden;
}

.hero-spotlight::before {
  content: "";
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.26), transparent 35%),
    radial-gradient(circle at 85% 28%, rgba(245, 158, 11, 0.18), transparent 24%),
    linear-gradient(135deg, #f8fbff 0%, #eef4ff 42%, #f7f6fd 100%);
}

.hero-spotlight > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-deep);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero h1,
.login-card h1 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy {
  margin: 14px 0 22px;
  max-width: 680px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.68;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.hero-side {
  display: grid;
  gap: 14px;
}

.metric-stack {
  display: grid;
  gap: 14px;
}

.metric-card {
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(41, 72, 138, 0.12);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: 34px;
  line-height: 1;
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
}

.metric-foot {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.content-grid {
  display: grid;
  gap: 18px;
}

.grid-3,
.grid-2,
.stats-grid {
  display: grid;
  gap: 16px;
}

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

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

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

.card,
.table-card,
.login-card {
  border-radius: 28px;
}

.card {
  padding: 20px;
}

.table-card {
  padding: 18px;
}

.card-head,
.table-head,
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  min-width: 0;
}

.card-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.card-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

.stat-badge,
.view-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.stat-badge {
  background: rgba(69, 192, 137, 0.14);
  color: var(--success);
}

.view-chip {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary-deep);
}

.bars,
.donut,
.region-bars {
  display: grid;
  gap: 14px;
}

.bar-row,
.region-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 12px;
}

.bar-track,
.region-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.bar-fill,
.region-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb 0%, #5d9cff 70%, #f59e0b 100%);
}

.ring {
  width: 180px;
  aspect-ratio: 1;
  margin: 10px auto;
  border-radius: 50%;
  background:
    conic-gradient(#2563eb 0deg 150deg, #7bb5ff 150deg 232deg, #f59e0b 232deg 290deg, #dbe7fb 290deg 360deg);
  position: relative;
}

.ring::after {
  content: "126 项";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: white;
  display: grid;
  place-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
  font-weight: 700;
}

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

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

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 10px;
  display: inline-block;
}

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

.filters .field {
  flex: 1 1 180px;
}

.field,
.field textarea {
  width: 100%;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

.table th,
.table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  text-align: left;
  vertical-align: top;
  min-width: 0;
}

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

.table td strong {
  display: block;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-active,
.status-published,
.status-following,
.status-won {
  background: rgba(69, 192, 137, 0.14);
  color: var(--success);
}

.status-pending,
.status-paused,
.status-pending-revisit,
.status-draft {
  background: rgba(245, 158, 11, 0.14);
  color: #b57900;
}

.status-disabled,
.status-offline,
.status-lost,
.status-overdue {
  background: rgba(239, 68, 68, 0.14);
  color: var(--danger);
}

.status-lead,
.status-proposal,
.status-completed,
.status-closed,
.status-constructing {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary-deep);
}

.detail-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tabs button {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
}

.detail-tabs button.active {
  background: linear-gradient(135deg, var(--primary) 0%, #5c95ff 100%);
  color: white;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.data-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.data-item label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item,
.list-item {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.timeline-meta,
.list-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 13px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.feedback-link-box {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.feedback-url-field input {
  font-size: 13px;
}

.feedback-item p {
  margin-bottom: 0;
  line-height: 1.7;
}

.feedback-public-card textarea {
  min-height: 150px;
  resize: vertical;
}

.media-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.media-desc-field {
  grid-column: 1 / -1;
}

.media-library {
  display: grid;
  gap: 12px;
}

.media-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.media-thumb {
  min-height: 112px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.06);
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.media-body h4 {
  margin: 0;
}

.media-body p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.bid-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.bid-result {
  max-height: 620px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.74);
}

.bid-result pre {
  margin: 0;
  padding: 18px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "DM Sans", sans-serif;
  line-height: 1.8;
  color: var(--text);
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 22px;
}

.project-summary {
  padding: 18px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(245, 158, 11, 0.12));
}

.tiny-chart {
  height: 120px;
  display: flex;
  align-items: end;
  gap: 10px;
}

.tiny-chart span {
  flex: 1;
  border-radius: 18px 18px 6px 6px;
  background: linear-gradient(180deg, #8db9ff 0%, #2563eb 72%, #163d9a 100%);
}

.login-shell {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
}

.login-card {
  width: min(1100px, 100%);
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.8fr);
  gap: 24px;
}

.login-showcase {
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.32), transparent 34%),
    linear-gradient(135deg, #2555e6 0%, #4f8dff 50%, #f59e0b 100%);
  color: white;
}

.login-showcase p {
  color: rgba(255, 255, 255, 0.84);
}

.login-panel {
  padding: 12px;
}

.login-panel form {
  display: grid;
  gap: 14px;
}

.info-box {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  margin-top: 18px;
}

.empty-note {
  padding: 16px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.06);
  color: var(--primary-deep);
}

.danger-note {
  background: rgba(217, 68, 68, 0.1);
  color: var(--danger);
}

.footer-note {
  text-align: center;
  color: var(--muted);
  margin-top: 16px;
  font-size: 13px;
}

@media (max-width: 920px) {
  .topbar-wrap {
    top: 10px;
    padding: 10px 12px 0;
  }

  .topbar {
    padding: 14px;
    border-radius: 22px;
    gap: 14px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 13px;
    line-height: 1.5;
  }

  .layout {
    padding: 18px 12px 44px;
    gap: 16px;
  }

  .sidebar-panel {
    padding: 12px 14px;
    border-radius: 22px;
  }

  .hero {
    padding: 20px;
    border-radius: 24px;
    gap: 16px;
    margin-bottom: 14px;
  }

  .hero h1,
  .login-card h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .hero-copy {
    margin: 12px 0 18px;
    font-size: 14px;
    line-height: 1.6;
  }

  .hero-actions > * {
    flex: 0 1 auto;
  }

  .metric-card strong {
    font-size: 28px;
  }

  .card,
  .table-card,
  .login-card {
    border-radius: 24px;
  }

  .card,
  .table-card {
    padding: 16px;
  }

  .card-head,
  .table-head,
  .detail-head {
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 14px;
  }

  .card-title {
    font-size: 21px;
  }

  .ring {
    width: 150px;
  }

  .ring::after {
    inset: 16px;
    font-size: 22px;
  }

  .bar-row,
  .region-row {
    grid-template-columns: 84px minmax(0, 1fr) 38px;
    gap: 10px;
  }

  .table-card {
    overflow: hidden;
  }

  .table {
    min-width: 760px;
  }

  .table-card .table {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    padding-bottom: 8px;
    mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
  }

  .detail-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 2px 12px 6px 2px;
    margin-right: -12px;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 12px;
  }

  .detail-tabs::-webkit-scrollbar {
    display: none;
  }

  .detail-tabs::after {
    content: "";
    flex: 0 0 2px;
  }

  .detail-tabs button {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 13px;
  }

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

  .legend-item {
    align-items: flex-start;
  }

  .timeline-item,
  .list-item,
  .data-item {
    border-radius: 18px;
  }

  .login-shell {
    padding: 16px 12px;
  }

  .login-card {
    padding: 16px;
    gap: 16px;
  }

  .login-showcase,
  .login-panel {
    padding: 18px;
  }

  .login-showcase .grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 1180px) {
  .layout,
  .hero,
  .two-col,
  .login-card {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .sidebar-panel {
    padding: 12px 14px;
    border-radius: 22px;
  }

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

  .sidebar-summary .eyebrow {
    margin-bottom: 0;
    flex: 0 0 auto;
  }

  .sidebar-heading .brand-title {
    font-size: 18px;
  }

  .sidebar-intro {
    margin-top: 4px;
    font-size: 13px;
  }

  .sidebar-menu {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar-menu::-webkit-scrollbar {
    display: none;
  }

  .sidebar-menu button {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    padding: 10px 14px;
    border-radius: 999px;
    gap: 8px;
  }

  .menu-count {
    min-width: 24px;
    padding: 2px 7px;
  }

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

@media (max-width: 760px) {
  .shell::before {
    width: 240px;
    height: 240px;
    top: 120px;
    right: -100px;
  }

  .shell::after {
    width: 180px;
    height: 180px;
    bottom: 80px;
    left: -80px;
  }

  .topbar-wrap {
    position: sticky;
    top: 0;
    padding: 8px 10px 0;
  }

  .topbar {
    padding: 10px 12px;
    border-radius: 18px;
    gap: 8px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
  }

  .role-switch {
    min-width: 0;
    flex: 1 1 180px;
  }

  .segmented {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .segmented button,
  .ghost-btn,
  .primary-btn,
  .soft-btn,
  .danger-btn {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
  }

  .segmented button {
    flex: 1 1 0;
    text-align: center;
  }

  .topbar-shortcuts {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
  }

  .stats-grid,
  .grid-3,
  .grid-2,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .layout,
  .topbar-wrap,
  .login-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero,
  .card,
  .table-card,
  .sidebar-panel,
  .login-card {
    padding: 14px;
    border-radius: 20px;
  }

  .brand {
    gap: 12px;
    align-items: flex-start;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  .brand-subtitle,
  .metric-label,
  .card-desc,
  .timeline-meta,
  .list-meta,
  .meta-row,
  .field label {
    font-size: 12px;
  }

  .hero h1,
  .login-card h1 {
    font-size: clamp(22px, 8vw, 30px);
  }

  .hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .hero-actions > * {
    width: auto;
    flex: 0 1 auto;
  }

  .hero-copy {
    margin: 10px 0 14px;
  }

  .hero-side {
    display: none;
  }

  .filters {
    flex-direction: column;
    gap: 10px;
  }

  .feedback-link-box {
    grid-template-columns: 1fr;
  }

  .media-upload-grid,
  .bid-form-grid,
  .media-item {
    grid-template-columns: 1fr;
  }

  .filters .field {
    flex: 1 1 auto;
  }

  .metric-card,
  .timeline-item,
  .list-item,
  .data-item,
  .project-summary,
  .info-box {
    padding: 13px;
    border-radius: 16px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .card-title {
    font-size: 19px;
  }

  .table-card {
    padding-right: 10px;
    padding-left: 10px;
  }

  .table {
    min-width: 0;
  }

  .table th,
  .table td {
    padding: 13px 12px;
  }

  .table,
  .table thead,
  .table tbody,
  .table tr,
  .table th,
  .table td {
    display: block;
    width: 100%;
  }

  .table-card .table {
    overflow: visible;
    white-space: normal;
    padding-bottom: 0;
    min-width: 0;
    mask-image: none;
  }

  .table thead {
    display: none;
  }

  .table tbody {
    display: grid;
    gap: 12px;
  }

  .table tr {
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 24px rgba(41, 72, 138, 0.08);
  }

  .table td {
    border-bottom: 0;
    padding: 6px 0;
    white-space: normal;
  }

  .table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
  }

  .table td:last-child {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
  }

  .table td:last-child::before {
    width: 100%;
    margin-bottom: 8px;
  }

  .table td .ghost-btn,
  .table td .soft-btn,
  .table td .primary-btn,
  .table td .danger-btn {
    width: auto;
  }

  .table td .ghost-btn + .ghost-btn,
  .table td .soft-btn + .ghost-btn,
  .table td .soft-btn + .soft-btn,
  .table td .primary-btn + .ghost-btn,
  .table td .ghost-btn + .soft-btn {
    margin-top: 0;
  }

  .topbar-wrap,
  .layout {
    padding-left: 10px;
    padding-right: 10px;
  }

  .sidebar {
    margin-top: -2px;
  }

  .sidebar-panel {
    padding: 10px 0 6px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .sidebar-summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0 4px;
  }

  .sidebar-summary .eyebrow {
    padding: 6px 10px;
    font-size: 11px;
    margin-bottom: 0;
  }

  .sidebar-heading .brand-title {
    font-size: 15px;
  }

  .sidebar-intro {
    display: none;
  }

  .sidebar-menu {
    margin-top: 8px;
    padding: 0 4px 4px;
  }

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

  .legend-item strong {
    margin-left: 20px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .login-showcase {
    display: none;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .footer-note {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .topbar {
    align-items: stretch;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .topbar-shortcuts {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-shortcuts .ghost-btn,
  .topbar-shortcuts .primary-btn {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
  }

  .sidebar-menu button,
  .detail-tabs button,
  .ghost-btn,
  .primary-btn,
  .soft-btn,
  .danger-btn,
  .status-pill,
  .view-chip,
  .stat-badge {
    font-size: 12px;
  }

  .card-title {
    font-size: 18px;
  }

  .detail-tabs {
    margin-right: -10px;
    padding-right: 10px;
  }

  .hero,
  .card,
  .table-card,
  .login-card {
    padding: 12px;
  }
}
