:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07101f;
  color: #f7f9fc;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(54, 128, 255, 0.2), transparent 38rem),
    linear-gradient(145deg, #07101f 0%, #0b1730 56%, #091225 100%);
}

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

.page-shell {
  width: calc(100% - 2rem);
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 6rem) 0 3rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
}

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

.brand strong {
  font-size: 1rem;
}

.brand small {
  margin-top: 0.15rem;
  color: #91a0ba;
  font-size: 0.78rem;
}

.auth-card {
  max-width: 34rem;
  min-height: 23rem;
  padding: clamp(1.4rem, 5vw, 2.25rem);
  border: 1px solid rgba(140, 172, 222, 0.2);
  border-radius: 1.4rem;
  background: rgba(17, 31, 56, 0.92);
  box-shadow: 0 1.5rem 5rem rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.auth-card.workspace-card {
  max-width: none;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: #75aaff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 7vw, 2.55rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

h2 {
  margin: 1.8rem 0 0;
  font-size: 1.05rem;
}

.body-copy,
.status-copy {
  margin: 1rem 0 0;
  color: #b7c1d3;
  font-size: 0.97rem;
  line-height: 1.62;
}

.status-copy {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(117, 170, 255, 0.22);
  border-radius: 0.8rem;
  background: rgba(63, 120, 218, 0.1);
  color: #d6e4ff;
}

.form-stack {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

label {
  color: #dbe5f6;
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 3.15rem;
  padding: 0 0.95rem;
  border: 1px solid #344763;
  border-radius: 0.75rem;
  outline: none;
  background: #0a1528;
  color: #ffffff;
}

textarea {
  min-height: 6.5rem;
  padding-top: 0.8rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #6ca4ff;
  box-shadow: 0 0 0 3px rgba(83, 146, 255, 0.16);
}

button {
  min-height: 3.15rem;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 0.75rem;
  cursor: pointer;
  background: #3d85f7;
  color: #ffffff;
  font-weight: 800;
  transition: background 120ms ease, transform 120ms ease;
}

button:hover:not(:disabled) {
  background: #5797fb;
  transform: translateY(-1px);
}

button:focus-visible {
  outline: 3px solid rgba(132, 180, 255, 0.42);
  outline-offset: 2px;
}

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

.button-secondary {
  margin-top: 1.5rem;
  border: 1px solid #41536d;
  background: transparent;
  color: #d8e3f3;
}

.button-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.button-danger {
  border: 1px solid rgba(248, 113, 113, 0.5);
  background: rgba(153, 27, 27, 0.24);
  color: #fecaca;
}

.button-danger:hover:not(:disabled) {
  background: rgba(185, 28, 28, 0.38);
}

.access-panel {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(140, 172, 222, 0.18);
}

.pot-panel {
  margin-top: 1.6rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(140, 172, 222, 0.18);
}

.pot-controls {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}

.balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.balance-card {
  padding: 0.85rem;
  border: 1px solid rgba(117, 170, 255, 0.25);
  border-radius: 0.8rem;
  background: rgba(7, 16, 31, 0.44);
}

.balance-card small,
.balance-card strong {
  display: block;
}

.balance-card small {
  color: #91a0ba;
}

.balance-card strong {
  margin-top: 0.3rem;
  color: #dceaff;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.ledger-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.ledger-entry {
  padding: 0.85rem;
  border: 1px solid rgba(140, 172, 222, 0.18);
  border-radius: 0.8rem;
  background: rgba(7, 16, 31, 0.34);
}

.ledger-entry-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.ledger-entry-heading strong:last-child {
  color: #b8d4ff;
  text-align: right;
}

.ledger-entry small {
  display: block;
  margin-top: 0.3rem;
  color: #91a0ba;
  overflow-wrap: anywhere;
}

.receipt-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.receipt-photo-button {
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr);
  align-items: center;
  width: min(100%, 16rem);
  padding: 0.35rem;
  border: 1px solid rgba(117, 170, 255, 0.25);
  border-radius: 0.7rem;
  background: rgba(7, 16, 31, 0.42);
  color: var(--text);
  text-align: left;
}

.receipt-photo-thumbnail {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.5rem;
  object-fit: cover;
}

.receipt-photo-button span {
  padding: 0 0.55rem;
  overflow: hidden;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-proof-status:empty {
  display: none;
}

.pot-entry-form {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(140, 172, 222, 0.18);
}

.proposal-panel {
  margin-top: 1.4rem;
  padding: 1rem;
  border: 1px solid rgba(117, 170, 255, 0.24);
  border-radius: 1rem;
  background: rgba(7, 16, 31, 0.28);
}

.proposal-panel h2,
.proposal-panel h3 {
  margin: 0;
}

.proposal-panel h3 {
  font-size: 0.98rem;
}

.proposal-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.proposal-item {
  padding: 0.85rem;
  border: 1px solid rgba(140, 172, 222, 0.18);
  border-radius: 0.8rem;
  background: rgba(17, 31, 56, 0.76);
}

.proposal-item p {
  margin: 0.4rem 0 0;
  color: #b7c1d3;
  font-size: 0.84rem;
  line-height: 1.45;
}

.status-badge {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgba(117, 170, 255, 0.3);
  border-radius: 999px;
  color: #d6e4ff;
  font-size: 0.72rem;
  font-weight: 800;
}

.proposal-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.proposal-field {
  display: grid;
  gap: 0.35rem;
}

.proposal-field-wide {
  grid-column: 1 / -1;
}

.access-list {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.85rem;
}

.access-item {
  padding: 0.9rem;
  border: 1px solid rgba(140, 172, 222, 0.18);
  border-radius: 0.8rem;
  background: rgba(7, 16, 31, 0.34);
}

.access-item strong,
.access-item small {
  display: block;
}

.access-item small {
  margin-top: 0.25rem;
  color: #91a0ba;
  overflow-wrap: anywhere;
}

.access-state {
  margin: 0.6rem 0 0;
  color: #cbd7e9;
  font-size: 0.82rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.button-row button {
  min-height: 2.55rem;
  flex: 1 1 11rem;
}

.button-row .button-secondary {
  margin-top: 0;
}

.confirmation-value {
  margin: 1rem 0 0;
  padding: 0.9rem;
  border: 1px solid rgba(117, 170, 255, 0.32);
  border-radius: 0.75rem;
  background: #0a1528;
  color: #ffffff;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.fine-print {
  margin: 1rem 0 0;
  color: #8391a9;
  font-size: 0.78rem;
  line-height: 1.5;
}

.inventory-panel,
.detail-section {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(140, 172, 222, 0.18);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.vehicle-card,
.detail-card,
.line-item,
.media-card {
  border: 1px solid rgba(140, 172, 222, 0.18);
  border-radius: 0.9rem;
  background: rgba(7, 16, 31, 0.42);
}

.vehicle-card {
  display: grid;
  align-content: start;
  overflow: hidden;
}

.vehicle-card img,
.media-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #081327;
}

.vehicle-card-body,
.detail-card,
.line-item,
.media-card-body {
  padding: 0.9rem;
}

.vehicle-card h3,
.detail-section h2,
.line-item p,
.media-card p {
  margin: 0;
}

.vehicle-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.vehicle-card button {
  width: calc(100% - 1.8rem);
  min-height: 2.65rem;
  margin: 0 0.9rem 0.9rem;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.6rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(117, 170, 255, 0.3);
  border-radius: 999px;
  color: #bed5ff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: capitalize;
}

.summary-grid,
.detail-grid,
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.summary-label,
.line-meta {
  display: block;
  color: #91a0ba;
  font-size: 0.75rem;
  line-height: 1.45;
}

.summary-value {
  display: block;
  margin-top: 0.25rem;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.line-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.line-item {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.line-amount {
  flex: none;
  color: #dce8fb;
  font-weight: 800;
}

.pending-panel {
  border-color: rgba(250, 204, 21, 0.3);
  background: rgba(113, 63, 18, 0.12);
}

.media-card {
  overflow: hidden;
}

.media-link {
  display: inline-flex;
  margin-top: 0.6rem;
  color: #9fc3ff;
  font-weight: 800;
}

.back-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.back-row button {
  min-height: 2.65rem;
}

.noscript {
  color: #f6b8b8;
  text-align: center;
}

@media (max-width: 30rem) {
  .page-shell {
    width: calc(100% - 1.25rem);
    padding-top: 1.25rem;
  }

  .auth-card {
    border-radius: 1rem;
  }

  .line-item {
    display: block;
  }

  .line-amount {
    display: block;
    margin-top: 0.45rem;
  }

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

  .proposal-field-grid {
    grid-template-columns: 1fr;
  }

  .proposal-field-wide {
    grid-column: auto;
  }
}

/* Premium experience — visual-only overrides. */
:root {
  --canvas: #05070b;
  --canvas-raised: #0a0d13;
  --surface: rgba(19, 23, 32, 0.84);
  --surface-strong: rgba(25, 30, 41, 0.94);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.105);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5f7;
  --text-secondary: #a8abb4;
  --text-tertiary: #747985;
  --blue: #2997ff;
  --blue-bright: #63b3ff;
  --green: #54d389;
  --amber: #f3ba4a;
  --red: #ff6b6b;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
  font-synthesis: none;
}

html {
  min-width: 20rem;
  background: var(--canvas);
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% -10%, rgba(41, 151, 255, 0.13), transparent 32rem),
    radial-gradient(circle at -8% 38%, rgba(108, 75, 255, 0.09), transparent 28rem),
    linear-gradient(180deg, #080b11 0%, var(--canvas) 34rem, #06080c 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(7rem);
  opacity: 0.13;
  pointer-events: none;
}

.ambient-one {
  top: -14rem;
  right: -8rem;
  background: #178bff;
}

.ambient-two {
  bottom: -17rem;
  left: -11rem;
  background: #7c5cff;
}

.page-shell {
  width: min(calc(100% - 2.5rem), 88rem);
  max-width: none;
  margin: 0 auto;
  padding: 1.35rem 0 5rem;
}

.brand {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 clamp(2.5rem, 7vw, 6rem);
}

.brand-wordmark {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 680;
  letter-spacing: -0.035em;
}

.brand-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.session-actions {
  display: inline-flex;
  gap: 0.55rem;
}

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

.brand strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.brand small {
  margin-top: 0.16rem;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  letter-spacing: 0.01em;
}

.theme-toggle {
  display: inline-flex;
  width: auto;
  min-height: 2.05rem;
  align-items: center;
  gap: 0.42rem;
  padding: 0 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 620;
  backdrop-filter: blur(1rem);
}

.theme-toggle:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
  filter: none;
}

.brand-actions .session-action {
  position: static;
  width: auto;
  min-height: 2.05rem;
  margin: 0;
  padding: 0 0.72rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 620;
}

.theme-icon {
  width: 0.9rem;
  color: var(--blue-bright);
  font-size: 0.92rem;
  line-height: 1;
  text-align: center;
}

.auth-card {
  width: min(100%, 36rem);
  max-width: none;
  min-height: 0;
  margin: 0 auto;
  padding: clamp(1.65rem, 5vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 42%),
    var(--surface);
  box-shadow:
    0 2rem 6rem rgba(0, 0, 0, 0.38),
    inset 0 1px rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(2rem) saturate(125%);
}

.auth-card.workspace-card {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace-card > * {
  grid-column: 1 / -1;
}

.workspace-card > .proposal-panel {
  grid-column: span 6;
  margin-top: 0;
}

.workspace-card > .eyebrow {
  margin: 0 0 -0.75rem;
}

.workspace-card > h1,
.workspace-card > .body-copy {
  max-width: 52rem;
}

.workspace-card > h1 {
  padding-right: 9rem;
}

.workspace-card > .body-copy {
  margin-top: -0.55rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--blue-bright);
  font-size: 0.69rem;
  font-weight: 720;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 680;
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.auth-card:not(.workspace-card) h1 {
  font-size: clamp(2.15rem, 7vw, 3.2rem);
  line-height: 1.01;
}

h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 640;
  letter-spacing: -0.028em;
}

h3 {
  color: var(--text);
  font-weight: 630;
  letter-spacing: -0.02em;
}

.body-copy,
.status-copy {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
}

.body-copy {
  margin: 1.15rem 0 0;
}

.status-copy {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(41, 151, 255, 0.2);
  border-radius: 0.9rem;
  background: rgba(41, 151, 255, 0.075);
  color: #c7e3ff;
}

.form-stack {
  gap: 0.72rem;
  margin-top: 1.7rem;
}

label {
  color: #d4d5da;
  font-size: 0.78rem;
  font-weight: 610;
}

input,
select,
textarea {
  min-height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.9rem;
  background: rgba(2, 4, 8, 0.58);
  color: var(--text);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 7rem;
  padding-top: 0.85rem;
}

input:hover,
select:hover,
textarea:hover {
  background: rgba(5, 8, 14, 0.82);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(72, 165, 255, 0.8);
  background: rgba(5, 8, 14, 0.94);
  box-shadow: 0 0 0 0.23rem rgba(41, 151, 255, 0.14);
}

button {
  min-height: 3.05rem;
  padding: 0 1.2rem;
  border: 1px solid transparent;
  border-radius: 0.9rem;
  background: linear-gradient(180deg, #3aa2ff 0%, #147ce5 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18), 0 0.55rem 1.4rem rgba(0, 98, 214, 0.2);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 670;
  letter-spacing: -0.01em;
  transition: filter 150ms ease, transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

button:hover:not(:disabled) {
  background: linear-gradient(180deg, #51adff 0%, #2187eb 100%);
  filter: brightness(1.04);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 0.2rem solid rgba(99, 179, 255, 0.48);
  outline-offset: 0.16rem;
}

.button-secondary {
  margin-top: 1.3rem;
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06);
  color: #e2e3e8;
}

.button-secondary:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.27);
  background: rgba(255, 255, 255, 0.09);
}

.button-danger {
  border-color: rgba(255, 107, 107, 0.32);
  background: rgba(255, 77, 77, 0.1);
  box-shadow: none;
  color: #ffaaaa;
}

.button-danger:hover:not(:disabled) {
  background: rgba(255, 77, 77, 0.17);
}

.session-action {
  position: absolute;
  top: 0;
  right: 0;
  width: auto;
  min-height: 2.55rem;
  margin: 0;
  padding: 0 1rem;
  border-radius: 999px;
}

.inventory-panel,
.detail-section,
.proposal-panel,
.access-panel,
.pot-panel {
  margin-top: 0.3rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.04), transparent 36%),
    var(--surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.055), 0 1rem 3rem rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(1.5rem) saturate(120%);
}

.inventory-panel > .fine-print,
.detail-section > .fine-print,
.proposal-panel > .fine-print,
.pot-panel > .fine-print {
  max-width: 46rem;
  margin-top: 0.45rem;
}

.inventory-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  margin-top: 1.35rem;
}

.vehicle-card {
  position: relative;
  display: grid;
  min-height: 27rem;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--surface-strong);
  box-shadow: 0 1.25rem 3.4rem rgba(0, 0, 0, 0.2);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.vehicle-card:hover {
  border-color: rgba(255, 255, 255, 0.19);
  box-shadow: 0 1.8rem 4rem rgba(0, 0, 0, 0.3);
  transform: translateY(-0.18rem);
}

.vehicle-card img,
.vehicle-media-placeholder {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-items: center;
  object-fit: cover;
  background:
    radial-gradient(circle at 70% 18%, rgba(86, 172, 255, 0.28), transparent 35%),
    linear-gradient(135deg, #121a28, #090c12 68%);
}

.vehicle-media-placeholder {
  align-content: center;
  gap: 0.55rem;
  color: var(--text-tertiary);
}

.vehicle-media-placeholder small {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.vehicle-placeholder-mark {
  display: grid;
  width: 3.15rem;
  height: 3.15rem;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.vehicle-card-body {
  position: relative;
  display: grid;
  align-content: start;
  padding: 1.25rem 1.25rem 1rem;
}

.vehicle-card h3 {
  padding-right: 5rem;
  font-size: 1.25rem;
  line-height: 1.18;
}

.vehicle-card .status-pill {
  position: absolute;
  top: 1.18rem;
  right: 1.18rem;
  margin: 0;
}

.vehicle-cost-label {
  margin-top: 1.35rem;
  color: var(--text-tertiary);
  font-size: 0.71rem;
  font-weight: 590;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vehicle-cost-value {
  margin-top: 0.3rem;
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 620;
  letter-spacing: -0.035em;
}

.pending-count {
  width: fit-content;
  margin-top: 0.85rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(243, 186, 74, 0.1);
  color: #f2ca78;
  font-size: 0.7rem;
  font-weight: 610;
}

.vehicle-card button {
  width: auto;
  min-height: 2.75rem;
  margin: 0 1.2rem 1.2rem;
}

.partner-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 8rem;
}

.partner-dashboard-header h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 4.75rem);
  letter-spacing: -0.065em;
}

.partner-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.preview-badge {
  padding: 0.5rem 0.75rem;
  border: 1px solid rgba(88, 166, 255, 0.32);
  border-radius: 999px;
  background: rgba(41, 151, 255, 0.1);
  color: #b9dcff;
  font-size: 0.76rem;
  font-weight: 650;
}

.partner-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 2rem;
}

.partner-balance-card {
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: var(--surface-strong);
}

.partner-balance-card span,
.partner-balance-card strong {
  display: block;
}

.partner-balance-card span {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 620;
}

.partner-balance-card strong {
  margin-top: 0.65rem;
  font-size: clamp(1.55rem, 3.4vw, 2.5rem);
  letter-spacing: -0.045em;
}

.partner-vehicles,
.partner-updates,
.partner-history {
  margin-top: 2rem;
}

.partner-vehicles > h2,
.partner-updates > h2 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
}

