:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --ink: #172033;
  --muted: #647084;
  --line: #d9e0ea;
  --navy: #0b1f3a;
  --navy-2: #12355f;
  --red: #a82432;
  --red-2: #c43a47;
  --green: #168456;
  --yellow: #b98213;
  --danger: #c33636;
  --blue: #2f6fb3;
  --shadow: 0 18px 44px rgba(18, 31, 54, 0.12);
}

body.dark {
  color-scheme: dark;
  --bg: #0e1420;
  --surface: #151d2b;
  --surface-2: #1e2939;
  --ink: #edf2f7;
  --muted: #aab5c5;
  --line: #2b384c;
  --navy: #071426;
  --navy-2: #15385f;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

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

.is-hidden {
  display: none !important;
}

.public-site {
  min-height: 100vh;
  background: #fff;
}

.public-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 25;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px clamp(18px, 4vw, 46px);
  color: #fff;
  background: rgba(7, 20, 38, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

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

.public-brand img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  object-position: center 31%;
  background: #fff;
  border-radius: 8px;
}

.public-brand strong,
.public-brand small {
  display: block;
}

.public-brand small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 800;
}

.public-login-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 9px 13px;
  color: #fff;
  background: var(--red);
}

.public-hero {
  position: relative;
  min-height: 690px;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
}

.public-hero-media,
.public-hero-overlay {
  position: absolute;
  inset: 0;
}

.public-hero-media {
  background: url("assets/hero-government-contracting.png") center/cover;
}

.public-hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 20, 38, 0.96), rgba(7, 20, 38, 0.82) 48%, rgba(7, 20, 38, 0.24)),
    linear-gradient(180deg, rgba(7, 20, 38, 0.18), rgba(7, 20, 38, 0.72));
}

.public-container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.public-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 82px;
}

.public-hero h1 {
  max-width: 820px;
  margin-bottom: 20px;
  font-size: clamp(2.6rem, 6vw, 4.8rem);
  line-height: 0.98;
}

.public-hero p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(1.04rem, 2vw, 1.22rem);
}

.public-actions,
.public-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.public-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 12px 16px;
  font-weight: 900;
}

.public-button.primary {
  color: #fff;
  background: var(--red);
}

.public-button.secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
}

.public-section {
  padding: clamp(54px, 8vw, 92px) 0;
}

.public-band {
  background: #f4f6f9;
}

.public-heading {
  max-width: 760px;
  margin-bottom: 24px;
}

.public-heading h2,
.public-split h2,
.public-cta h2 {
  color: var(--navy);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
}

.public-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.public-card-grid article {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.public-card-grid p,
.public-split p,
.public-cta p {
  color: var(--muted);
}

.public-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
  align-items: start;
}

.auth-screen,
.signup-screen,
.setup-admin-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  gap: 28px;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 56px);
  background:
    linear-gradient(135deg, rgba(11, 31, 58, 0.94), rgba(11, 31, 58, 0.78)),
    url("assets/hero-government-contracting.png") center/cover;
}

.access-denied {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 56px);
  background:
    linear-gradient(135deg, rgba(11, 31, 58, 0.94), rgba(11, 31, 58, 0.78)),
    url("assets/hero-government-contracting.png") center/cover;
}

.auth-panel,
.auth-aside {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.94);
  color: #172033;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  border-radius: 8px;
}

.auth-panel {
  max-width: 680px;
  padding: clamp(24px, 4vw, 44px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.auth-brand img,
.app-brand img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  object-position: center 31%;
  background: #fff;
  border-radius: 8px;
}

.auth-brand strong,
.auth-brand span,
.app-brand strong,
.app-brand small {
  display: block;
}

.auth-brand span,
.app-brand small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-panel h1 {
  max-width: 650px;
  margin: 0 0 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.auth-panel p {
  max-width: 560px;
  color: #4e5b6d;
  font-size: 1rem;
}

.auth-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
  margin-top: 28px;
}

.auth-form label,
.field label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.auth-form input,
.auth-form select,
.auth-form textarea,
.command-bar input,
.document-tools input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
}

.auth-form textarea {
  resize: vertical;
}

.auth-form button,
.primary-action,
.view-actions button,
.panel button,
.template-actions button,
.report-card button,
.crud-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.secondary-auth-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: #172033;
  font-weight: 800;
}

.secondary-auth-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: #172033;
  font-weight: 800;
}

