:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #1f2933;
  --muted: #697586;
  --line: #d9dee7;
  --green: #426b4b;
  --gold: #b47719;
  --red: #b7362d;
  --blue: #315f7d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #26352b;
}

.login-shell {
  width: min(100%, 440px);
  padding: 0;
}

.login-panel {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  padding: 28px;
}

.login-panel .eyebrow {
  color: var(--gold);
}

.login-panel h1 {
  margin-bottom: 24px;
}

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

.login-form label {
  font-weight: 800;
}

.login-form input[type="password"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 12px;
}

.login-error {
  margin: 0;
  color: var(--red);
  font-weight: 700;
}

.auth-logout {
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  color: #fff;
  font-weight: 800;
  padding: 9px 12px;
  text-decoration: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 28px;
  background: #26352b;
  color: white;
}

.eyebrow {
  margin: 0 0 5px;
  color: #d8c39e;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
}

h2 {
  margin-bottom: 5px;
  font-size: 18px;
}

main {
  padding: 24px 28px 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--green);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb span::before {
  content: "/";
  margin-right: 9px;
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  gap: 16px;
}

.admin-overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.admin-overview p {
  margin-bottom: 0;
  color: var(--muted);
}

.admin-overview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.text-link {
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.admin-metrics {
  margin-bottom: 16px;
}

.hub-metric-section {
  margin-bottom: 16px;
}

.hub-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.hub-section-header h2,
.hub-section-header p {
  margin: 0;
}

.hub-section-header p {
  margin-top: 4px;
  color: var(--muted);
}

.hub-section-header > strong {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 16px;
  margin-bottom: 22px;
}

.report-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.report-snapshot-card .panel-header {
  margin-bottom: 14px;
}

.report-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-metric-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfb;
}

.report-metric-grid span,
.report-metric-grid strong {
  display: block;
}

.report-metric-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-metric-grid strong {
  margin-top: 6px;
  font-size: 20px;
}

.report-meta-list {
  display: grid;
  gap: 10px;
}

.report-meta-list div,
.backup-actions {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fbfcfb;
}

.report-meta-list span,
.report-meta-list strong {
  display: block;
}

.report-meta-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.report-meta-list strong {
  margin-top: 5px;
}

.fab-detail-heading,
.fab-detail-row {
  grid-template-columns: minmax(220px, 1fr) 100px 120px 120px;
}

.fab-upload-heading,
.fab-upload-row {
  grid-template-columns: minmax(220px, 1fr) 92px 110px 110px 110px;
}

.date-field {
  display: grid;
  gap: 5px;
  min-width: 190px;
}

.date-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.backup-panel {
  margin-bottom: 22px;
}

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

.import-button {
  position: relative;
  cursor: pointer;
}

.import-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.admin-urgent-list {
  display: grid;
  gap: 9px;
}

.urgent-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  padding: 11px 12px;
  text-decoration: none;
}

.urgent-row:hover {
  border-color: var(--green);
  background: #f8fafb;
}

.urgent-row strong,
.urgent-row span {
  display: block;
}

.urgent-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.urgent-row em {
  flex: 0 0 auto;
  color: var(--red);
  font-style: normal;
  font-weight: 800;
}

.analytics-list {
  display: grid;
  gap: 9px;
}

.analytics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  background: #fbfcfb;
}

.analytics-row strong,
.analytics-row span {
  display: block;
}

.analytics-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.analytics-row em {
  flex: 0 0 auto;
  color: var(--red);
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.wide-analytics-list .analytics-row em {
  min-width: 130px;
}

.data-health-panel {
  margin-bottom: 16px;
}

.data-health-list {
  display: grid;
  gap: 9px;
}

.data-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.data-health-row.behind {
  border-left-color: var(--red);
}

.data-health-row strong,
.data-health-row span {
  display: block;
}

.data-health-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.data-health-identifier {
  color: var(--ink);
  font-weight: 800;
}

.data-health-row em {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e4eee6;
  color: var(--green);
  font-style: normal;
  font-weight: 800;
  padding: 7px 10px;
}

.data-health-row.behind em {
  background: #ffe8e5;
  color: var(--red);
}

.roadmap-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.roadmap-list li strong,
.roadmap-list li span {
  display: block;
}

.roadmap-list li span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.section-title {
  margin: 0 0 12px;
}

.admin-tile {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 15px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 18px;
  text-decoration: none;
}

.admin-tile:hover {
  border-color: var(--green);
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.08);
}

