:root {
  color-scheme: dark;
  color: #edf5ff;
  background: #061426;
  --navy-950: #040e1d;
  --navy-900: #07182b;
  --blue-700: #4a91ff;
  --blue-600: #62a1ff;
  --teal-600: #35c7c0;
  --teal-500: #40d6cd;
  --teal-100: rgba(53, 199, 192, 0.13);
  --sky-100: #0a1d34;
  --canvas: #061426;
  --surface: #0d2139;
  --surface-strong: #102944;
  --ink: #edf5ff;
  --muted: #91a6c2;
  --line: rgba(116, 153, 201, 0.22);
  --border: rgba(116, 153, 201, 0.22);
  --text: #edf5ff;
  --danger: #ff7186;
  --warning: #ffc15a;
  --success: #54d7a0;
  --shadow-sm: 0 12px 30px rgba(0, 4, 13, 0.24);
  --shadow-md: 0 24px 60px rgba(0, 4, 13, 0.42);
}

html,
body,
#app {
  background: #061426;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 76% 0%, rgba(30, 111, 218, 0.15), transparent 34rem),
    linear-gradient(145deg, #07182b 0%, #061426 52%, #040e1d 100%);
  background-attachment: fixed;
}

h1,
h2,
h3,
h4,
strong,
legend,
summary {
  color: var(--ink);
}

p,
li,
dd,
td,
.button-row > span {
  color: #b7c7db;
}

small,
.empty-state {
  color: var(--muted);
}

a {
  color: #70aaff;
}

::selection {
  color: white;
  background: rgba(74, 145, 255, 0.4);
}

:focus-visible {
  outline-color: rgba(74, 145, 255, 0.64);
}

.page-wrap,
.page,
.center-screen {
  background: transparent;
}

.app-shell:not(.dashboard-shell) .sidebar {
  border-right: 1px solid rgba(116, 153, 201, 0.18);
  background:
    radial-gradient(circle at 18% 5%, rgba(38, 111, 203, 0.18), transparent 14rem),
    linear-gradient(180deg, #061426 0%, #04101f 72%, #030c18 100%);
  box-shadow: 16px 0 42px rgba(0, 4, 12, 0.25);
}

.app-shell:not(.dashboard-shell) .sidebar .nav-group a {
  color: #9fb0c9;
}

.app-shell:not(.dashboard-shell) .sidebar .nav-group a:hover,
.app-shell:not(.dashboard-shell) .sidebar .nav-group a:focus-visible {
  color: #e8f2ff;
  background: rgba(55, 125, 226, 0.09);
}

.app-shell:not(.dashboard-shell) .sidebar .nav-group a.active {
  color: #f4f8ff;
  border-color: rgba(71, 137, 234, 0.2);
  background: linear-gradient(90deg, rgba(31, 112, 224, 0.42), rgba(22, 76, 151, 0.25));
  box-shadow:
    inset 2px 0 #3b8cff,
    0 9px 22px rgba(0, 4, 13, 0.2);
}

.app-shell:not(.dashboard-shell) .sidebar-footer,
.app-shell:not(.dashboard-shell) .sidebar-user-profile {
  border-color: rgba(116, 153, 201, 0.18);
  background: linear-gradient(145deg, rgba(15, 36, 64, 0.94), rgba(7, 23, 43, 0.96));
}

.mobile-header {
  color: var(--ink);
  border-bottom-color: var(--line);
  background: rgba(6, 20, 38, 0.97);
}

.page-heading {
  border-bottom-color: rgba(116, 153, 201, 0.1);
}

.page-kicker,
.eyebrow,
.auth-kicker {
  color: #55a3ff;
}

.role-badge {
  color: #a9c9ff;
  border-color: rgba(74, 145, 255, 0.28);
  background: rgba(52, 136, 255, 0.1);
}

.panel,
.stat-card,
.project-card,
.template-card,
.loader-card,
.tenant-card,
.collection-item-card,
.standard-report-card,
.system-kpi-card,
.tenant-operation-grid > div,
.workflow-stage-row,
.enterprise-posture span,
.property-photo-card {
  color: var(--ink);
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(16, 41, 68, 0.98), rgba(10, 29, 51, 0.98));
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.025),
    var(--shadow-sm);
}

