.spo-portal {
  --spo-red: #e32219;
  --spo-red-hot: #ff2a20;
  --spo-black: #0a0c0d;
  --spo-charcoal: #111315;
  --spo-charcoal-2: #1b1e21;
  --spo-line: #343a3f;
  --spo-paper: #f5f4f1;
  --spo-muted: #697077;
  background: var(--spo-paper);
  color: #171a1c;
}

.spo-portal * { box-sizing: border-box; }

.spo-portal-hero {
  min-height: 410px;
  display: grid;
  place-items: center;
  padding: 90px clamp(24px, 6vw, 96px);
  color: #fff;
  background:
    linear-gradient(105deg, rgba(5, 7, 8, .98), rgba(17, 19, 21, .87)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 24px);
}

.spo-portal-hero > div { width: min(100%, 1460px); }
.spo-eyebrow,
.spo-kicker {
  margin: 0 0 18px;
  color: var(--spo-red);
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .16em;
}
.spo-portal-hero h1 {
  max-width: 1000px;
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(52px, 6.4vw, 92px);
  font-weight: 800;
  line-height: .96;
  letter-spacing: -.03em;
}
.spo-portal-hero p:last-child {
  max-width: 780px;
  margin: 28px 0 0;
  color: #c5c9cc;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.5;
}

.spo-portal-shell {
  width: min(calc(100% - 40px), 1460px);
  margin: 0 auto;
  padding: 72px 0 96px;
}
.spo-message-shell { padding-top: 32px; padding-bottom: 0; }
.spo-auth-grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 28px;
}

.spo-panel {
  padding: clamp(28px, 4vw, 54px);
  background: #fff;
  border: 1px solid #dededa;
  box-shadow: 0 22px 70px rgba(17, 19, 21, .08);
}
.spo-panel h2,
.spo-dashboard-head h2 {
  margin: 0 0 14px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1;
}
.spo-panel h3 {
  margin: 0 0 10px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 28px;
  line-height: 1.05;
}
.spo-panel > p,
.spo-login-panel > p { color: var(--spo-muted); line-height: 1.65; }

.spo-alert {
  padding: 18px 20px;
  color: #262a2d;
  background: #fff4cf;
  border-left: 5px solid #d89a00;
  line-height: 1.55;
}
.spo-alert-success { background: #e9f8ed; border-left-color: #1d8c3a; }
.spo-alert-error { background: #fff0ef; border-left-color: var(--spo-red); }
.spo-alert a { color: var(--spo-red); font-weight: 700; }
.spo-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.spo-form { margin-top: 28px; }
.spo-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.spo-form label,
.spo-inline-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #2d3236;
  font-size: 14px;
  font-weight: 700;
}
.spo-form input,
.spo-form select,
.spo-form textarea,
.spo-inline-form input,
.spo-inline-form select,
.spo-inline-form textarea,
.spo-login-panel input[type="text"],
.spo-login-panel input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: #111315;
  background: #fff;
  border: 1px solid #b9bec2;
  border-radius: 0;
}
.spo-form textarea,
.spo-inline-form textarea { min-height: 92px; resize: vertical; }
.spo-form input:focus,
.spo-form select:focus,
.spo-form textarea:focus,
.spo-inline-form input:focus,
.spo-inline-form select:focus,
.spo-inline-form textarea:focus,
.spo-login-panel input:focus {
  border-color: var(--spo-red);
  outline: 2px solid rgba(227, 34, 25, .17);
}
.spo-form small,
.spo-table small { display: block; color: var(--spo-muted); font-weight: 400; }
.spo-span-2 { grid-column: 1 / -1; }
.spo-check {
  display: flex !important;
  align-items: flex-start;
  flex-direction: row !important;
  gap: 10px !important;
  margin: 20px 0;
  line-height: 1.45;
}
.spo-check input { width: 18px; min-height: 18px; margin-top: 2px; }