.partner-vehicle-card {
  min-height: 25rem;
}

.vehicle-total-cost {
  margin-top: 0.55rem;
  color: var(--text-tertiary);
}

.partner-updates {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
}

.partner-updates h2 {
  margin: 0;
}

.partner-history {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--line);
}

.partner-history summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 650;
}

.activity-history,
.advanced-connections {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.025);
}

.activity-history > summary,
.advanced-connections > summary {
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 650;
}

.activity-history[open] > summary,
.advanced-connections[open] > summary {
  margin-bottom: 1rem;
}

.status-pill,
.status-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0.3rem 0.58rem;
  border: 1px solid rgba(99, 179, 255, 0.24);
  border-radius: 999px;
  background: rgba(41, 151, 255, 0.09);
  color: #a9d4ff;
  font-size: 0.67rem;
  font-weight: 680;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.status-active {
  border-color: rgba(84, 211, 137, 0.25);
  background: rgba(84, 211, 137, 0.09);
  color: #8de6b2;
}

.status-sold,
.status-settled {
  border-color: rgba(147, 117, 255, 0.26);
  background: rgba(126, 92, 255, 0.1);
  color: #c4b6ff;
}

.summary-grid,
.detail-grid,
.media-grid {
  gap: 0.8rem;
  margin-top: 1.15rem;
}