.panel:hover,
.project-card:hover,
.template-card:hover,
.collection-item-card:hover {
  border-color: rgba(74, 145, 255, 0.36);
}

.stat-card::after,
.project-card::after,
.template-card::after {
  border-color: rgba(74, 145, 255, 0.08);
  box-shadow: 0 0 0 1.25rem rgba(52, 136, 255, 0.025);
}

.stat-card span,
.client-summary > span,
.project-card p,
.template-card p {
  color: var(--muted);
}

.section-title a,
.details-summary,
.project-card-meta > span:not(.pill),
.attention-date,
.save-status,
.link-button {
  color: #70aaff;
}

.attention-row,
.client-summary,
.simple-list > div,
.stage-row,
.note,
.analytics-bar-button,
.analytics-duration-row,
.session-row,
.enterprise-ops-row,
.workflow-version-row {
  border-color: rgba(116, 153, 201, 0.16);
}

.attention-row:hover,
.analytics-bar-button:hover,
.analytics-duration-row:hover,
tbody tr:hover {
  background: rgba(52, 136, 255, 0.08);
}

.pill {
  color: #aebed2;
  border-color: rgba(145, 166, 194, 0.2);
  background: rgba(145, 166, 194, 0.1);
}

.pill-active,
.pill-completed,
.pill-published {
  color: #65dda9;
  border-color: rgba(84, 215, 160, 0.24);
  background: rgba(84, 215, 160, 0.1);
}

.pill-in_progress,
.pill-draft {
  color: #87b7ff;
  border-color: rgba(74, 145, 255, 0.24);
  background: rgba(74, 145, 255, 0.1);
}

.pill-disabled,
.pill-cancelled,
.pill-failed {
  color: #ff8c9d;
  border-color: rgba(255, 113, 134, 0.24);
  background: rgba(255, 113, 134, 0.1);
}

.progress-track,
.progress-track::-webkit-progress-bar,
.analytics-bar-button progress,
.analytics-trend-button progress,
.analytics-bar-button progress::-webkit-progress-bar,
.analytics-trend-button progress::-webkit-progress-bar {
  background: #1a304c;
}