button:disabled {
  cursor: progress;
  opacity: 0.62;
}

.form-status {
  min-height: 20px;
  margin: 2px 0 0;
  color: #4e5b6d;
  font-size: 0.86rem;
  font-weight: 700;
}

.form-status.error {
  color: var(--danger);
}

.users-workspace {
  display: grid;
  gap: 16px;
}

.user-create-form {
  max-width: 760px;
}

.inline-admin-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-admin-form select {
  width: min(100%, 190px);
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.auth-aside {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.auth-aside div {
  padding: 16px;
  border: 1px solid #dce3ed;
  border-radius: 8px;
  background: #f8fafc;
}

.auth-aside p,
.panel p,
.record-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 14px;
  color: #fff;
  background: var(--navy);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.app-brand small {
  color: rgba(255, 255, 255, 0.6);
}

.nav-list {
  display: grid;
  gap: 16px;
}

.nav-group {
  display: grid;
  gap: 5px;
}

.nav-group > span {
  padding: 0 10px 3px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-list button,
.nav-list a {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.74);
  background: transparent;
  font-weight: 750;
  text-align: left;
  text-decoration: none;
}

.nav-list button.active,
.nav-list button:hover,
.nav-list a.active,
.nav-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 3px 0 0 var(--red-2);
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.quiet-button {
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px clamp(14px, 2vw, 26px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.command-bar {
  flex: 1;
}

.command-bar label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 900;
}

.mobile-menu {
  display: none;
}

.mobile-menu span {
  width: 17px;
  height: 2px;
  display: block;
  background: currentColor;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.user-chip span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: var(--navy-2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
}

.new-menu {
  position: relative;
}

.new-menu summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.new-menu summary::-webkit-details-marker {
  display: none;
}

.new-menu div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  width: 190px;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.new-menu button {
  min-height: 36px;
  border: 0;
  border-radius: 7px;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.new-menu button:hover {
  background: var(--surface-2);
}

.content {
  padding: clamp(16px, 3vw, 28px);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.view-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.page-subtitle {
  max-width: 680px;
  margin: 8px 0 0;
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 6px;
  font-size: 0.96rem;
}

.view-actions,
.segmented,
.filter-pills,
.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.view-actions .upload-action {
  position: relative;
  overflow: hidden;
}

.view-actions .upload-action input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented button,
.filter-pills button {
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active,
.filter-pills button.active {
  color: #fff;
  background: var(--navy-2);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.guided-action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.guide-card {
  display: grid;
  gap: 7px;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
}

.guide-card strong {
  font-size: 0.98rem;
}

.guide-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.metric-card,
.panel,
.record-card,
.document-card,
.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric-card {
  min-height: 112px;
  padding: 16px;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.78rem;
  line-height: 1;
}

.metric-card small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

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

.panel {
  min-width: 0;
  padding: 14px;
}

.panel.wide {
  grid-column: span 2;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.progress-board,
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.kanban-col {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.kanban-col h3 {
  padding: 10px 10px 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
}

.kanban-card {
  margin: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.kanban-card strong,
.record-card strong,
.document-card strong {
  display: block;
}

.record-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag,
.status-pill,
.mini-button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.mini-button {
  border: 1px solid var(--line);
  background: var(--surface-2);
  cursor: pointer;
}

.mini-button.active {
  background: var(--navy-2);
  color: #fff;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.9em;
}

.status-pill.green,
.status-dot.green {
  background: rgba(22, 132, 86, 0.14);
  color: var(--green);
}

.status-pill.yellow,
.status-dot.yellow {
  background: rgba(185, 130, 19, 0.16);
  color: var(--yellow);
}

.status-pill.red,
.status-dot.red {
  background: rgba(195, 54, 54, 0.14);
  color: var(--danger);
}

.status-dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 999px;
  margin-right: 7px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.timeline,
.alert-list,
.compact-list,
.activity-list {
  display: grid;
  gap: 9px;
}

.list-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

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

th {
  color: var(--muted);
  background: var(--surface-2);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.calendar-day {
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.calendar-day strong {
  color: var(--muted);
  font-size: 0.78rem;
}

.capture-layout,
.proposal-workspace,
.compliance-grid,
.partner-grid,
.contract-grid,
.report-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.record-card,
.document-card,
.report-card {
  padding: 14px;
}

.record-card.wide {
  grid-column: span 2;
}

.score-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface) 55%, transparent 56%),
    conic-gradient(var(--green) var(--score), var(--surface-2) 0);
  font-weight: 900;
}

.checklist-grid {
  display: grid;
  gap: 10px;
}

.checklist-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.checklist-item input {
  width: 20px;
  height: 20px;
  margin-top: 1px;
}

.document-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 14px;
  position: sticky;
  top: 72px;
  z-index: 8;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(14px);
}

.upload-drop {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.upload-drop input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.document-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.document-card {
  min-height: 214px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: space-between;
  gap: 12px;
  overflow: hidden;
}

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

.next-steps-panel {
  position: sticky;
  top: 154px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.next-steps-panel h2 {
  margin-bottom: 4px;
}

.next-steps-panel button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
  text-align: left;
}

.file-card-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.file-card-top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card-top p {
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-icon {
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--navy-2);
  font-size: 0.72rem;
  font-weight: 900;
}

.document-actions {
  align-self: end;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.document-actions a,
.document-actions button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 800;
}

.document-actions .active {
  color: #fff;
  background: var(--navy-2);
  border-color: var(--navy-2);
}

.document-actions .subtle {
  color: var(--muted);
}

.empty-state {
  display: grid;
  gap: 8px;
  min-height: 260px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.workflow-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(120px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.workflow-strip span {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.workflow-strip span.done {
  color: var(--green);
  background: rgba(22, 132, 86, 0.1);
  border-color: rgba(22, 132, 86, 0.24);
}

.proposal-detail {
  display: grid;
  gap: 14px;
}

.proposal-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.proposal-summary > div,
.next-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface-2);
}

.proposal-summary span,
.next-action span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.proposal-summary strong {
  display: block;
  margin: 5px 0;
  font-size: 1.35rem;
}

.proposal-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.next-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.next-action span {
  flex: 1;
  min-width: 220px;
}

.slide-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  justify-content: flex-end;
  background: rgba(7, 20, 38, 0.42);
}

.slide-panel.open {
  display: flex;
}

.slide-panel-card {
  width: min(560px, 100%);
  height: 100%;
  overflow-y: auto;
  padding: 18px;
  background: var(--surface);
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.22);
}

.close-panel {
  float: right;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  clear: both;
}

.crud-form {
  clear: both;
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.crud-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.crud-form input,
.crud-form select,
.crud-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--ink);
}

.floating-action {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  width: 56px;
  height: 56px;
  display: none;
  border: 0;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow);
  font-size: 1.6rem;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .public-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid,
  .document-results,
  .guided-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .capture-layout,
  .proposal-workspace,
  .compliance-grid,
  .partner-grid,
  .contract-grid,
  .report-grid,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .public-header {
    position: sticky;
    top: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .public-nav {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .public-nav a {
    white-space: nowrap;
  }

  .public-hero {
    min-height: 620px;
  }

  .public-split,
  .public-card-grid {
    grid-template-columns: 1fr;
  }

  .auth-screen {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 35;
    width: min(320px, 88vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-menu {
    display: inline-grid;
  }

  .topbar {
    gap: 10px;
  }

  .topbar-actions .icon-button,
  .user-chip strong {
    display: none;
  }

  .view-heading,
  .document-tools {
    display: grid;
    align-items: start;
  }

  .metric-grid,
  .guided-action-grid,
  .dashboard-grid,
  .capture-layout,
  .proposal-workspace,
  .compliance-grid,
  .partner-grid,
  .contract-grid,
  .report-grid,
  .admin-grid,
  .document-grid,
  .document-results,
  .proposal-summary,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .document-tools,
  .next-steps-panel {
    position: static;
  }

  .document-card {
    min-height: 0;
  }

  .panel.wide,
  .record-card.wide {
    grid-column: auto;
  }

  .floating-action {
    display: grid;
    place-items: center;
  }
}

@media (max-width: 560px) {
  .auth-panel {
    padding: 20px;
  }

  .auth-aside {
    display: none;
  }

  .content {
    padding-bottom: 82px;
  }

  .metric-card {
    min-height: 96px;
  }

  .topbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .command-bar {
    order: 3;
    flex-basis: 100%;
  }

  .view-actions {
    width: 100%;
  }

  .view-actions button,
  .view-actions .primary-action {
    flex: 1;
    min-width: 150px;
  }

  .checklist-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .checklist-item .status-pill {
    grid-column: 2;
    width: fit-content;
  }
}