.detail-card,
.line-item,
.media-card,
.ledger-entry,
.access-item,
.proposal-item,
.balance-card {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface-soft);
}

.detail-card {
  min-height: 6.5rem;
  padding: 1rem;
}

.summary-label,
.line-meta {
  color: var(--text-tertiary);
  font-size: 0.72rem;
}

.summary-value {
  margin-top: 0.55rem;
  font-size: 1.18rem;
  font-weight: 620;
  letter-spacing: -0.03em;
}

.line-list,
.ledger-list,
.access-list,
.proposal-list {
  gap: 0.6rem;
  margin-top: 1rem;
}

.line-item {
  min-height: 4.4rem;
  align-items: center;
  padding: 0.85rem 1rem;
}

.line-item p {
  color: #e5e6e9;
  font-size: 0.87rem;
  font-weight: 570;
}

.line-amount {
  color: var(--text);
  font-size: 0.94rem;
  font-variant-numeric: tabular-nums;
}

.pending-panel {
  border-color: rgba(243, 186, 74, 0.2);
  background:
    linear-gradient(145deg, rgba(243, 186, 74, 0.055), transparent 45%),
    var(--surface);
}

.balance-grid {
  gap: 0.8rem;
  margin-top: 1rem;
}

.balance-card {
  min-height: 7.5rem;
  padding: 1.1rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(41, 151, 255, 0.12), transparent 55%),
    rgba(255, 255, 255, 0.04);
}