.analytics-actions-panel,
.ai-panel {
  border-color: var(--line);
  background:
    radial-gradient(circle at 100% 0%, rgba(52, 136, 255, 0.11), transparent 17rem),
    linear-gradient(145deg, #102944, #0a1d33);
}

.analytics-saved-views-toggle:hover {
  background: rgba(52, 136, 255, 0.07);
}

.analytics-saved-views-state,
.analytics-saved-views-group,
.analytics-trend-button,
.ai-next-action,
.ai-governance-note,
.saved-view-controls,
.workflow-impact,
.project-list-row,
.reports-how-step,
.project-export-intro {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(6, 24, 43, 0.62);
}

.analytics-trend-button:hover {
  border-color: #4a91ff;
  background: rgba(52, 136, 255, 0.12);
}

.analytics-chart-grid[data-state='loading'] {
  background: linear-gradient(90deg, #0a1d34 25%, #102944 50%, #0a1d34 75%);
  background-size: 200% 100%;
}

label,
.dashboard-config-check,
.checkbox-label {
  color: #afc0d6;
}

input,
select,
textarea,
.enterprise-lookup-search,
.enterprise-command-input {
  color: var(--ink);
  border-color: #284461;
  background: #081b31;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.015);
}

input::placeholder,
textarea::placeholder,
.enterprise-command-input::placeholder {
  color: #6f86a5;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #3f6389;
}

input:focus,
select:focus,
textarea:focus,
.enterprise-command-input:focus {
  color: white;
  border-color: #4a91ff;
  background: #0a213b;
  box-shadow: 0 0 0 3px rgba(74, 145, 255, 0.16);
}

input:disabled,
select:disabled,
textarea:disabled {
  color: #70839d;
  background: #0b1a2c;
}

input[type='checkbox'],
input[type='radio'] {
  accent-color: #4a91ff;
}

.primary {
  color: white;
  border-color: #3488ff;
  background: linear-gradient(135deg, #287cea, #1856a8);
  box-shadow: 0 9px 22px rgba(12, 72, 153, 0.25);
}

.primary:hover {
  border-color: #64a5ff;
  background: linear-gradient(135deg, #3c91ff, #2164bd);
  box-shadow: 0 12px 28px rgba(25, 104, 210, 0.3);
}

.secondary,
.registration-secondary-button {
  color: #b8d6ff;
  border-color: #294868;
  background: #0a2139;
}

.secondary:hover,
.registration-secondary-button:hover:not(:disabled) {
  color: white;
  border-color: #4a91ff;
  background: rgba(52, 136, 255, 0.15);
}

.form-error,
.registration-error {
  color: #ff9aaa;
  border-color: rgba(255, 113, 134, 0.28);
  background: rgba(255, 90, 125, 0.1);
}

.stage-number,
.workflow-stage-number,
.registration-trust-icon {
  color: #89b9ff;
  border-color: rgba(74, 145, 255, 0.25);
  background: rgba(52, 136, 255, 0.1);
}

.table-wrap {
  border-color: var(--line);
  background: #0a1d33;
}

table {
  color: #dce8f8;
  background: #0a1d33;
}

th,
td {
  border-color: rgba(116, 153, 201, 0.16);
}

th {
  color: #91a9c8;
  background: #102944;
}

.center-screen {
  background:
    radial-gradient(circle at 50% 38%, rgba(52, 136, 255, 0.16), transparent 23rem),
    linear-gradient(145deg, #07182b, #040e1d);
}

.tenant-choice {
  color: var(--ink);
  border-color: var(--line);
  background: #0a1d33;
}

.tenant-choice:hover {
  border-color: #4a91ff;
  background: #102944;
}

.auth-layout {
  color: var(--ink);
  background: #040e1d;
}

.auth-panel {
  border-right: 1px solid rgba(116, 153, 201, 0.18);
  background:
    radial-gradient(circle at 6% 92%, rgba(52, 136, 255, 0.13), transparent 17rem),
    linear-gradient(160deg, #0b2139 0%, #07182b 65%, #061426 100%);
  box-shadow: 18px 0 55px rgba(0, 4, 13, 0.36);
}

.auth-panel > p {
  color: #9fb1c9;
}

.auth-side {
  background:
    radial-gradient(circle at 76% 22%, rgba(52, 136, 255, 0.32), transparent 19rem),
    linear-gradient(145deg, #071a30 0%, #092746 52%, #040e1d 100%);
}

.auth-features > span {
  border-color: rgba(116, 153, 201, 0.22);
  background: rgba(5, 20, 37, 0.55);
}

.collection-banner {
  border-color: rgba(74, 145, 255, 0.22);
  background: linear-gradient(135deg, rgba(16, 41, 68, 0.98), rgba(8, 29, 51, 0.98));
}

.collection-selection-actions strong,
.collection-export-status[data-state='success'] {
  color: #65dda9;
}

.ai-help,
.ai-provenance,
.ai-next-action span,
.ai-governance-note,
.ai-feedback-actions > span:first-child {
  color: var(--muted);
}

.ai-risk-low {
  color: #65dda9;
  background: rgba(84, 215, 160, 0.1);
}

.ai-risk-medium {
  color: #ffc96d;
  background: rgba(255, 193, 90, 0.1);
}

.ai-risk-high {
  color: #ff8c9d;
  background: rgba(255, 113, 134, 0.1);
}

.dashboard-config-dialog,
.enterprise-command-dialog,
.enterprise-ops-dialog,
.tenant-control-dialog,
.system-support-dialog,
.enterprise-confirm-dialog,
.enterprise-record-dialog {
  color: var(--ink);
  border-color: var(--line);
  background: #0a1d33;
  box-shadow: 0 30px 90px rgba(0, 4, 13, 0.64);
}

.dashboard-config-dialog::backdrop,
.enterprise-command-dialog::backdrop,
.tenant-control-dialog::backdrop,
.system-support-dialog::backdrop,
.enterprise-confirm-dialog::backdrop,
.enterprise-record-dialog::backdrop {
  background: rgba(1, 7, 15, 0.72);
}

.dashboard-config-grid,
.dashboard-config-footer,
.dashboard-config-grid section,
.enterprise-command-dialog__panel,
.enterprise-confirm-dialog__panel,
.enterprise-record-dialog__panel {
  color: var(--ink);
  border-color: var(--line);
  background: #0a1d33;
}

.dashboard-config-grid {
  background: #07182b;
}

.dashboard-config-check,
.enterprise-command-result,
.enterprise-record-grid > div {
  border-color: rgba(116, 153, 201, 0.18);
  background: rgba(16, 41, 68, 0.72);
}

.enterprise-command-result:hover,
.enterprise-command-result:focus-visible {
  background: rgba(52, 136, 255, 0.12);
}

.enterprise-breadcrumbs a,
.enterprise-command-result small {
  color: #70aaff;
}

.enterprise-breadcrumbs [aria-current='page'] {
  color: #95a9c3;
}

.project-list-loading,
.project-map-empty,
.project-list-row,
.property-photo-card,
.project-map-popup {
  border-color: var(--line);
  background: #0a1d33;
}

.project-export-toolbar {
  color: var(--ink);
  border-color: var(--line);
  background: linear-gradient(145deg, rgba(16, 41, 68, 0.98), rgba(10, 29, 51, 0.98));
  box-shadow: var(--shadow-sm);
}

.project-export-title,
.project-export-intro {
  border-color: rgba(116, 153, 201, 0.18);
}

.project-list-select {
  background: rgba(52, 136, 255, 0.1);
}

.project-view-toggle button[aria-pressed='true'] {
  color: white;
  border-color: #4a91ff;
  background: #287cea;
}

.project-list-row.is-selected,
.project-selection-wrapper.is-selected .project-card {
  border-color: rgba(64, 214, 205, 0.52);
  background: linear-gradient(145deg, rgba(16, 56, 77, 0.98), rgba(10, 35, 58, 0.98));
}

.project-list-open:hover,
.reports-overview a:hover {
  background: rgba(52, 136, 255, 0.1);
}

.project-map-canvas {
  border-color: var(--line);
  background: #0a1d33;
}

.project-image-placeholder {
  color: #8fa4c2;
  background: linear-gradient(135deg, #162d48, #0c2138);
}

.project-map-popup-copy p,
.project-address,
.project-summary-grid small,
.location-status,
.reports-overview-copy,
.standard-report-card p,
.standard-report-status,
.report-custom-help {
  color: var(--muted);
}

.project-map-attribution {
  color: #a5b7ce;
  background: rgba(4, 14, 29, 0.88);
}

.system-support-banner {
  color: #ffe3a5;
  border-color: rgba(255, 193, 90, 0.35);
  background: rgba(94, 61, 7, 0.38);
}

.system-expiration-active,
.tenant-health-healthy {
  color: #65dda9;
}

.system-expiration-soon,
.tenant-health-warning {
  color: #ffc96d;
}

.system-expiration-expired,
.tenant-health-critical {
  color: #ff8c9d;
}

body.registration-body {
  color: var(--ink);
  background: #061426;
  --registration-ink: #edf5ff;
  --registration-muted: #91a6c2;
  --registration-line: rgba(116, 153, 201, 0.22);
  --registration-blue: #4a91ff;
  --registration-blue-dark: #a9c9ff;
  --registration-blue-soft: rgba(52, 136, 255, 0.1);
  --registration-green: #54d7a0;
  --registration-surface: #0d2139;
  --registration-bg: #061426;
  --registration-shadow: 0 24px 68px rgba(0, 4, 13, 0.42);
}

.registration-shell {
  background:
    radial-gradient(circle at 8% 12%, rgba(52, 136, 255, 0.15), transparent 32%),
    linear-gradient(135deg, #07182b 0%, #061426 48%, #040e1d 100%);
}

.registration-brand-lockup,
.registration-verification-email,
.registration-form h2,
.registration-success h2,
.seat-card strong {
  color: var(--registration-ink);
}

.registration-story {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 42%),
    linear-gradient(135deg, #07182b 0%, #0b3158 54%, #0a3e45 115%);
}

.registration-preview-window,
.registration-preview-bar,
.registration-preview-card {
  color: var(--registration-ink);
  border-color: var(--registration-line);
  background: #0a1d33;
}

.registration-preview-status,
.registration-progress li.complete .registration-progress-number,
.registration-success-icon,
.registration-status {
  color: #65dda9;
  border-color: rgba(84, 215, 160, 0.25);
  background: rgba(84, 215, 160, 0.1);
}

.registration-progress li,
.registration-field label small,
.registration-microcopy,
.registration-trust-item,
.seat-card .seat-eyebrow,
.seat-price small,
.seat-detail,
.registration-seat-note,
.registration-email-change > label {
  color: var(--registration-muted);
}

.registration-progress-number,
.registration-card,
.seat-card,
.registration-secondary-button,
.registration-email-change-row input,
.registration-field input,
.registration-field textarea {
  color: var(--registration-ink);
  border-color: var(--registration-line);
  background: #0a1d33;
}

.registration-card {
  background: rgba(10, 29, 51, 0.96);
  box-shadow: var(--registration-shadow);
}

.registration-field label {
  color: #b8c9df;
}

.registration-field input:focus,
.registration-field textarea:focus,
.registration-email-change-row input:focus {
  border-color: #4a91ff;
  background: #0c243f;
  box-shadow: 0 0 0 4px rgba(74, 145, 255, 0.14);
}

.seat-card:hover:not(:disabled) {
  border-color: #4a91ff;
  box-shadow: 0 14px 30px rgba(0, 4, 13, 0.32);
}

.seat-card.enterprise {
  border-color: rgba(64, 214, 205, 0.28);
  background: linear-gradient(135deg, rgba(16, 49, 72, 0.98), rgba(10, 52, 56, 0.94));
}

.registration-seat-note {
  background: rgba(52, 136, 255, 0.08);
}

.registration-top-note,
.registration-brand-copy small,
.registration-form .lead,
.registration-success p {
  color: var(--registration-muted);
}

@media (max-width: 980px) {
  .app-shell .mobile-header {
    color: var(--ink);
    border-bottom-color: var(--line);
    background: rgba(6, 20, 38, 0.97);
    box-shadow: 0 10px 30px rgba(0, 4, 13, 0.34);
  }

  .app-shell .mobile-menu-button {
    color: #70aaff;
    border-color: #294868;
    background: #0a2139;
  }

  .app-shell .mobile-menu-button:hover,
  .app-shell .mobile-menu-button:focus-visible {
    color: white;
    border-color: #4a91ff;
    background: rgba(52, 136, 255, 0.15);
  }

  .app-shell:not(.dashboard-shell) .mobile-header {
    box-shadow: 0 10px 30px rgba(0, 4, 13, 0.34);
  }

  .app-shell:not(.dashboard-shell) .sidebar {
    background: rgba(4, 14, 29, 0.98);
  }
}

@media (max-width: 740px) {
  .auth-panel {
    border-right: 0;
    background:
      radial-gradient(circle at 50% 0%, rgba(52, 136, 255, 0.18), transparent 20rem),
      linear-gradient(160deg, #0b2139, #061426);
  }
}

@media (forced-colors: active) {
  :root {
    color-scheme: dark;
  }
}