.spo-button,
.spo-login-panel input[type="submit"] {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  padding: 0 25px;
  color: #fff;
  background: var(--spo-charcoal);
  border: 2px solid var(--spo-charcoal);
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.spo-button:hover,
.spo-login-panel input[type="submit"]:hover { color: #fff; background: var(--spo-red); border-color: var(--spo-red); transform: translateY(-1px); }
.spo-button-primary { background: var(--spo-red); border-color: var(--spo-red); }
.spo-button-primary:hover { background: var(--spo-red-hot); border-color: var(--spo-red-hot); }
.spo-button-outline { margin: 0; color: #171a1c; background: transparent; border-color: #7c8388; }
.spo-button-outline:hover { color: #fff; }
.spo-button-small { min-height: 42px; margin: 0; padding: 0 18px; }
.spo-auth-link { margin-top: 20px; }
.spo-auth-link a,
.spo-text-link { color: var(--spo-red); font-weight: 800; }
.spo-login-panel .login-username,
.spo-login-panel .login-password { margin: 18px 0; }
.spo-login-panel .login-remember label { display: flex; align-items: center; gap: 8px; }
.spo-login-panel #loginform label { color: #2d3236; font-size: 14px; font-weight: 700; }

.spo-dashboard-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}
.spo-dashboard-head h2 { font-size: clamp(42px, 5vw, 68px); }
.spo-dashboard-head p { margin: 8px 0 0; color: var(--spo-muted); }
.spo-head-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.spo-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
  margin-bottom: 26px;
  background: var(--spo-red);
}
.spo-metrics div {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
  color: #fff;
  background: var(--spo-charcoal);
}
.spo-metrics strong {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 56px;
  line-height: 1;
}
.spo-metrics span { margin-top: 9px; color: #c5c9cc; text-transform: uppercase; font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.spo-dashboard-nav {
  position: sticky;
  top: 112px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 26px;
  padding: 10px;
  background: rgba(17, 19, 21, .97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}
.spo-dashboard-nav a { padding: 11px 15px; color: #fff; font-size: 13px; font-weight: 800; }
.spo-dashboard-nav a:hover { background: var(--spo-red); color: #fff; }

.spo-dashboard-section { margin-top: 26px; scroll-margin-top: 190px; }
.spo-section-title {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
  align-items: end;
  gap: 30px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid #dededa;
}
.spo-section-title h2 { margin-bottom: 0; }
.spo-section-title > p { margin: 0; color: var(--spo-muted); line-height: 1.55; }
.spo-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.spo-data-card { padding: 24px; background: var(--spo-paper); border-top: 4px solid var(--spo-red); }
.spo-data-card p { min-height: 48px; color: var(--spo-muted); line-height: 1.5; }
.spo-data-card ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; padding: 0; list-style: none; }
.spo-data-card li { padding: 7px 9px; background: #fff; border: 1px solid #d9d9d4; font-size: 12px; font-weight: 700; }
.spo-add-box { margin-top: 26px; padding: 0; background: #f8f8f6; border: 1px solid #d9d9d4; }
.spo-add-box summary { padding: 19px 22px; color: #171a1c; font-weight: 800; cursor: pointer; }
.spo-add-box[open] summary { color: #fff; background: var(--spo-charcoal); }
.spo-add-box .spo-form { margin: 0; padding: 24px; }
.spo-empty,
.spo-note { padding: 18px 20px; color: var(--spo-muted); background: #f8f8f6; border-left: 4px solid #adb2b5; }

.spo-table-wrap { overflow-x: auto; }
.spo-table { width: 100%; border-collapse: collapse; }
.spo-table th { padding: 12px 14px; color: #fff; background: var(--spo-charcoal); text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.spo-table td { padding: 16px 14px; border-bottom: 1px solid #dededa; vertical-align: top; }
.spo-table td:last-child { width: 70px; text-align: right; }
.spo-due,
.spo-status { display: inline-block; padding: 7px 9px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.spo-due-ok { color: #14682b; background: #e9f8ed; }
.spo-due-soon { color: #8f5a00; background: #fff3d4; }
.spo-due-overdue { color: #a3150e; background: #fff0ef; }
.spo-due-none { color: #62686d; background: #eceeed; }

.spo-document-list { display: grid; gap: 10px; }
.spo-document-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #f8f8f6;
  border-left: 4px solid var(--spo-red);
}
.spo-document-list article > div:last-child { display: flex; align-items: center; gap: 14px; }
.spo-document-list span { display: block; margin-top: 5px; color: var(--spo-muted); font-size: 13px; }
.spo-delete-form { display: inline; margin: 0; }
.spo-text-danger { padding: 0; color: #a3150e; background: transparent; border: 0; text-decoration: underline; cursor: pointer; font-size: 12px; font-weight: 700; }

.spo-defect-list { display: grid; gap: 14px; }
.spo-defect-list article {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .55fr) auto;
  gap: 24px;
  align-items: start;
  padding: 24px;
  background: #f8f8f6;
  border: 1px solid #dededa;
}
.spo-defect-main p { color: #4e5458; line-height: 1.55; }
.spo-defect-main small { color: var(--spo-muted); }
.spo-status { margin-bottom: 12px; }
.spo-status-open { color: #a3150e; background: #fff0ef; }
.spo-status-in_progress { color: #8f5a00; background: #fff3d4; }
.spo-status-resolved { color: #14682b; background: #e9f8ed; }
.spo-inline-form { display: grid; gap: 12px; }

@media (max-width: 1050px) {
  .spo-auth-grid,
  .spo-section-title { grid-template-columns: 1fr; }
  .spo-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spo-defect-list article { grid-template-columns: 1fr 1fr; }
  .spo-defect-list article > .spo-delete-form { grid-column: 1 / -1; }
}

@media (max-width: 780px) {
  .spo-portal-hero { min-height: 350px; padding-top: 70px; padding-bottom: 70px; }
  .spo-portal-shell { width: min(calc(100% - 30px), 1460px); padding-top: 44px; padding-bottom: 70px; }
  .spo-auth-grid,
  .spo-form-grid,
  .spo-card-grid,
  .spo-metrics,
  .spo-defect-list article { grid-template-columns: 1fr; }
  .spo-span-2 { grid-column: auto; }
  .spo-dashboard-head { align-items: flex-start; flex-direction: column; }
  .spo-head-actions { width: 100%; }
  .spo-head-actions .spo-button { flex: 1; }
  .spo-dashboard-nav { position: static; }
  .spo-document-list article { align-items: flex-start; flex-direction: column; }
  .spo-table { min-width: 720px; }
}

@media (max-width: 480px) {
  .spo-panel { padding: 24px 20px; }
  .spo-portal-hero h1 { font-size: 48px; }
  .spo-button { width: 100%; }
  .spo-document-list article > div:last-child { width: 100%; justify-content: space-between; }
}



/* Compact object overview and selected object card. */
.spo-object-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}
.spo-object-toolbar label {
  width: min(100%, 520px);
  display: grid;
  gap: 8px;
  color: #2d3236;
  font-size: 13px;
  font-weight: 800;
}
.spo-object-toolbar input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  color: #171a1c;
  background: #fff;
  border: 1px solid #b9bec2;
  border-radius: 0;
}
.spo-object-toolbar input:focus { border-color: var(--spo-red); outline: 2px solid rgba(227, 34, 25, .17); }
.spo-object-toolbar > strong { padding-bottom: 13px; color: var(--spo-muted); font-size: 13px; }

.spo-object-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.spo-object-card {
  min-height: 215px;
  display: flex;
  flex-direction: column;
  padding: 20px;
  color: #171a1c;
  background: var(--spo-paper);
  border: 1px solid #dededa;
  border-top: 4px solid var(--spo-red);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.spo-object-card:hover,
.spo-object-card:focus-visible,
.spo-object-card.is-active {
  color: #171a1c;
  border-color: var(--spo-red);
  box-shadow: 0 16px 32px rgba(17, 19, 21, .12);
  transform: translateY(-2px);
}
.spo-object-card-label {
  color: var(--spo-red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}
.spo-object-card > strong {
  margin-top: 16px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 28px;
  line-height: 1.05;
}
.spo-object-address {
  margin-top: 8px;
  color: var(--spo-muted);
  font-size: 13px;
  line-height: 1.45;
}
.spo-object-counts {
  margin-top: 18px;
  color: #4e5458;
  font-size: 12px;
  line-height: 1.5;
}
.spo-object-open {
  margin-top: auto;
  padding-top: 20px;
  color: var(--spo-red);
  font-size: 13px;
  font-weight: 900;
}
.spo-object-prompt { text-align: center; }
.spo-object-prompt h2 { margin: 0; font-family: "Barlow Condensed", "Arial Narrow", sans-serif; font-size: clamp(38px, 4vw, 56px); }
.spo-object-prompt p:last-child { color: var(--spo-muted); }

.spo-object-detail {
  color: #fff;
  background: var(--spo-charcoal);
  border-color: var(--spo-charcoal);
  border-top: 7px solid var(--spo-red);
}
.spo-object-detail-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.spo-object-detail-head h2 {
  margin: 0;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: clamp(44px, 5vw, 68px);
  line-height: .98;
}
.spo-object-detail-head p:last-child { margin: 12px 0 0; color: #c4c8ca; }
.spo-object-detail .spo-button-outline { color: #fff; border-color: #6e7478; }
.spo-object-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 34px;
  background: var(--spo-line);
  border: 1px solid var(--spo-line);
}
.spo-object-meta > div { padding: 20px 22px; background: #181c1f; }
.spo-object-meta span,
.spo-object-metrics span { display: block; color: #aeb4b7; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.spo-object-meta strong { display: block; margin-top: 8px; font-size: 18px; }
.spo-object-note { grid-column: 1 / -1; }
.spo-object-note p { margin: 8px 0 0; color: #d7dadd; line-height: 1.6; }
.spo-object-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  background: var(--spo-red);
}
.spo-object-metrics > div { min-height: 132px; padding: 24px; background: #181c1f; }
.spo-object-metrics strong {
  display: block;
  margin-bottom: 10px;
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-size: 48px;
  line-height: 1;
}
.spo-object-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.spo-object-links a {
  padding: 12px 15px;
  color: #fff;
  background: #24292d;
  font-size: 13px;
  font-weight: 800;
}
.spo-object-links a:hover { color: #fff; background: var(--spo-red); }
.spo-object-delete { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--spo-line); }
.spo-object-delete .spo-text-danger { color: #ff8c86; }

@media (max-width: 1050px) {
  .spo-object-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spo-object-detail-head { align-items: flex-start; flex-direction: column; }
  .spo-object-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .spo-object-toolbar { align-items: stretch; flex-direction: column; }
  .spo-object-toolbar > strong { padding: 0; }
  .spo-object-grid,
  .spo-object-meta,
  .spo-object-metrics { grid-template-columns: 1fr; }
  .spo-object-note { grid-column: auto; }
  .spo-object-card { min-height: 190px; }
  .spo-object-detail-head .spo-button { width: 100%; }
}


.spo-object-detail-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.spo-object-detail-actions .spo-button { margin: 0; }
@media (max-width: 780px) {
  .spo-object-detail-actions { width: 100%; }
  .spo-object-detail-actions .spo-button { width: 100%; }
}