.balance-card small {
  color: var(--text-tertiary);
  font-size: 0.71rem;
  font-weight: 590;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.balance-card strong {
  margin-top: 0.9rem;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 620;
  letter-spacing: -0.045em;
}

.ledger-entry,
.access-item,
.proposal-item {
  padding: 1rem;
}

.ledger-entry-heading strong:last-child {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.ledger-entry small,
.access-item small,
.fine-print {
  color: var(--text-tertiary);
}

.fine-print {
  font-size: 0.75rem;
  line-height: 1.55;
}

.proposal-panel h2,
.proposal-panel h3 {
  margin: 0;
}

.proposal-item p {
  color: var(--text-secondary);
}

.access-state {
  color: #d5d6da;
}

.button-row {
  gap: 0.55rem;
}

.button-row button {
  min-height: 2.65rem;
}

.button-row .button-secondary {
  margin-top: 0;
}

.confirmation-value {
  border-color: var(--line-strong);
  border-radius: 1rem;
  background: rgba(0, 0, 0, 0.25);
}

.media-card {
  overflow: hidden;
}

.media-link {
  color: var(--blue-bright);
  text-decoration: none;
}

.photo-viewer[hidden] {
  display: none;
}

html:has(.photo-viewer:not([hidden])) {
  overflow: hidden;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(1rem);
}

.photo-viewer-dialog {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(82rem, 100%);
  height: min(58rem, calc(100dvh - 2rem));
  gap: 0.85rem;
  padding: 3.5rem 1rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.35rem;
  background: #090a0d;
  box-shadow: 0 2rem 8rem rgba(0, 0, 0, 0.55);
}

.photo-viewer-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border-radius: 0.9rem;
  object-fit: contain;
}

.photo-viewer-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: auto;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.45rem 0.75rem;
}