.admin-tile.disabled {
  cursor: default;
  opacity: 0.72;
}

.admin-tile.disabled:hover {
  border-color: var(--line);
  box-shadow: none;
}

.admin-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: #e4eee6;
  color: var(--green);
  font-weight: 800;
}

.admin-tile h2 {
  margin-bottom: 4px;
}

.admin-tile p {
  margin-bottom: 0;
  color: var(--muted);
}

.submission-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 420px));
  gap: 16px;
  margin-bottom: 16px;
}

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

.submission-group h3 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 16px;
}

.submission-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  margin-bottom: 8px;
  padding: 11px 12px;
  text-decoration: none;
}

.submission-row:hover {
  border-color: var(--green);
  background: #f8fafb;
}

.submission-row strong,
.submission-row span {
  display: block;
}

.submission-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.submission-row em {
  color: var(--red);
  font-style: normal;
  font-weight: 800;
}

.allocation-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  margin-bottom: 16px;
  padding: 18px;
}

.workflow-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.workflow-bar div {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 9px;
  font-size: 13px;
  font-weight: 700;
}

.workflow-bar span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef1f4;
  color: var(--muted);
  font-size: 12px;
}

.workflow-bar .done {
  color: var(--green);
}

.workflow-bar .done span {
  background: #e4eee6;
  color: var(--green);
}

.workflow-bar .active {
  border-color: var(--gold);
  color: var(--ink);
}

.workflow-bar .active span {
  background: #fff0cc;
  color: #805400;
}

.allocation-hero p {
  margin-bottom: 0;
  color: var(--muted);
}

.allocation-target {
  display: grid;
  gap: 5px;
  min-width: 160px;
  text-align: right;
}

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

.allocation-target strong {
  color: var(--green);
  font-size: 22px;
}

.submit-button {
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  padding: 9px 12px;
  cursor: pointer;
}

.submit-button:disabled {
  border-color: var(--line);
  background: #d6dbe3;
  color: #697586;
  cursor: not-allowed;
}

.record-actions {
  display: grid;
  gap: 8px;
}

.secondary-action {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 9px 12px;
  cursor: pointer;
}

.allocation-metrics {
  margin-bottom: 16px;
}

.fab-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.batch-grid div,
.batch-grid label {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.batch-grid span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.batch-grid strong {
  font-size: 17px;
}

.batch-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 8px;
}

.source-doc-panel {
  margin-bottom: 16px;
}

.upload-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 14px;
  padding: 10px;
}

.secondary-upload {
  min-width: 178px;
}

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

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

.source-doc-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.source-doc-card h3 {
  margin: 4px 0;
  font-size: 17px;
}

.source-doc-card p {
  margin-bottom: 12px;
  color: var(--muted);
}

.doc-type {
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.doc-stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  padding: 9px 0;
}

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

.source-doc-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-doc-card li {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 8px;
  font-size: 12px;
}

.source-doc-card li span,
.muted-row {
  color: var(--muted);
}

.allocation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
}

.allocation-table-panel {
  padding-right: 0;
}

.allocation-table-wrap {
  max-height: 640px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px 0 0 6px;
}

.allocation-filters {
  margin: 0 18px 14px 0;
}

.allocation-table {
  width: 100%;
  min-width: 1420px;
  border-collapse: collapse;
  font-size: 13px;
}

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

.allocation-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef1f4;
  color: #354052;
  font-size: 11px;
  text-transform: uppercase;
}

.allocation-table td:nth-child(4) {
  min-width: 300px;
}

.allocation-table .no-production {
  color: var(--muted);
  background: #fafafa;
}

.cost-input {
  width: 92px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 7px;
}