.photo-viewer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.photo-viewer-controls button {
  width: auto;
  min-height: 2.35rem;
  margin: 0;
}

.photo-viewer-count {
  min-width: 6rem;
  color: #f5f5f7;
  text-align: center;
}

.photo-open-button {
  width: auto;
  min-height: 2rem;
  margin-top: 0.6rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--blue-bright);
  text-align: left;
}

.photo-open-button:hover:not(:disabled) {
  background: transparent;
  box-shadow: none;
  text-decoration: underline;
}

.back-row {
  margin: 0 0 0.4rem;
}

.back-row .button-secondary {
  margin-top: 0;
}

/* Light appearance keeps the same hierarchy with warmer, brighter surfaces. */
:root[data-theme='light'] {
  color-scheme: light;
  --canvas: #f4f5f7;
  --canvas-raised: #ffffff;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(20, 32, 52, 0.045);
  --line: rgba(20, 32, 52, 0.105);
  --line-strong: rgba(20, 32, 52, 0.18);
  --text: #1d1d1f;
  --text-secondary: #62666e;
  --text-tertiary: #858992;
  --blue: #0071e3;
  --blue-bright: #0066cc;
  --green: #16874e;
  --amber: #a86400;
  --red: #c92f35;
}

html[data-theme='light'] body {
  background:
    radial-gradient(circle at 82% -10%, rgba(0, 113, 227, 0.11), transparent 32rem),
    radial-gradient(circle at -8% 38%, rgba(108, 75, 255, 0.07), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--canvas) 34rem, #eef0f3 100%);
}

html[data-theme='light'] .ambient {
  opacity: 0.08;
}

html[data-theme='light'] .theme-toggle {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 0.35rem 1.2rem rgba(31, 43, 61, 0.06);
}

html[data-theme='light'] .theme-toggle:hover:not(:disabled) {
  background: #ffffff;
}

html[data-theme='light'] .auth-card,
html[data-theme='light'] .inventory-panel,
html[data-theme='light'] .detail-section,
html[data-theme='light'] .proposal-panel,
html[data-theme='light'] .access-panel,
html[data-theme='light'] .pot-panel {
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.72), transparent 42%),
    var(--surface);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9), 0 1.4rem 4rem rgba(31, 43, 61, 0.1);
}

html[data-theme='light'] .auth-card.workspace-card {
  background: transparent;
  box-shadow: none;
}

html[data-theme='light'] label,
html[data-theme='light'] .line-item p,
html[data-theme='light'] .access-state {
  color: #3c4047;
}

html[data-theme='light'] .summary-value,
html[data-theme='light'] .line-amount,
html[data-theme='light'] .vehicle-cost-value,
html[data-theme='light'] .balance-card strong,
html[data-theme='light'] .ledger-entry-heading strong,
html[data-theme='light'] .media-card p,
html[data-theme='light'] .detail-card p {
  color: var(--text);
}