.row-status {
  display: inline-block;
  min-width: 92px;
  border-radius: 999px;
  background: #eef1f4;
  color: #354052;
  padding: 4px 7px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.positive-impact {
  color: var(--green);
  font-weight: 800;
}

.negative-impact {
  color: var(--red);
  font-weight: 800;
}

.balance-badge {
  border-radius: 8px;
  margin: 8px 0 14px;
  padding: 13px;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
}

.balance-badge.balanced {
  background: #e4eee6;
  color: var(--green);
}

.balance-badge.unbalanced {
  background: #ffe8e5;
  color: var(--red);
}

.good-balance {
  color: var(--green);
}

.bad-balance {
  color: var(--red);
}

.cloud-sync-notice {
  border: 1px solid #e2c46f;
  border-radius: 8px;
  background: #fff8df;
  color: #6f5100;
  padding: 10px 12px;
  font-weight: 800;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.score-good {
  background: #eaf4ee;
  color: var(--green);
}

.score-watch {
  background: #fff5d8;
  color: #8a6500;
}

.score-bad {
  background: #fff0ed;
  color: var(--red);
}

.allocation-side {
  align-self: start;
}

.recon-list,
.group-summary {
  display: grid;
  gap: 9px;
}

.recon-list div,
.group-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 9px;
}

.recon-list span,
.group-row span,
.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.side-heading {
  margin-top: 20px;
}

.recorded-list {
  display: grid;
  gap: 8px;
}

.record-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
}

.record-row strong,
.record-row span {
  display: block;
}

.record-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.small-restore {
  margin-top: 8px;
  padding: 6px 8px;
}

.io-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-bottom: 16px;
}

.io-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.io-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.io-report-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: start;
}

.io-summary-list {
  display: grid;
  gap: 9px;
}

.io-summary-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 110px 130px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
}

.io-summary-row span,
.io-upload-row em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.io-upload-heading,
.io-upload-row {
  grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) 86px 84px 84px 72px 90px;
}

.io-upload-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 10px;
  margin-top: 8px;
  background: #fff;
}

.io-upload-heading {
  padding: 0 10px 3px;
}

.link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.io-family-cards {
  display: grid;
  gap: 9px;
  margin-top: 12px;
}

.io-family-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
}

.io-family-card.active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(45, 110, 76, 0.1);
}

.io-family-card strong,
.io-family-card span,
.io-family-card em {
  display: block;
}

.io-family-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.io-family-card em {
  margin-top: 7px;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.selected-family-detail {
  display: grid;
  gap: 12px;
}

.selected-family-status {
  border-radius: 8px;
  padding: 11px;
  text-align: center;
  font-weight: 900;
}

.selected-family-status.balanced {
  background: #eaf4ee;
  color: var(--green);
}

.selected-family-status.unbalanced {
  background: #fff0ed;
  color: var(--red);
}

.io-input-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.io-input-summary h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.io-input-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.io-input-summary div:first-of-type {
  border-top: 0;
}

.io-input-summary span {
  color: var(--muted);
}

.simple-steps {
  display: grid;
  gap: 10px;
}

.simple-steps div {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.simple-steps span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e4eee6;
  color: var(--green);
  font-weight: 800;
}

.io-input-card {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.io-input-card strong,
.io-input-card span {
  display: block;
}

.io-input-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.io-groups {
  display: grid;
  gap: 12px;
}

.io-group-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
}

.io-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.io-group-header h3 {
  margin: 0 0 4px;
}

.io-group-header span {
  color: var(--muted);
  font-size: 13px;
}

.io-output-table {
  display: grid;
  gap: 8px;
}

.io-output-heading,
.io-output-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 74px 92px 82px 100px 92px 110px;
  gap: 8px;
  align-items: center;
}

.io-output-heading {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.io-output-row input {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 7px;
}

.io-output-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.delete-draft-button {
  border: 1px solid var(--red);
  border-radius: 6px;
  background: #fff;
  color: var(--red);
  margin-top: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.date-control {
  display: grid;
  gap: 6px;
  min-width: 170px;
}

.date-control label {
  color: #d8c39e;
  font-size: 12px;
  text-transform: uppercase;
}

input,
button {
  font: inherit;
}

input[type="date"],
input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
}

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

.metric {
  border: 1px solid var(--line);
  border-left: 5px solid var(--blue);
  border-radius: 8px;
  background: var(--surface);
  padding: 17px 18px;
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 30px;
}

.metric.urgent {
  border-left-color: var(--red);
}

.metric.warning {
  border-left-color: var(--gold);
}

.toolbar,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 18px;
}

.toolbar p,
.panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  border-radius: 6px;
  background: var(--green);
  color: white;
  padding: 10px 14px;
  cursor: pointer;
}

.upload-button input {
  display: none;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.location-filters {
  margin-top: -6px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 7px 13px;
  cursor: pointer;
}

.filter.active {
  border-color: var(--green);
  background: #e4eee6;
  color: #233f29;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

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

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

.panel-header input {
  width: 230px;
}

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

.freeze-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 136px;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.freeze-card.frozen,
.freeze-card.sold {
  opacity: 0.6;
}

.card-primary {
  min-width: 0;
}

.product-title {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 8px;
  text-align: center;
  font-size: 12px;
}

.location-text {
  margin-bottom: 12px;
  color: #354052;
  font-size: 14px;
  font-weight: 700;
}

.status-overdue {
  background: #ffe8e5;
  color: var(--red);
}

.status-today {
  background: #fff0cc;
  color: #805400;
}

.status-soon {
  background: #fff6df;
  color: var(--gold);
}

.status-safe {
  background: #e4eee6;
  color: var(--green);
}

.status-sold,
.status-frozen {
  background: #e8edf7;
  color: var(--blue);
}

.detail-stack {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

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

.detail-line span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.note-detail strong {
  white-space: pre-wrap;
}

.note-editor {
  display: grid;
  gap: 7px;
  border-top: 1px solid var(--line);
  margin-top: 3px;
  padding-top: 10px;
}

.note-editor label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.note-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 9px;
  resize: vertical;
}

.note-confirm-button,
.note-edit-button {
  width: max-content;
  max-width: 100%;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 7px 10px;
}

.note-edit-button {
  background: #fff;
  color: var(--blue);
}

.item-details {
  margin-top: 8px;
}

.item-details summary {
  width: max-content;
  max-width: 100%;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.countdown-badge {
  --badge-main: #08bf67;
  --badge-soft: #7ed957;
  position: relative;
  display: grid;
  justify-items: center;
  justify-self: center;
  width: 168px;
  min-width: 168px;
}

.countdown-badge .status-pill {
  margin-bottom: 6px;
  min-width: 86px;
}

.countdown-circle {
  position: relative;
  width: 150px;
  height: 150px;
}

.countdown-badge.yellow {
  --badge-main: #d69a1f;
  --badge-soft: #f2c94c;
}

.countdown-badge.red {
  --badge-main: #c64235;
  --badge-soft: #ef776f;
}

.countdown-badge.safe {
  --badge-main: #08bf67;
  --badge-soft: #7ed957;
}

.countdown-svg {
  display: block;
  width: 150px;
  height: 150px;
  overflow: visible;
}

.countdown-track,
.countdown-progress {
  fill: none;
  stroke-width: 24;
}

.countdown-track {
  stroke: var(--badge-soft);
}

.countdown-progress {
  stroke: var(--badge-main);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 80px 80px;
  transition: stroke-dasharray 420ms ease, stroke 240ms ease;
}

.countdown-core {
  fill: var(--badge-main);
}

.countdown-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 128px;
  transform: translate(-50%, -50%);
  color: #050505;
  text-align: center;
  pointer-events: none;
}

.countdown-copy strong {
  display: block;
  font-size: 40px;
  line-height: 1;
  text-align: center;
}

.countdown-copy span {
  display: none;
  margin-top: 0;
  font-size: 0;
  font-weight: 800;
}

.countdown-rule {
  display: block;
  margin-top: 4px;
  color: #050505;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.card-actions {
  display: grid;
  gap: 9px;
  justify-items: stretch;
}

.freeze-button,
.sold-button,
.restore-button {
  border: 1px solid var(--green);
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  padding: 10px;
  cursor: pointer;
}

.sold-button {
  background: var(--blue);
  border-color: var(--blue);
}

.restore-button {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.empty {
  color: var(--muted);
  text-align: center;
}

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

.action-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 7px;
  padding: 11px;
}

.action-card strong {
  display: block;
  margin-bottom: 5px;
}

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

@media (max-width: 980px) {
  .dashboard-grid,
  .content-grid,
  .admin-split,
  .report-snapshot-grid,
  .allocation-grid,
  .io-layout,
  .io-workspace,
  .io-report-grid,
  .fab-top-grid,
  .source-doc-grid,
  .workflow-bar {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .panel-header,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-header input {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .freeze-card {
    grid-template-columns: 1fr;
  }

  .card-actions {
    max-width: 240px;
  }
}