html[data-theme='light'] .summary-label,
html[data-theme='light'] .line-meta,
html[data-theme='light'] .vehicle-total-cost,
html[data-theme='light'] .ledger-entry small,
html[data-theme='light'] .media-card small,
html[data-theme='light'] .fine-print {
  color: var(--text-secondary);
}

html[data-theme='light'] input,
html[data-theme='light'] select,
html[data-theme='light'] textarea {
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
}

html[data-theme='light'] .receipt-photo-button {
  border-color: rgba(31, 43, 61, 0.16);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

html[data-theme='light'] input:hover,
html[data-theme='light'] select:hover,
html[data-theme='light'] textarea:hover,
html[data-theme='light'] input:focus,
html[data-theme='light'] select:focus,
html[data-theme='light'] textarea:focus {
  background: #ffffff;
}

html[data-theme='light'] .button-secondary {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.9);
  color: #30343a;
}

html[data-theme='light'] .button-secondary:hover:not(:disabled) {
  border-color: rgba(20, 32, 52, 0.28);
  background: #ffffff;
}

html[data-theme='light'] .vehicle-card {
  box-shadow: 0 1.25rem 3.4rem rgba(31, 43, 61, 0.1);
}

html[data-theme='light'] .vehicle-card:hover {
  border-color: rgba(20, 32, 52, 0.2);
  box-shadow: 0 1.8rem 4rem rgba(31, 43, 61, 0.15);
}

html[data-theme='light'] .vehicle-card img,
html[data-theme='light'] .vehicle-media-placeholder {
  background:
    radial-gradient(circle at 70% 18%, rgba(41, 151, 255, 0.2), transparent 35%),
    linear-gradient(135deg, #e9eef5, #dfe3e9 68%);
}

html[data-theme='light'] .vehicle-placeholder-mark {
  border-color: rgba(20, 32, 52, 0.14);
  background: rgba(255, 255, 255, 0.58);
  color: rgba(20, 32, 52, 0.5);
}

html[data-theme='light'] .status-copy {
  color: #245f91;
}

html[data-theme='light'] .pending-count {
  color: #8a5700;
}

html[data-theme='light'] .status-pill,
html[data-theme='light'] .status-badge {
  color: #25689f;
}

html[data-theme='light'] .status-active {
  color: #177144;
}

html[data-theme='light'] .status-sold,
html[data-theme='light'] .status-settled {
  color: #6146bd;
}

html[data-theme='light'] .confirmation-value {
  background: rgba(20, 32, 52, 0.045);
}

@media (max-width: 64rem) {
  .workspace-card > .proposal-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 44rem) {
  .page-shell {
    width: min(calc(100% - 1.25rem), 88rem);
    padding-top: 0.7rem;
  }

  .brand {
    min-height: 3.5rem;
    margin-bottom: 2rem;
  }

  .theme-toggle {
    min-height: 2.15rem;
  }

  .auth-card {
    padding: 1.35rem;
    border-radius: 1.35rem;
  }

  .auth-card.workspace-card {
    gap: 0.9rem;
    padding: 0;
  }

  .workspace-card > h1 {
    padding-right: 0;
    font-size: clamp(2.35rem, 13vw, 3.6rem);
  }

  .workspace-card > .body-copy {
    margin-top: -0.25rem;
  }

  .workspace-card > .session-action {
    position: static;
    width: fit-content;
    min-height: 2.5rem;
    margin: 0.2rem 0 0;
  }

  .inventory-panel,
  .detail-section,
  .proposal-panel,
  .access-panel,
  .pot-panel {
    padding: 1.1rem;
    border-radius: 1.3rem;
  }

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

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

  .balance-grid,
  .partner-balance-grid,
  .proposal-field-grid {
    grid-template-columns: 1fr;
  }

  .partner-dashboard-header {
    display: grid;
    padding-right: 0;
  }

  .partner-dashboard-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .partner-updates {
    align-items: stretch;
    flex-direction: column;
  }

  .line-item {
    display: flex;
    align-items: flex-start;
  }

  .line-amount {
    margin-top: 0;
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
