﻿:root {
  --bg: #07111f;
  --bg-2: #0d1b30;
  --surface: rgba(13, 22, 37, 0.84);
  --surface-strong: rgba(14, 23, 39, 0.96);
  --surface-soft: rgba(24, 42, 70, 0.64);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 197, 61, 0.16);
  --text: #eef3fb;
  --muted: #9aaac2;
  --primary: #f2aa12;
  --primary-2: #ffc841;
  --primary-3: #132745;
  --warning: #ffd36d;
  --danger: #f06b5f;
  --success: #46d39b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at top right, rgba(255, 200, 65, 0.18), transparent 26%),
    radial-gradient(circle at top left, rgba(25, 55, 98, 0.28), transparent 34%),
    linear-gradient(180deg, #07111f 0%, #0b1627 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)),
    radial-gradient(circle at 18% 10%, rgba(255, 200, 65, 0.06), transparent 20%);
  pointer-events: none;
}

.bg-scene {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(90deg, transparent, transparent 110px, rgba(255, 255, 255, 0.015) 111px, transparent 112px);
  opacity: 0.35;
  pointer-events: none;
}

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

input,
select,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(220, 236, 240, 0.44);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(255, 200, 65, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 200, 65, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

option {
  color: #0f171c;
}

textarea {
  resize: vertical;
  min-height: 112px;
}

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

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.stack {
  display: grid;
}

.gap-m {
  gap: 16px;
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
}

.app-shell {
  position: relative;
  min-height: 100vh;
  padding: 28px;
}

.card-glass,
.card-panel,
.card-soft {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.card-glass {
  background: linear-gradient(180deg, rgba(14, 23, 39, 0.94), rgba(8, 14, 25, 0.9));
  backdrop-filter: blur(18px);
  border-radius: var(--radius-xl);
}

.card-panel {
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.96), rgba(11, 20, 35, 0.94));
  border-radius: var(--radius-lg);
  padding: 22px;
}

.card-soft {
  background: linear-gradient(180deg, rgba(27, 44, 71, 0.5), rgba(16, 28, 46, 0.48));
  border-radius: var(--radius-lg);
  padding: 18px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #141d29;
  box-shadow: 0 10px 24px rgba(255, 200, 65, 0.25);
}

.btn-secondary {
  background: rgba(19, 39, 69, 0.56);
  color: var(--text);
  border-color: rgba(255, 200, 65, 0.12);
}

.btn-danger {
  background: linear-gradient(135deg, #d95b51, #f07f63);
  color: #fff;
  box-shadow: 0 10px 24px rgba(240, 107, 95, 0.22);
}

.btn-warn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #141d29;
  box-shadow: 0 10px 24px rgba(255, 200, 65, 0.18);
  border-color: rgba(255, 200, 65, 0.22);
}

.btn-warn:disabled {
  opacity: 0.42;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.btn-small {
  padding: 10px 14px;
  font-size: 0.92rem;
}

.login-screen {
  display: grid;
  min-height: calc(100vh - 56px);
  place-items: center;
}

.login-stage {
  width: min(1280px, 100%);
  padding: 38px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.logo-wordmark {
  display: block;
  max-width: 100%;
  height: auto;
}

.logo-wordmark-login {
  width: clamp(220px, 28vw, 360px);
  flex: 0 0 auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.28));
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: block;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.logo-wordmark-sidebar {
  width: 132px;
  margin-bottom: 4px;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.22));
}

.login-copy {
  max-width: 760px;
}

.demo-login-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.demo-login-head {
  margin-bottom: 14px;
}

.demo-login-head .eyebrow {
  margin-bottom: 6px;
}

.demo-login-grid {
  display: grid;
  gap: 10px;
}

.demo-login-btn {
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  text-align: left;
}

.demo-login-btn strong,
.demo-login-btn span {
  display: block;
}

.demo-login-btn span {
  font-size: 0.9rem;
  color: var(--muted);
}

.login-panels {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 22px;
}

.login-showcase,
.login-card {
  min-height: 100%;
}

.showcase-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 22px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--primary-2);
  box-shadow: 0 0 14px rgba(255, 200, 65, 0.75);
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.mini-phone {
  min-height: 220px;
  border-radius: 30px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(11, 18, 24, 0.96), rgba(26, 40, 48, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.mini-phone::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 18px;
  border-radius: 0 0 18px 18px;
  background: rgba(0, 0, 0, 0.45);
}

.mini-phone.highlight {
  background: linear-gradient(180deg, rgba(24, 47, 82, 0.96), rgba(13, 28, 48, 0.94));
  color: #fff;
  border-color: rgba(255, 200, 65, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 65, 0.08);
}

.mini-label {
  display: inline-flex;
  margin-top: 32px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mini-phone strong {
  display: block;
  font-size: 1.16rem;
  margin: 12px 0 10px;
}

.mini-phone p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

.workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  min-height: calc(100vh - 56px);
}

.sidebar {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 200, 65, 0.1);
  color: var(--text);
  border-color: rgba(255, 200, 65, 0.18);
}

.nav-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 200, 65, 0.08);
  color: var(--primary);
  font-size: 1rem;
}

.sidebar-foot {
  margin-top: auto;
}

.sidebar-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.main-stage {
  display: grid;
  gap: 18px;
}

.topbar {
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  box-shadow: inset 0 1px 0 rgba(255, 200, 65, 0.03);
}

.topbar h2 {
  margin-bottom: 8px;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-chip,
.date-chip,
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.92rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.overview-grid,
.content-grid {
  display: grid;
  gap: 18px;
}

.projects-page {
  gap: 20px;
}

.project-management-grid {
  display: grid;
  grid-template-columns: minmax(370px, 460px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 260px;
  gap: 18px;
  padding: 24px;
}

.hero-copy {
  display: grid;
  align-content: center;
}

.hero-copy h3 {
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  margin-bottom: 10px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.auto-break-hint {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 184, 0, 0.10);
  border: 1px solid rgba(255, 184, 0, 0.16);
  color: #f7cf69;
  font-weight: 600;
}

.hero-stat {
  display: grid;
  align-content: center;
}

.hero-stat span {
  color: var(--muted);
  margin-bottom: 10px;
}

.hero-stat strong {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 10px;
}

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

.metric-card {
  display: grid;
  gap: 12px;
  min-height: 120px;
}

.metric-card span {
  color: var(--muted);
}

.form-hint {
  margin: 0 0 18px;
}

.metric-card strong {
  font-size: 2rem;
}

.detail-grid,
.bottom-grid,
.two-col-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.projects-layout {
  grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
}

.schedule-editor-panel,
.project-form-panel,
.project-overview-panel {
  min-height: auto;
}

.reports-layout {
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-head h3 {
  margin-bottom: 0;
}

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

.info-tile {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.info-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 8px;
}

.info-tile strong {
  display: block;
  font-size: 1rem;
}

.timeline-list,
.report-list,
.project-card-list {
  display: grid;
  gap: 12px;
}

.project-card-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.timeline-item,
.report-item,
.project-card {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.project-card {
  background: linear-gradient(180deg, rgba(19, 33, 56, 0.92), rgba(13, 25, 42, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.timeline-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 14px;
}

.timeline-time {
  border-radius: 14px;
  background: rgba(255, 200, 65, 0.1);
  border: 1px solid rgba(255, 200, 65, 0.14);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  min-height: 64px;
}

.timeline-body strong {
  display: block;
  margin-bottom: 6px;
}

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

.module-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.module-card:hover {
  border-color: rgba(255, 200, 65, 0.18);
  background: rgba(255, 200, 65, 0.07);
}

.module-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 200, 65, 0.1);
  color: var(--primary);
  margin-bottom: 16px;
}

.module-card strong {
  display: block;
  margin-bottom: 8px;
}

.module-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.week-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.week-board--top {
  margin-top: 10px;
}

.day-column {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  min-height: 280px;
}

.day-column header {
  margin-bottom: 14px;
}

.day-column h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.day-column span {
  color: var(--muted);
  font-size: 0.85rem;
}

.day-block {
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(27, 53, 92, 0.95), rgba(17, 34, 58, 0.92));
  color: #ffffff;
  font-size: 0.88rem;
  margin-bottom: 10px;
  min-height: 72px;
  border: 1px solid rgba(255, 200, 65, 0.12);
}

.day-block .block-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}

.day-block .block-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-block .block-time {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
}

.day-block small {
  display: block;
  opacity: 0.86;
  margin-top: 6px;
}

.day-empty {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.88rem;
  padding-top: 10px;
}

.table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
}

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

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.project-card-head,
.report-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.project-overview-panel .section-head {
  margin-bottom: 20px;
}

.project-card strong,
.report-item strong {
  font-size: 1rem;
}

.form-panel,
.table-panel,
.project-list-panel,
.report-list-panel,
.info-panel,
.timeline-panel,
.modules-panel,
.schedule-panel {
  min-height: 100%;
}


.pill-muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.project-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.schedule-row {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(18, 31, 52, 0.94), rgba(12, 23, 40, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.schedule-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-day strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.schedule-day span {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.schedule-field span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 8px;
}

.schedule-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: auto;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
}

.schedule-switch.is-enabled {
  border-color: rgba(255, 200, 65, 0.22);
  background: rgba(255, 200, 65, 0.08);
}

.schedule-switch input {
  width: 18px;
  height: 18px;
}

.project-form-panel form {
  display: grid;
  gap: 14px;
}

.project-form-panel .inline-actions {
  margin-top: 6px;
}

.project-list-panel .project-card .eyebrow {
  margin-bottom: 10px;
}

.project-card .project-actions {
  margin-top: 16px;
}

.project-card .project-actions .btn {
  flex: 1 1 120px;
}

.error-text {
  margin: 0;
  color: #ff9ca8;
}

.empty-state {
  border-radius: 18px;
  padding: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 1220px) {
  .project-management-grid,
  .schedule-grid {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    padding: 18px;
  }

  .nav-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .sidebar-foot {
    margin-top: 0;
  }
}

@media (max-width: 1024px) {
  .app-shell {
    padding: 18px;
  }

  .login-panels,
  .hero-panel,
  .metric-row,
  .detail-grid,
  .bottom-grid,
  .two-col-layout,
  .project-management-grid,
  .projects-layout,
  .reports-layout {
    grid-template-columns: 1fr;
  }

  .showcase-grid,
  .module-grid,
  .week-board,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .schedule-times,
  .schedule-row-top,
  .crew-form-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .project-actions,
  .inline-actions {
    flex-direction: column;
  }

  .login-stage,
  .card-panel,
  .card-soft,
  .topbar,
  .sidebar {
    padding: 16px;
  }

  .login-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .logo-wordmark-login {
    width: min(280px, 100%);
  }

  .nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-actions,
  .sidebar-foot-row {
    flex-direction: column;
    align-items: stretch;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-time {
    min-height: 50px;
  }
}


.booking-layout {
  align-items: start;
}

.crew-panel {
  grid-column: 1 / -1;
}

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

.crew-list {
  display: grid;
  gap: 14px;
}

.crew-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  padding: 16px 18px;
  display: grid;
  gap: 12px;
}

.crew-card-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.crew-card-main p {
  margin: 6px 0 0;
}

.crew-card-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.two-input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.soft-sep {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 1rem 0;
}

.info-box {
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.contact-list,
.chat-list,
.upload-gallery {
  display: grid;
  gap: 0.85rem;
}

.contact-card,
.chat-item,
.upload-item,
.order-item,
.doc-item,
.position-item {
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.contact-card strong,
.chat-item strong,
.upload-item strong,
.order-item strong,
.doc-item strong,
.position-item strong {
  display: block;
  margin-bottom: 0.3rem;
}

.upload-gallery {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 1rem;
}

.upload-thumb {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 14px;
  margin-bottom: 0.5rem;
}

.signature-pad {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.98);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: crosshair;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.admin-user-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-user-table th,
.admin-user-table td {
  padding: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}

.user-stat-badge {
  display: inline-flex;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 178, 24, 0.16);
  color: #ffcf5a;
  font-size: 0.75rem;
}

@media (max-width: 980px) {
  .two-input-row {
    grid-template-columns: 1fr;
  }
}


.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem 1rem;
}

.compact-grid {
  margin-top: 0.25rem;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
  padding: 0.7rem 0.6rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  text-align: left;
}

.matrix-table th {
  font-size: 0.78rem;
  color: var(--text-muted, #aab4c5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== Light redesign overrides for company-facing UI ===== */
:root {
  --bg: #f4f7fb;
  --bg-2: #edf2f8;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: #f7f9fc;
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(214, 156, 26, 0.26);
  --text: #17212f;
  --muted: #64748b;
  --primary: #c98b11;
  --primary-2: #e9b949;
  --primary-3: #fff5da;
  --warning: #d99000;
  --danger: #d95b51;
  --success: #169b63;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(233, 185, 73, 0.16), transparent 24%),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.07), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #eef3f9 100%);
}

body::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.2)),
    radial-gradient(circle at 18% 10%, rgba(233, 185, 73, 0.08), transparent 16%);
}

.bg-scene {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(90deg, transparent, transparent 110px, rgba(15, 23, 42, 0.018) 111px, transparent 112px);
  opacity: 1;
}

input,
select,
textarea {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(201, 139, 17, 0.45);
  box-shadow: 0 0 0 4px rgba(233, 185, 73, 0.14);
  background: #fffdf8;
}

label {
  color: #334155;
}

.card-glass,
.card-panel,
.card-soft {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: var(--shadow);
}

.card-glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.9));
  backdrop-filter: blur(14px);
}

.card-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}

.card-soft {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.login-stage {
  border: 1px solid rgba(15, 23, 42, 0.07);
}

.login-showcase {
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.mini-phone,
.mini-phone.highlight {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 28px rgba(15,23,42,0.06);
}

.mini-label,
.mini-phone p {
  color: #64748b;
}

.workspace {
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,248,252,0.96));
}

.nav-list {
  gap: 8px;
}

.nav-item {
  padding: 13px 14px;
  color: #475569;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(180deg, #fff8e8, #fffdf7);
  color: var(--text);
  border-color: rgba(201, 139, 17, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.nav-icon {
  background: rgba(233, 185, 73, 0.14);
  color: #a96f00;
}

.main-stage {
  gap: 16px;
}

.topbar {
  position: sticky;
  top: 28px;
  z-index: 20;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 30px rgba(15,23,42,0.06);
}

.status-chip,
.date-chip,
.pill {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.08);
}

.tab-panel {
  padding-bottom: 8px;
}

.hero-panel {
  background:
    radial-gradient(circle at top right, rgba(233, 185, 73, 0.12), transparent 26%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.hero-copy h3,
.topbar h2,
.section-head h3,
.metric-card strong,
.hero-stat strong {
  color: #0f172a;
}

.auto-break-hint {
  background: #fff7df;
  border-color: rgba(201, 139, 17, 0.2);
  color: #8a5d00;
}

.metric-card,
.day-column,
.timeline-item,
.report-item,
.project-card,
.module-card,
.schedule-row,
.crew-card,
.info-tile {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary), var(--primary-2));
  opacity: 0.9;
}

.metric-card span,
.info-tile span,
.day-column span,
th,
.module-card p,
.project-card p,
.report-item p,
.timeline-body p,
.empty-state,
.table-empty {
  color: #64748b;
}

.timeline-time,
.module-icon {
  background: #fff5da;
  border-color: rgba(201, 139, 17, 0.18);
  color: #9a6800;
}

.module-card:hover {
  border-color: rgba(201, 139, 17, 0.2);
  background: linear-gradient(180deg, #fffbf1, #ffffff);
}

.day-block {
  background: linear-gradient(180deg, #fff8e6, #ffffff);
  color: var(--text);
  border-color: rgba(201, 139, 17, 0.16);
}

.day-block .block-time,
.day-block small,
.day-empty {
  color: #64748b;
}

.table-wrap {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
}

th,
td {
  border-bottom-color: rgba(15, 23, 42, 0.07);
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
}

tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.7);
}

tr:hover td {
  background: #fff9e9;
}

.btn-secondary {
  background: #f8fafc;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.09);
}

.btn-ghost {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.10);
}

.btn-ghost:hover,
.btn-secondary:hover {
  background: #fff8e8;
  border-color: rgba(201, 139, 17, 0.2);
}

.sidebar-foot {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.soft-sep {
  border: 0;
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 26px 0;
}

.empty-state {
  border-style: solid;
  border-color: rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.table-empty {
  text-align: center;
}

.company-status-banner {
  margin: 12px 0 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(201, 139, 17, 0.18);
  background: #fff8e8;
  color: #8a5d00;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(201,139,17,0.08);
}

.company-status-banner.is-canceled {
  border-color: rgba(217, 91, 81, 0.18);
  background: #fff1ef;
  color: #a33b34;
}

@media (max-width: 1220px) {
  .sidebar,
  .topbar {
    position: static;
  }
}

@media (max-width: 720px) {
  .workspace {
    gap: 14px;
  }

  .topbar,
  .sidebar {
    top: 0;
  }

  .status-chip,
  .date-chip,
  .pill {
    width: 100%;
    justify-content: center;
  }
}


.geo-panel {
  grid-column: 1 / -1;
}

.geo-filter-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 12px 0 18px;
}

.geo-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.6fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.geo-map {
  min-height: 380px;
  border: 1px solid rgba(25, 43, 74, 0.12);
  border-radius: 18px;
  overflow: hidden;
  background: #f5f7fb;
}

.geo-event-list {
  display: grid;
  gap: 12px;
  max-height: 380px;
  overflow: auto;
  padding-right: 4px;
}

.geo-event-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(25, 43, 74, 0.1);
  border-radius: 14px;
  background: #fff;
}

.geo-event-badge,
.geo-map-marker span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #193b72;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 6px 16px rgba(25, 59, 114, 0.22);
}

.geo-event-badge {
  width: 42px;
  height: 42px;
  font-size: 1rem;
}

.geo-event-body p,
.geo-event-body small {
  margin: 4px 0 0;
}

.geo-map-marker {
  background: transparent;
  border: none;
}

@media (max-width: 960px) {
  .geo-layout {
    grid-template-columns: 1fr;
  }

  .geo-map,
  .geo-event-list {
    max-height: none;
  }
}


.workforce-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.9fr);
  gap: 20px;
  align-items: start;
}

.workforce-filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0 18px;
}

.workforce-search {
  grid-column: span 1;
}

.workforce-table-wrap table tbody tr.workforce-row {
  cursor: pointer;
}

.workforce-table-wrap table tbody tr.workforce-row:hover {
  background: rgba(36, 99, 235, 0.06);
}

.workforce-table-wrap table tbody tr.workforce-row.is-selected {
  background: rgba(36, 99, 235, 0.1);
}

.workforce-detail-panel {
  position: sticky;
  top: 20px;
}

.workforce-detail-block {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.compact-head h4 {
  margin: 0;
  font-size: 1rem;
}

.workforce-geo-map {
  min-height: 240px;
  margin-bottom: 12px;
}

@media (max-width: 1180px) {
  .workforce-layout {
    grid-template-columns: 1fr;
  }

  .workforce-detail-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .workforce-filter-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .workforce-filter-row {
    grid-template-columns: 1fr;
  }
}


.workforce-filter-row--extended {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.workforce-filter-row--extended .workforce-search {
  grid-column: span 2;
}

@media (max-width: 980px) {
  .workforce-filter-row--extended .workforce-search {
    grid-column: span 1;
  }
}


/* --- Running time indicator (after clock-in) --- */
.hero-panel.is-running {
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.10);
}

.running-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
  user-select: none;
}

.running-indicator .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(16, 185, 129);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  animation: crewclockPulse 1.2s infinite;
}

.running-indicator .elapsed {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.running-indicator .hint {
  font-weight: 500;
  opacity: 0.75;
  font-size: 0.92em;
}

@keyframes crewclockPulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.00); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.00); }
}

/* Global running chip in topbar (visible on every tab) */
.running-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-weight: 600;
  user-select: none;
}

.running-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(16, 185, 129);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.45);
  animation: crewclockPulse 1.2s infinite;
}

.running-chip .elapsed {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

/* Offline / Sync chip */
.offline-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-weight: 600;
  user-select: none;
}

.offline-chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(245, 158, 11);
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.35);
  animation: crewclockPulse 1.4s infinite;
}

.offline-chip .count {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4px;
  opacity: 0.95;
}

.offline-chip.has-queue {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.33);
}

.offline-chip.is-offline {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.40);
}

/* CrewClock chat rework */
.chat-shell {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1.15rem;
  min-height: 68vh;
  padding: 1rem;
}

.chat-sidebar-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-right: 0.25rem;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.chat-section-head {
  padding: 0.25rem 0.25rem 0 0.25rem;
}

.chat-room-list {
  display: grid;
  gap: 0.65rem;
  overflow: auto;
  padding-right: 0.35rem;
}

.chat-room-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  padding: 0.9rem 0.95rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chat-room-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255,197,61,0.35);
}

.chat-room-item.active {
  background: rgba(255,197,61,0.09);
  border-color: rgba(255,197,61,0.42);
  box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.chat-room-avatar {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #0d1b2f;
  background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(255,197,61,0.95));
  flex-shrink: 0;
}

.chat-room-main {
  min-width: 0;
}

.chat-room-topline,
.chat-room-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.chat-room-name,
.chat-room-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-room-name {
  font-weight: 700;
}

.chat-room-preview {
  color: rgba(255,255,255,0.66);
  font-size: 0.9rem;
}

.chat-room-time {
  color: rgba(255,255,255,0.52);
  font-size: 0.78rem;
  white-space: nowrap;
}

.chat-room-unread {
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 0.45rem;
  display: inline-grid;
  place-items: center;
  background: #ffc53d;
  color: #0d1b2f;
  font-size: 0.76rem;
  font-weight: 700;
}

.chat-main-pane {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

.chat-conversation-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.chat-conversation-meta {
  min-width: 0;
}

.chat-conversation-meta h3,
.chat-conversation-meta p {
  margin: 0;
}

.chat-empty-state {
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 220px;
  padding: 1.5rem;
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.02);
}

.chat-thread {
  min-height: 260px;
  max-height: calc(68vh - 150px);
  overflow: auto;
  padding: 0.4rem 0.2rem 0.4rem 0;
  display: grid;
  align-content: start;
  gap: 0.9rem;
}

.chat-date-divider {
  justify-self: center;
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.68);
  font-size: 0.82rem;
}

.chat-message-row {
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
}

.chat-message-row.mine {
  justify-content: flex-end;
}

.chat-message-row.theirs {
  justify-content: flex-start;
}

.chat-message-card {
  max-width: min(78%, 680px);
  padding: 0.8rem 0.95rem 0.75rem;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

.chat-message-row.mine .chat-message-card {
  background: rgba(255,197,61,0.14);
  border-color: rgba(255,197,61,0.28);
}

.chat-message-author {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
}

.chat-message-author strong {
  display: block;
  margin: 0;
}

.chat-message-time {
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
}

.chat-message-text {
  white-space: pre-wrap;
  line-height: 1.45;
  word-break: break-word;
}

.chat-message-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.chat-composer-field {
  display: block;
}

.chat-composer-field textarea {
  width: 100%;
  min-height: 54px;
  max-height: 180px;
  resize: none;
}

.chat-send-btn {
  min-width: 120px;
}

.chat-empty-thread {
  justify-self: center;
  text-align: center;
  padding: 1.5rem 1rem;
  color: rgba(255,255,255,0.65);
}

@media (max-width: 1100px) {
  .chat-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .chat-sidebar-pane {
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-right: 0;
    padding-bottom: 1rem;
  }

  .chat-room-list {
    grid-template-columns: 1fr;
    max-height: 280px;
  }

  .chat-thread {
    max-height: 50vh;
  }
}

@media (max-width: 720px) {
  .chat-message-card {
    max-width: 92%;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  .chat-send-btn {
    width: 100%;
  }
}

/* ===== CrewClock mobile-native polish ===== */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

html,
body {
  overflow-x: hidden;
}

body {
  -webkit-text-size-adjust: 100%;
}

body.mobile-nav-open {
  overflow: hidden;
}

.app-shell,
.workspace,
.main-stage,
.tab-panel,
.card-panel,
.card-glass,
.card-soft,
.topbar,
.hero-panel,
.chat-shell,
.chat-main-pane,
.chat-sidebar-pane {
  min-width: 0;
}

.app-shell {
  padding: 24px;
  padding-top: max(24px, calc(var(--safe-top) + 16px));
  padding-right: max(24px, calc(var(--safe-right) + 16px));
  padding-bottom: max(24px, calc(var(--safe-bottom) + 16px));
  padding-left: max(24px, calc(var(--safe-left) + 16px));
}

.login-screen {
  min-height: calc(100vh - 48px);
}

.login-stage {
  width: min(620px, 100%);
  padding: 32px;
}

.login-panels,
.login-panels--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 440px;
}

.login-card {
  width: 100%;
}

.login-showcase {
  display: none !important;
}

.sidebar-mobile-head,
.mobile-nav-toggle,
.mobile-nav-backdrop,
.sidebar-close {
  display: none;
}

.sidebar-mobile-head {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.sidebar-close,
.mobile-nav-toggle {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #17212f;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.sidebar-close {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 1rem;
}

.mobile-nav-toggle {
  position: fixed;
  left: max(16px, calc(var(--safe-left) + 12px));
  bottom: max(16px, calc(var(--safe-bottom) + 12px));
  width: 54px;
  height: 54px;
  padding: 0;
  z-index: 60;
  font-size: 1.2rem;
  place-items: center;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(4px);
  z-index: 44;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.workspace {
  grid-template-columns: 290px minmax(0, 1fr);
  align-items: start;
}

.topbar {
  top: max(16px, calc(var(--safe-top) + 8px));
}

.chat-shell {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-sidebar-pane {
  border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-room-item,
.chat-message-card,
.chat-empty-state,
.chat-date-divider {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.chat-room-item.active {
  background: linear-gradient(180deg, #fff8e8, #ffffff);
  border-color: rgba(201, 139, 17, 0.26);
  box-shadow: 0 12px 28px rgba(201, 139, 17, 0.12);
}

.chat-room-avatar {
  color: #17212f;
  background: linear-gradient(135deg, #fffaf0, #f5d27d);
}

.chat-room-preview,
.chat-room-time,
.chat-message-time,
.chat-empty-thread,
.chat-date-divider {
  color: #64748b;
}

.chat-conversation-head,
.chat-composer {
  border-color: rgba(15, 23, 42, 0.08);
}

.chat-message-row.mine .chat-message-card {
  background: linear-gradient(180deg, #fff8e8, #fffdf6);
  border-color: rgba(201, 139, 17, 0.24);
}

.chat-message-row.theirs .chat-message-card {
  background: #ffffff;
}

.chat-message-text {
  color: #17212f;
}

.chat-empty-state,
.chat-empty-thread {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

@media (max-width: 1220px) {
  .workspace {
    grid-template-columns: 1fr !important;
  }

  .sidebar,
  .topbar {
    position: static;
  }
}

@media (max-width: 980px) {
  .app-shell {
    padding: 14px;
    padding-top: max(14px, calc(var(--safe-top) + 8px));
    padding-right: max(14px, calc(var(--safe-right) + 8px));
    padding-bottom: max(18px, calc(var(--safe-bottom) + 10px));
    padding-left: max(14px, calc(var(--safe-left) + 8px));
  }

  .login-screen {
    min-height: calc(100vh - 28px);
  }

  .login-stage {
    width: 100%;
    max-width: 480px;
    padding: 22px;
    border-radius: 28px;
  }

  .login-brand {
    gap: 14px;
    margin-bottom: 18px;
  }

  .login-brand h1 {
    font-size: 1.65rem;
    line-height: 1.18;
    margin-bottom: 10px;
  }

  .login-copy {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .workspace {
    position: relative;
    gap: 14px;
  }

  .mobile-nav-toggle,
  .sidebar-mobile-head,
  .sidebar-close {
    display: grid;
  }

  .mobile-nav-toggle {
    display: grid;
  }

  .mobile-nav-backdrop {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: max(10px, calc(var(--safe-top) + 6px));
    left: max(10px, calc(var(--safe-left) + 6px));
    bottom: max(10px, calc(var(--safe-bottom) + 6px));
    width: min(84vw, 320px);
    max-width: 320px;
    z-index: 50;
    transform: translateX(calc(-100% - 24px));
    transition: transform 0.24s ease;
    overflow: auto;
    padding: 16px;
    border-radius: 28px;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
  }

  .sidebar-brand {
    display: none;
  }

  .workspace.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .workspace.mobile-nav-open .mobile-nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .sidebar-foot {
    margin-top: 6px;
  }

  .main-stage {
    width: 100%;
  }

  .topbar {
    position: relative;
    top: 0;
    gap: 14px;
    padding: 18px;
    border-radius: 24px;
  }

  .topbar h2 {
    font-size: 1.7rem;
    line-height: 1.15;
  }

  .topbar-meta {
    width: 100%;
    gap: 10px;
  }

  .status-chip,
  .date-chip,
  .pill,
  .running-chip,
  .offline-chip {
    min-height: 42px;
  }

  .hero-panel,
  .metric-row,
  .detail-grid,
  .bottom-grid,
  .two-col-layout,
  .project-management-grid,
  .projects-layout,
  .reports-layout,
  .geo-layout,
  .workforce-layout,
  .chat-shell {
    grid-template-columns: 1fr !important;
  }

  .metric-row,
  .module-grid,
  .info-grid,
  .schedule-grid,
  .week-board,
  .workforce-filter-row {
    grid-template-columns: 1fr 1fr;
  }

  .chat-shell {
    gap: 14px;
    min-height: auto;
    padding: 16px;
  }

  .chat-sidebar-pane {
    border-right: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding-right: 0;
    padding-bottom: 14px;
  }

  .chat-room-list {
    max-height: 240px;
    padding-right: 0;
  }

  .chat-thread {
    max-height: 48vh;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
    padding-top: max(10px, calc(var(--safe-top) + 4px));
    padding-right: max(10px, calc(var(--safe-right) + 4px));
    padding-bottom: max(12px, calc(var(--safe-bottom) + 6px));
    padding-left: max(10px, calc(var(--safe-left) + 4px));
  }

  .login-stage,
  .card-panel,
  .card-soft,
  .topbar,
  .sidebar,
  .chat-shell {
    padding: 14px;
  }

  .logo-wordmark-login {
    width: min(230px, 100%);
  }

  .login-brand h1 {
    font-size: 1.4rem;
  }

  .login-copy {
    display: none;
  }

  .topbar h2 {
    font-size: 1.45rem;
  }

  .topbar-meta,
  .hero-actions,
  .sidebar-foot-row,
  .project-actions,
  .inline-actions,
  .schedule-row-top,
  .chat-composer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .project-actions .btn,
  .inline-actions .btn,
  .chat-send-btn {
    width: 100%;
  }

  .metric-row,
  .module-grid,
  .info-grid,
  .schedule-grid,
  .week-board,
  .workforce-filter-row,
  .crew-form-grid,
  .schedule-times,
  .two-input-row {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .chat-room-item {
    grid-template-columns: 44px minmax(0, 1fr);
    padding: 0.8rem;
  }

  .chat-room-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .chat-message-card {
    max-width: 92%;
    border-radius: 18px;
  }

  .chat-thread {
    max-height: 44vh;
  }

  .mobile-nav-toggle {
    width: 50px;
    height: 50px;
  }
}


/* ===== CrewClock web landing + login split ===== */
.web-only {
  display: block;
}

body.is-native .web-only {
  display: none !important;
}

.landing-screen {
  display: grid;
  min-height: calc(100vh - 56px);
  place-items: center;
}

.landing-stage {
  width: min(1280px, 100%);
  padding: 42px;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.landing-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 8px 6px;
}

.landing-wordmark {
  width: clamp(240px, 30vw, 390px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.24));
}

.landing-copy h1 {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.02;
  margin: 0;
  letter-spacing: -0.04em;
}

.landing-text {
  max-width: 720px;
  font-size: 1.05rem;
}

.landing-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.landing-preview {
  display: grid;
  gap: 16px;
}

.landing-feature {
  min-height: 0;
}

.landing-feature h3 {
  margin-bottom: 8px;
}

.login-toolbar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 18px;
}

body.is-web .app-shell {
  padding: 40px;
}

body.is-web .login-screen {
  min-height: calc(100vh - 56px);
}

body.is-web .login-stage {
  width: min(1280px, 100%);
  padding: 38px;
}

body.is-web .login-panels {
  grid-template-columns: 1.3fr 0.9fr;
  gap: 22px;
  max-width: none;
}

body.is-web .login-card {
  width: auto;
}

body.is-web .login-showcase {
  display: block !important;
}

body.is-native .app-shell {
  padding: 24px;
  padding-top: max(24px, calc(var(--safe-top) + 16px));
  padding-right: max(24px, calc(var(--safe-right) + 16px));
  padding-bottom: max(24px, calc(var(--safe-bottom) + 16px));
  padding-left: max(24px, calc(var(--safe-left) + 16px));
}

body.is-native .login-screen {
  min-height: calc(100vh - 48px);
}

body.is-native .login-stage {
  width: min(620px, 100%);
  padding: 32px;
}

body.is-native .login-panels,
body.is-native .login-panels--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 440px;
}

body.is-native .login-card {
  width: 100%;
}

body.is-native .login-showcase {
  display: none !important;
}

body.is-native .landing-screen {
  display: none !important;
}

@media (max-width: 1100px) {
  body.is-web .landing-hero,
  body.is-web .login-panels {
    grid-template-columns: minmax(0, 1fr);
  }

  body.is-web .landing-stage,
  body.is-web .login-stage {
    width: min(760px, 100%);
  }

  body.is-web .login-showcase {
    display: none !important;
  }
}

@media (max-width: 720px) {
  body.is-web .app-shell {
    padding: 18px;
  }

  .landing-stage,
  body.is-web .login-stage {
    padding: 24px;
    border-radius: 28px;
  }

  .landing-copy h1 {
    font-size: 2.35rem;
  }

  .landing-wordmark,
  .logo-wordmark-login {
    width: min(260px, 100%);
  }

  .login-toolbar {
    margin-bottom: 14px;
  }
}

/* --- Web overhaul March 2026 --- */
.booking-layout {
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.booking-layout .table-panel,
.booking-layout .crew-panel,
.booking-layout .geo-panel {
  grid-column: 1 / -1;
}

.booking-head-actions {
  align-items: center;
}

.project-management-grid {
  grid-template-columns: minmax(360px, 440px) minmax(360px, 440px);
}

.project-overview-panel {
  padding: 26px;
}

.project-card-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  border: 1px solid rgba(212, 165, 40, 0.16);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.contact-list {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contact-card {
  padding: 18px;
  border: 1px solid rgba(212, 165, 40, 0.14);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.contact-card .inline-actions {
  margin-top: 14px;
}

.workforce-group-summary {
  min-width: 280px;
}

.workforce-group-summary .muted {
  line-height: 1.45;
  margin-top: 6px;
}

.chat-shell {
  grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.62));
}

.chat-sidebar-pane,
.chat-main-pane {
  background: rgba(255,255,255,0.58);
}

.chat-thread {
  background-image: radial-gradient(rgba(212, 165, 40, 0.08) 1px, transparent 1px);
  background-size: 18px 18px;
}

.chat-message-card {
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.chat-message-row.mine .chat-message-card {
  border-color: rgba(212, 165, 40, 0.22);
}

.week-board--top {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

@media (max-width: 1100px) {
  .project-management-grid,
  .booking-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Web pages overhaul v2 --- */
.project-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 420px);
  gap: 18px;
}

.project-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.project-toolbar-panel,
.project-overview-panel,
.contact-overview-panel,
.chat-shell {
  background: linear-gradient(180deg, rgba(255,255,255,0.84), rgba(255,255,255,0.74));
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

.project-stat-card,
.project-toolbar-panel,
.project-overview-panel,
.contact-overview-panel,
.contact-card,
.chat-room-item,
.chat-message-card,
.workforce-segment-card {
  color: #1f2937;
}

.project-stat-card span,
.project-toolbar-panel .muted,
.project-overview-panel .muted,
.contact-overview-panel .muted,
.contact-card .muted,
.chat-room-preview,
.chat-room-time,
.chat-message-time,
.workforce-segment-card .muted,
.workforce-segment-card span {
  color: #64748b;
}

.project-stat-card strong {
  font-size: 2.15rem;
  color: #0f172a;
}

.project-toolbar-grid,
.contact-toolbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

.project-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(248,250,252,0.96));
  border: 1px solid rgba(212, 165, 40, 0.18);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.project-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.project-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.project-meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(212, 165, 40, 0.10);
  color: #8a5a00;
  font-size: 0.82rem;
  font-weight: 600;
}

.contact-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.contact-stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(212, 165, 40, 0.10);
  color: #8a5a00;
}

.contact-stat-pill strong {
  font-size: 1rem;
  color: #0f172a;
}

.contact-card {
  display: grid;
  gap: 14px;
}

.contact-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

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

.contact-card-grid div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.contact-card-grid span,
.workforce-segment-grid span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.contact-card-grid a {
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
}

.chat-shell {
  border-radius: 26px;
  overflow: hidden;
}

.chat-sidebar-pane,
.chat-main-pane {
  background: rgba(255,255,255,0.48);
  border-radius: 22px;
  padding: 12px;
}

.chat-room-search span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 0.84rem;
}

.chat-room-search input,
.chat-composer-field textarea {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.chat-room-item {
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.chat-room-item.active {
  background: rgba(255, 197, 61, 0.16);
  border-color: rgba(212, 165, 40, 0.35);
}

.chat-thread {
  background-image:
    radial-gradient(rgba(212, 165, 40, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(248,250,252,0.74), rgba(255,255,255,0.66));
  background-size: 18px 18px, auto;
  border-radius: 18px;
  padding: 16px;
}

.chat-message-card {
  position: relative;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.chat-message-row.theirs .chat-message-card::before,
.chat-message-row.mine .chat-message-card::before {
  content: '';
  position: absolute;
  top: 14px;
  width: 14px;
  height: 14px;
  background: inherit;
  border-top: inherit;
  border-left: inherit;
}

.chat-message-row.theirs .chat-message-card::before {
  left: -7px;
  transform: rotate(-45deg);
}

.chat-message-row.mine .chat-message-card {
  background: rgba(255, 197, 61, 0.18);
}

.chat-message-row.mine .chat-message-card::before {
  right: -7px;
  left: auto;
  transform: rotate(135deg);
}

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

.workforce-segment-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(248,250,252,0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

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

.workforce-segment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 10px;
}

.workforce-segment-grid > div {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(15, 23, 42, 0.06);
}

@media (max-width: 1180px) {
  .project-dashboard-grid,
  .project-toolbar-grid,
  .contact-toolbar-grid,
  .project-quick-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .contact-card-grid,
  .workforce-segment-grid {
    grid-template-columns: 1fr;
  }
}


/* --- Web cleanup v3: coherent desktop layout, web only --- */
body.is-web {
  --page-bg: linear-gradient(180deg, #f4f5f7 0%, #eef1f4 100%);
  --panel-bg: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.96));
  --panel-bg-soft: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(248,250,252,0.88));
  --panel-line: rgba(15, 23, 42, 0.08);
  --panel-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  --panel-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  color: #172033;
  background: var(--page-bg);
}

body.is-web::before,
body.is-web .bg-scene {
  opacity: 0;
}

body.is-web .card-glass,
body.is-web .card-panel,
body.is-web .card-soft,
body.is-web .topbar,
body.is-web .sidebar {
  background: var(--panel-bg);
  border-color: var(--panel-line);
  box-shadow: var(--panel-shadow);
  color: #172033;
}

body.is-web .card-soft {
  background: var(--panel-bg-soft);
  box-shadow: var(--panel-shadow-soft);
}

body.is-web .muted,
body.is-web .small,
body.is-web .form-hint,
body.is-web .table-empty,
body.is-web .empty-state,
body.is-web .contact-card-grid span,
body.is-web .workforce-segment-grid span,
body.is-web .chat-room-preview,
body.is-web .chat-room-time,
body.is-web .chat-message-time,
body.is-web .project-stat-card p {
  color: #64748b;
}

body.is-web .main-stage {
  gap: 22px;
}

body.is-web .topbar {
  padding: 24px 28px;
}

body.is-web .topbar h2 {
  margin-bottom: 8px;
}

body.is-web .tab-panel.active,
body.is-web .overview-grid,
body.is-web .content-grid,
body.is-web .projects-page,
body.is-web .booking-layout,
body.is-web .contacts-layout,
body.is-web .workforce-layout,
body.is-web .admin-layout {
  gap: 22px;
  align-items: start;
}

body.is-web .metric-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body.is-web .metric-card {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 4px solid rgba(212, 165, 40, 0.85);
}

body.is-web .metric-card strong {
  font-size: 2rem;
  color: #172033;
}

body.is-web .overview-grid {
  display: grid;
  grid-template-columns: 1fr;
}

body.is-web .detail-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

body.is-web .week-board,
body.is-web .week-board--top {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

body.is-web .day-column,
body.is-web .timeline-item,
body.is-web .project-card,
body.is-web .contact-card,
body.is-web .chat-room-item,
body.is-web .chat-message-card,
body.is-web .workforce-segment-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: var(--panel-shadow-soft);
}

body.is-web .booking-layout {
  grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
}

body.is-web .booking-layout > .table-panel {
  grid-column: 1 / -1;
}

body.is-web .booking-layout .form-panel,
body.is-web .contact-form-panel,
body.is-web .project-form-panel,
body.is-web #workforceDetailPanel {
  position: sticky;
  top: 24px;
}

body.is-web .table-panel table {
  table-layout: fixed;
}

body.is-web .table-panel th,
body.is-web .table-panel td {
  vertical-align: top;
}

body.is-web .table-panel td:nth-child(4),
body.is-web .table-panel td:nth-child(8) {
  word-break: break-word;
}

body.is-web .projects-page {
  display: grid;
  grid-template-columns: 1fr;
}

body.is-web .project-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}

body.is-web .project-quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

body.is-web .project-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 420px);
  gap: 22px;
  align-items: start;
}

body.is-web .project-overview-panel,
body.is-web .contact-overview-panel,
body.is-web .table-panel,
body.is-web .info-panel,
body.is-web .timeline-panel,
body.is-web .weekboard-top,
body.is-web .hero-panel {
  min-width: 0;
}

body.is-web .project-overview-panel {
  min-height: 640px;
}

body.is-web .project-toolbar-grid,
body.is-web .contact-toolbar-grid {
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
}

body.is-web .project-card-list,
body.is-web .contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

body.is-web .project-card {
  padding: 20px;
}

body.is-web .project-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

body.is-web .project-card strong,
body.is-web .contact-card strong,
body.is-web .section-head h3,
body.is-web h2,
body.is-web h3 {
  color: #172033;
}

body.is-web .project-meta-chip,
body.is-web .contact-stat-pill,
body.is-web .pill-muted {
  background: rgba(212, 165, 40, 0.10);
  color: #8a5a00;
  border-color: rgba(212, 165, 40, 0.18);
}

body.is-web .contacts-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(360px, 420px);
  gap: 22px;
  align-items: start;
}

body.is-web .contact-overview-panel {
  min-height: 620px;
}

body.is-web .contact-card {
  gap: 14px;
  padding: 18px;
}

body.is-web .contact-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body.is-web .contact-card-grid div,
body.is-web .workforce-segment-grid > div {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

body.is-web .chat-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 18px;
  min-height: 720px;
  padding: 18px;
  overflow: hidden;
}

body.is-web .chat-sidebar-pane,
body.is-web .chat-main-pane {
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 24px;
  min-height: 0;
}

body.is-web .chat-sidebar-pane {
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
}

body.is-web .chat-room-list {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

body.is-web .chat-main-pane {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

body.is-web .chat-thread {
  min-height: 420px;
  max-height: calc(100vh - 380px);
  overflow: auto;
  border-radius: 22px;
  padding: 18px;
  background: linear-gradient(180deg, #fbfcfd 0%, #f3f6f8 100%);
}

body.is-web .chat-message-card {
  max-width: min(72%, 620px);
}

body.is-web .chat-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

body.is-web .chat-composer-field textarea {
  min-height: 58px;
  max-height: 160px;
  resize: vertical;
  background: #fff;
}

body.is-web .workforce-layout {
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 430px);
}

body.is-web .workforce-list-panel {
  min-height: 720px;
}

body.is-web .workforce-table-wrap {
  max-height: calc(100vh - 360px);
  overflow: auto;
}

body.is-web .workforce-row td {
  cursor: pointer;
}

body.is-web .admin-layout {
  grid-template-columns: minmax(380px, 430px) minmax(0, 1fr);
}

body.is-web #adminTimeToolsMount {
  display: grid;
  gap: 18px;
}

body.is-web #adminTimeToolsMount > .card-panel,
body.is-web #adminTimeToolsMount > .form-panel {
  margin: 0;
}

body.is-web #schedulePanel {
  position: static;
}

body.is-web .sidebar {
  width: 288px;
}

body.is-web .sidebar .nav-list {
  gap: 10px;
}

body.is-web .nav-item {
  min-height: 60px;
  justify-content: flex-start;
}

body.is-web input,
body.is-web select,
body.is-web textarea {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: #172033;
}

body.is-web input::placeholder,
body.is-web textarea::placeholder {
  color: #94a3b8;
}

body.is-web .btn-secondary,
body.is-web .btn-ghost {
  color: #172033;
}

body.is-web .btn-secondary {
  background: rgba(212, 165, 40, 0.10);
  border-color: rgba(212, 165, 40, 0.18);
}

body.is-web .btn-ghost {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.10);
}

body.is-web .table-wrap table thead th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
}

body.is-web .empty-state {
  background: #f8fafc;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

@media (max-width: 1360px) {
  body.is-web .project-dashboard-grid {
    grid-template-columns: 1fr;
  }

  body.is-web .project-quick-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  body.is-web .metric-row,
  body.is-web .detail-grid,
  body.is-web .booking-layout,
  body.is-web .project-management-grid,
  body.is-web .contacts-layout,
  body.is-web .workforce-layout,
  body.is-web .admin-layout,
  body.is-web .chat-shell {
    grid-template-columns: 1fr;
  }

  body.is-web .booking-layout .form-panel,
  body.is-web .contact-form-panel,
  body.is-web .project-form-panel,
  body.is-web #workforceDetailPanel {
    position: static;
  }

  body.is-web .chat-thread,
  body.is-web .workforce-table-wrap {
    max-height: none;
  }
}

@media (max-width: 760px) {
  body.is-web .metric-row,
  body.is-web .project-quick-stats,
  body.is-web .project-card-list,
  body.is-web .contact-list,
  body.is-web .contact-card-grid,
  body.is-web .workforce-segment-grid {
    grid-template-columns: 1fr;
  }

  body.is-web .project-toolbar-grid,
  body.is-web .contact-toolbar-grid,
  body.is-web .chat-composer {
    grid-template-columns: 1fr;
  }
}

/* --- Web cleanup v4: coherent desktop system across all pages --- */
body.is-web {
  --page-max: 1560px;
  --sidebar-w: 250px;
  --gap-web: 20px;
}

body.is-web .app-shell {
  padding: 20px;
}

body.is-web .workspace {
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

body.is-web .sidebar {
  width: var(--sidebar-w);
  position: sticky;
  top: 20px;
  min-height: calc(100vh - 40px);
  padding: 18px;
  gap: 18px;
}

body.is-web .sidebar-brand {
  min-height: 52px;
}

body.is-web .nav-item {
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.95rem;
}

body.is-web .nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

body.is-web .main-stage {
  width: min(100%, var(--page-max));
  margin-right: auto;
  gap: var(--gap-web);
}

body.is-web .topbar,
body.is-web .tab-panel.active {
  width: 100%;
}

body.is-web .topbar {
  padding: 22px 24px;
  min-height: 108px;
}

body.is-web .topbar-meta {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.is-web .card-panel,
body.is-web .card-glass,
body.is-web .card-soft {
  border-radius: 24px;
}

body.is-web .section-head {
  margin-bottom: 16px;
}

body.is-web .section-head h3 {
  font-size: 1.45rem;
}

body.is-web .hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  align-items: stretch;
  gap: 18px;
}

body.is-web .hero-actions {
  flex-wrap: wrap;
}

body.is-web .hero-stat {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.is-web .metric-row {
  gap: 16px;
}

body.is-web .metric-card {
  min-height: 116px;
  padding: 18px 20px;
}

body.is-web .weekboard-top,
body.is-web .info-panel,
body.is-web .timeline-panel,
body.is-web .project-overview-panel,
body.is-web .report-list-panel,
body.is-web .contact-overview-panel,
body.is-web .table-panel,
body.is-web .workforce-list-panel,
body.is-web .admin-users-table-card,
body.is-web .admin-role-card {
  min-height: 0;
}

body.is-web .day-column {
  min-height: 168px;
}

body.is-web .timeline-list {
  min-height: 180px;
}

/* Booking */
body.is-web .booking-layout {
  grid-template-columns: 390px minmax(0, 1fr);
  align-items: start;
}

body.is-web .booking-layout > .table-panel {
  grid-column: 2;
  grid-row: 1 / span 3;
}

body.is-web #officeBookingTools,
body.is-web #geoMapPanel,
body.is-web #crewPanel {
  grid-column: 1;
}

body.is-web .form-panel {
  padding: 22px;
}

body.is-web .table-panel {
  padding: 20px;
}

body.is-web .table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255,255,255,0.72);
}

body.is-web .table-wrap table {
  min-width: 880px;
}

body.is-web .table-wrap table tbody td {
  padding-top: 14px;
  padding-bottom: 14px;
}

body.is-web .booking-layout .table-wrap {
  max-height: calc(100vh - 260px);
}

body.is-web .geo-layout {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
}

/* Projects */
body.is-web .projects-page {
  gap: 18px;
}

body.is-web .project-dashboard-grid {
  grid-template-columns: minmax(0, 1fr) 320px;
}

body.is-web .project-quick-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

body.is-web .project-toolbar-panel {
  height: 100%;
}

body.is-web .project-toolbar-grid {
  grid-template-columns: 1fr;
}

body.is-web .project-management-grid {
  grid-template-columns: minmax(0, 1.55fr) 380px;
}

body.is-web .project-card-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.is-web .project-card {
  min-height: 230px;
}

/* Reports */
body.is-web .reports-layout {
  grid-template-columns: 390px minmax(0, 1fr);
  align-items: start;
}

body.is-web .reports-layout > .report-list-panel {
  grid-column: 1 / -1;
}

body.is-web #uploadGallery {
  min-height: 160px;
}

body.is-web .report-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Contacts */
body.is-web .contacts-layout {
  grid-template-columns: minmax(0, 1.5fr) 360px;
}

body.is-web .contact-list {
  grid-template-columns: 1fr;
}

body.is-web .contact-card {
  padding: 20px;
}

body.is-web .contact-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Material / Documents */
body.is-web #tab-material .two-col-layout,
body.is-web #tab-documents .two-col-layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: start;
}

body.is-web #tab-material .report-list,
body.is-web #tab-documents .report-list {
  display: grid;
  gap: 14px;
}

body.is-web .signature-pad {
  width: 100%;
  max-width: 460px;
}

/* Chat */
body.is-web .chat-shell {
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 740px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(248,250,252,0.92));
}

body.is-web .chat-sidebar-pane,
body.is-web .chat-main-pane {
  border-radius: 22px;
  background: rgba(255,255,255,0.82);
}

body.is-web .chat-room-item {
  padding: 14px;
  border-radius: 18px;
}

body.is-web .chat-room-item.active {
  border-color: rgba(212, 165, 40, 0.28);
  background: linear-gradient(180deg, rgba(246,232,196,0.5), rgba(255,255,255,0.96));
}

body.is-web .chat-thread {
  background:
    radial-gradient(circle at 1px 1px, rgba(148,163,184,0.10) 1px, transparent 0),
    linear-gradient(180deg, #fbfcfd 0%, #f6f8fa 100%);
  background-size: 22px 22px, auto;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

body.is-web .chat-message-card {
  border-radius: 18px;
  padding: 12px 14px;
}

body.is-web .chat-message-card.is-own,
body.is-web .chat-message-out {
  background: linear-gradient(180deg, rgba(246,232,196,0.72), rgba(255,251,242,0.96));
  border-color: rgba(212, 165, 40, 0.18);
}

body.is-web .chat-conversation-head {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

body.is-web .chat-composer {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,0.88);
  padding-top: 12px;
}

/* Workforce */
body.is-web .workforce-layout {
  grid-template-columns: minmax(0, 1.35fr) 380px;
}

body.is-web .workforce-detail-panel {
  position: sticky;
  top: 20px;
}

body.is-web .workforce-filter-row--extended {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

body.is-web .workforce-search {
  grid-column: span 2;
}

body.is-web .workforce-list-panel {
  padding: 20px;
}

/* Admin */
body.is-web .admin-page-shell {
  display: grid;
  gap: 20px;
}

body.is-web .admin-main-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

body.is-web .admin-side-stack,
body.is-web .admin-main-stack {
  display: grid;
  gap: 20px;
}

body.is-web .admin-users-table-card .table-wrap,
body.is-web .admin-role-card .table-wrap {
  max-height: none;
}

body.is-web .admin-user-card,
body.is-web .admin-position-card,
body.is-web .admin-users-table-card,
body.is-web .admin-role-card,
body.is-web .admin-export-card,
body.is-web .admin-platform-card,
body.is-web .admin-tools-section {
  min-height: 0;
}

body.is-web .admin-tools-section {
  display: grid;
  gap: 14px;
}

body.is-web .admin-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 18px;
}

body.is-web .admin-tools-grid > .card-panel,
body.is-web .admin-tools-grid > .form-panel,
body.is-web .admin-tools-grid > article,
body.is-web .admin-tools-grid > section {
  margin: 0;
}

body.is-web .admin-tools-grid .schedule-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-web .admin-tools-grid .geo-layout {
  grid-template-columns: minmax(0, 1fr);
}

body.is-web .admin-footer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

body.is-web .admin-export-card .inline-actions {
  gap: 10px;
}

body.is-web .wrap-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.is-web .info-box {
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

body.is-web .permission-grid.compact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.is-web .checkline {
  align-items: center;
}

/* Better page scaling on slightly smaller screens */
@media (max-width: 1460px) {
  body.is-web {
    --page-max: 1380px;
  }

  body.is-web .project-card-list,
  body.is-web .report-list {
    grid-template-columns: 1fr;
  }

  body.is-web .workforce-filter-row--extended {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.is-web .workforce-search {
    grid-column: auto;
  }
}

@media (max-width: 1240px) {
  body.is-web .hero-panel,
  body.is-web .booking-layout,
  body.is-web .reports-layout,
  body.is-web .contacts-layout,
  body.is-web .workforce-layout,
  body.is-web .admin-main-grid,
  body.is-web .admin-footer-grid {
    grid-template-columns: 1fr;
  }

  body.is-web .booking-layout > .table-panel {
    grid-column: auto;
    grid-row: auto;
  }

  body.is-web .booking-layout .table-wrap {
    max-height: none;
  }

  body.is-web .project-management-grid {
    grid-template-columns: 1fr;
  }

  body.is-web .project-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  body.is-web .workspace {
    grid-template-columns: 1fr;
  }

  body.is-web .sidebar {
    position: static;
    width: 100%;
    min-height: auto;
  }

  body.is-web .metric-row,
  body.is-web .project-quick-stats,
  body.is-web .contact-card-grid,
  body.is-web .permission-grid.compact-grid,
  body.is-web .admin-tools-grid {
    grid-template-columns: 1fr;
  }

  body.is-web .project-card-list,
  body.is-web .report-list,
  body.is-web #tab-material .two-col-layout,
  body.is-web #tab-documents .two-col-layout,
  body.is-web .chat-shell {
    grid-template-columns: 1fr;
  }
}

/* --- Web cleanup v4.1: projects + personal timesheet --- */
body.is-web .section-head--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

body.is-web .project-management-grid--simple {
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 420px);
  align-items: start;
}

body.is-web .project-overview-panel {
  min-height: 0;
}

body.is-web .project-inline-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 190px;
  gap: 12px;
  width: min(100%, 640px);
  align-items: end;
}

body.is-web .project-inline-toolbar label,
body.is-web .timesheet-filter-bar label {
  display: grid;
  gap: 8px;
}

body.is-web .timesheet-filter-bar {
  display: grid;
  grid-template-columns: 180px 140px 190px 190px 160px 180px;
  gap: 12px;
  margin: 6px 0 18px;
  align-items: end;
}

body.is-web .timesheet-filter-bar span,
body.is-web .project-inline-toolbar span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

body.is-web .project-card-list {
  margin-top: 10px;
}

body.is-web .project-card {
  min-height: 0;
}

@media (max-width: 1280px) {
  body.is-web .project-management-grid--simple {
    grid-template-columns: 1fr;
  }

  body.is-web .project-inline-toolbar,
  body.is-web .timesheet-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
}

@media (max-width: 760px) {
  body.is-web .project-inline-toolbar,
  body.is-web .timesheet-filter-bar {
    grid-template-columns: 1fr;
  }
}

/* --- Landing redesign override --- */
.landing-screen {
  --landing-panel: rgba(10, 14, 21, 0.9);
  --landing-panel-strong: rgba(7, 10, 16, 0.97);
  --landing-panel-soft: rgba(14, 19, 29, 0.88);
  --landing-line: rgba(204, 162, 85, 0.16);
  --landing-line-strong: rgba(204, 162, 85, 0.3);
  --landing-text: #f5f0e8;
  --landing-muted: #98a5b7;
  --landing-accent: #cca255;
  --landing-accent-strong: #e0bc82;
  position: relative;
  display: block;
  min-height: calc(100vh - 56px);
  isolation: isolate;
}

.landing-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at top left, rgba(204, 162, 85, 0.16), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(83, 112, 166, 0.18), transparent 22%),
    linear-gradient(180deg, #06080d 0%, #0a0f16 38%, #090d13 100%);
}

.landing-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.44;
  background:
    linear-gradient(180deg, rgba(5, 7, 10, 0), rgba(5, 7, 10, 0.35)),
    repeating-linear-gradient(90deg, transparent, transparent 138px, rgba(255, 255, 255, 0.035) 139px, transparent 140px);
}

.landing-screen .muted,
.landing-screen .small {
  color: var(--landing-muted);
}

.landing-screen .eyebrow {
  color: var(--landing-accent-strong);
  letter-spacing: 0.14em;
}

.landing-screen .btn-ghost,
.landing-screen .btn-ghost:visited {
  color: var(--landing-text);
}

.landing-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 26px;
}

.landing-shell > * {
  opacity: 0;
  transform: translateY(24px);
  animation: landing-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.landing-shell > *:nth-child(2) { animation-delay: 0.06s; }
.landing-shell > *:nth-child(3) { animation-delay: 0.12s; }
.landing-shell > *:nth-child(4) { animation-delay: 0.18s; }
.landing-shell > *:nth-child(5) { animation-delay: 0.24s; }
.landing-shell > *:nth-child(6) { animation-delay: 0.3s; }

.landing-topbar,
.landing-stage,
.landing-story-card,
.landing-section,
.landing-flow-panel,
.landing-detail-card,
.landing-cta-panel,
.landing-value-card,
.landing-hero-panel,
.landing-proof-card,
.landing-system-card,
.landing-module-card,
.landing-compliance-panel {
  position: relative;
  overflow: hidden;
  color: var(--landing-text);
}

.landing-topbar.card-glass,
.landing-stage.card-glass,
.landing-story-card.card-glass,
.landing-section.card-glass,
.landing-flow-panel.card-glass,
.landing-detail-card.card-glass,
.landing-cta-panel.card-glass {
  background:
    radial-gradient(circle at top right, rgba(204, 162, 85, 0.11), transparent 26%),
    linear-gradient(180deg, rgba(9, 12, 18, 0.98), rgba(7, 10, 15, 0.95));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 28px 96px rgba(0, 0, 0, 0.42);
}

.landing-value-card.card-panel,
.landing-hero-panel.card-panel,
.landing-proof-card.card-panel,
.landing-system-card.card-panel,
.landing-module-card.card-panel,
.landing-compliance-panel.card-panel,
.landing-mobile-card,
.landing-office-card,
.landing-target-card {
  background:
    linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

.landing-topbar::before,
.landing-stage::before,
.landing-story-card::before,
.landing-section::before,
.landing-flow-panel::before,
.landing-detail-card::before,
.landing-cta-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.02), transparent 34%),
    radial-gradient(circle at bottom left, rgba(77, 101, 145, 0.12), transparent 32%);
}

.landing-topbar {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  position: sticky;
  top: 18px;
  z-index: 6;
}

.landing-topbar-brand,
.landing-topbar-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.landing-topbar-copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.landing-topbar-copy .eyebrow {
  margin-bottom: 0;
}

.landing-topbar-copy strong {
  font-size: 0.96rem;
  line-height: 1.3;
  color: var(--landing-text);
}

.landing-wordmark {
  width: clamp(148px, 15vw, 220px);
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}

.landing-toplinks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.landing-toplink {
  color: var(--landing-muted);
  text-decoration: none;
  font-weight: 700;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.landing-toplink:hover {
  color: var(--landing-text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--landing-line);
}

.landing-topbar .btn-primary,
.landing-stage .btn-primary,
.landing-cta-panel .btn-primary {
  background: linear-gradient(135deg, #b98944, #deb878);
  color: #10161f;
  box-shadow: 0 14px 34px rgba(185, 137, 68, 0.25);
}

.landing-stage .btn-ghost,
.landing-cta-panel .btn-ghost {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--landing-line);
}

.landing-stage {
  padding: 54px;
}

.landing-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  gap: 32px;
  align-items: end;
}

.landing-copy,
.landing-hero-side,
.landing-route-list,
.landing-flow-list,
.landing-system-grid,
.landing-modules,
.landing-mobile-matrix,
.landing-office-metrics,
.landing-cta-actions {
  display: grid;
  gap: 16px;
}

.landing-copy {
  gap: 18px;
  align-content: end;
}

.landing-copy h1,
.landing-story-card h2,
.landing-section h2,
.landing-flow-panel h2,
.landing-detail-card h2,
.landing-cta-copy h2,
.landing-hero-panel h2 {
  margin: 0;
  color: var(--landing-text);
  letter-spacing: -0.055em;
}

.landing-copy h1 {
  font-size: clamp(3.7rem, 6.2vw, 6.4rem);
  line-height: 0.92;
  max-width: 10.2ch;
}

.landing-story-card h2,
.landing-section h2,
.landing-flow-panel h2,
.landing-detail-card h2,
.landing-cta-copy h2 {
  font-size: clamp(2.05rem, 3vw, 3.2rem);
  line-height: 1;
  max-width: 14.5ch;
}

.landing-hero-panel h2 {
  font-size: clamp(1.85rem, 2.5vw, 2.75rem);
  line-height: 1.03;
  max-width: 12ch;
}

.landing-text,
.landing-hero-text,
.landing-section-intro,
.landing-cta-copy p,
.landing-hero-caption {
  color: var(--landing-muted);
  font-size: 1.06rem;
  line-height: 1.72;
}

.landing-hero-text {
  max-width: 670px;
}

.landing-actions,
.landing-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.landing-actions {
  margin-top: 6px;
}

.landing-proof-row {
  margin-top: 10px;
}

.landing-proof-pill,
.landing-role-label,
.landing-module-id,
.landing-system-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--landing-line);
  background: rgba(204, 162, 85, 0.08);
  color: #e4c38e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.landing-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.landing-hero-caption {
  max-width: 220px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.landing-hero-panel,
.landing-proof-card,
.landing-value-card,
.landing-module-card,
.landing-system-card,
.landing-compliance-panel,
.landing-mobile-card,
.landing-office-card {
  padding: 26px;
}

.landing-route-list {
  gap: 0;
}

.landing-route-item,
.landing-flow-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.landing-route-item:first-child,
.landing-flow-item:first-child {
  border-top: 0;
  padding-top: 2px;
}

.landing-route-step,
.landing-flow-number {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 900;
  color: #11171f;
  background: linear-gradient(135deg, #b98944, #deb878);
  box-shadow: 0 18px 34px rgba(185, 137, 68, 0.22);
}

.landing-route-copy strong,
.landing-flow-copy strong,
.landing-compliance-item strong,
.landing-target-card strong,
.landing-value-card h3,
.landing-system-card strong,
.landing-module-card h3,
.landing-mobile-card strong,
.landing-office-card strong {
  display: block;
  color: var(--landing-text);
}

.landing-route-copy strong,
.landing-flow-copy strong,
.landing-compliance-item strong,
.landing-system-card strong,
.landing-mobile-card strong,
.landing-office-card strong {
  margin-bottom: 8px;
}

.landing-hero-panel,
.landing-proof-card,
.landing-compliance-panel {
  display: grid;
  gap: 18px;
}

.landing-target-grid,
.landing-value-grid,
.landing-detail-grid {
  display: grid;
  gap: 18px;
}

.landing-target-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-target-card {
  min-height: 138px;
  padding: 18px;
  border-radius: 22px;
}

.landing-target-card span,
.landing-office-card span {
  display: block;
  color: #dcc08f;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.landing-value-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-value-card {
  min-height: 220px;
}

.landing-value-card h3 {
  margin: 0 0 10px;
  font-size: 1.34rem;
  line-height: 1.3;
}

.landing-story-grid,
.landing-flow-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
}

.landing-story-card,
.landing-section,
.landing-flow-panel,
.landing-detail-card,
.landing-cta-panel {
  padding: 34px;
}

.landing-checklist,
.landing-detail-list,
.landing-compliance-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  gap: 12px;
}

.landing-checklist li,
.landing-detail-list li {
  position: relative;
  padding-left: 26px;
  color: var(--landing-text);
  line-height: 1.68;
}

.landing-checklist li::before,
.landing-detail-list li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #b98944, #deb878);
  box-shadow: 0 0 0 6px rgba(185, 137, 68, 0.12);
}

.landing-system-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.landing-system-card {
  min-height: 210px;
}

.landing-system-card p,
.landing-module-card p,
.landing-value-card p,
.landing-compliance-item p,
.landing-mobile-card p,
.landing-office-card p {
  margin-bottom: 0;
}

.landing-modules {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 30px;
}

.landing-module-card {
  min-height: 220px;
}

.landing-module-card h3 {
  margin: 16px 0 10px;
  font-size: 1.32rem;
}

.landing-compliance-panel h3 {
  margin: 0;
  font-size: 1.52rem;
  line-height: 1.2;
}

.landing-compliance-item {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.landing-compliance-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.landing-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-mobile-matrix,
.landing-office-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 6px;
}

.landing-mobile-card,
.landing-office-card {
  border-radius: 22px;
}

.landing-cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.landing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

@keyframes landing-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1220px) {
  .landing-topbar,
  .landing-stage-grid,
  .landing-story-grid,
  .landing-flow-grid,
  .landing-detail-grid,
  .landing-cta-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .landing-target-grid,
  .landing-value-grid,
  .landing-modules,
  .landing-mobile-matrix,
  .landing-office-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-section-head {
    flex-direction: column;
  }

  .landing-hero-caption {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .landing-topbar,
  .landing-stage,
  .landing-story-card,
  .landing-section,
  .landing-flow-panel,
  .landing-detail-card,
  .landing-cta-panel,
  .landing-value-card,
  .landing-hero-panel,
  .landing-proof-card,
  .landing-system-card,
  .landing-module-card,
  .landing-compliance-panel {
    padding: 24px;
    border-radius: 28px;
  }

  .landing-toplinks,
  .landing-target-grid,
  .landing-value-grid,
  .landing-system-grid,
  .landing-modules,
  .landing-mobile-matrix,
  .landing-office-metrics {
    grid-template-columns: 1fr;
  }

  .landing-toplinks {
    display: none;
  }

  .landing-copy h1,
  .landing-story-card h2,
  .landing-section h2,
  .landing-flow-panel h2,
  .landing-detail-card h2,
  .landing-cta-copy h2,
  .landing-hero-panel h2 {
    max-width: none;
  }

  .landing-actions,
  .landing-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-route-item,
  .landing-flow-item {
    grid-template-columns: 58px minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .landing-shell > * {
    animation: none;
    opacity: 1;
    transform: none;
  }
}





/* --- Landing hard override v2 --- */
body.is-web .landing-screen {
  --landing-text: #f4eee5;
  --landing-muted: #9aa7b7;
  --landing-accent: #d1a55e;
  --landing-accent-soft: rgba(209, 165, 94, 0.14);
  position: relative;
  display: block;
  min-height: calc(100vh - 56px);
}

body.is-web .landing-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 10%, rgba(209, 165, 94, 0.18), transparent 18%),
    radial-gradient(circle at 82% 14%, rgba(70, 96, 145, 0.16), transparent 20%),
    linear-gradient(180deg, #05070b 0%, #0a0f16 44%, #090d14 100%);
}

body.is-web .landing-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.36;
  background:
    linear-gradient(180deg, rgba(4, 6, 9, 0), rgba(4, 6, 9, 0.34)),
    repeating-linear-gradient(90deg, transparent, transparent 144px, rgba(255, 255, 255, 0.024) 145px, transparent 146px);
}

body.is-web .landing-screen .muted,
body.is-web .landing-screen .small,
body.is-web .landing-screen .landing-toplink,
body.is-web .landing-screen .landing-hero-caption {
  color: var(--landing-muted);
}

body.is-web .landing-screen .eyebrow {
  color: #e0bf8b;
}

body.is-web .landing-screen .card-glass,
body.is-web .landing-screen .card-panel,
body.is-web .landing-screen .card-soft {
  color: var(--landing-text);
  border-color: rgba(255, 255, 255, 0.06);
}

body.is-web .landing-screen .card-glass {
  background:
    linear-gradient(180deg, rgba(10, 14, 21, 0.94), rgba(8, 11, 17, 0.96));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.44);
}

body.is-web .landing-screen .card-panel,
body.is-web .landing-screen .landing-mobile-card,
body.is-web .landing-screen .landing-office-card,
body.is-web .landing-screen .landing-target-card {
  background:
    linear-gradient(180deg, rgba(16, 21, 31, 0.96), rgba(10, 14, 21, 0.96));
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

body.is-web .landing-screen .landing-topbar {
  background: rgba(9, 12, 18, 0.82);
  backdrop-filter: blur(18px);
  padding: 16px 20px;
}

body.is-web .landing-screen .landing-stage {
  padding: 42px;
  background:
    radial-gradient(circle at right top, rgba(209, 165, 94, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(10, 14, 21, 0.98), rgba(8, 11, 17, 0.98));
}

body.is-web .landing-screen .landing-stage-grid {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  gap: 28px;
  align-items: start;
}

body.is-web .landing-screen .landing-copy {
  gap: 20px;
  padding-top: 12px;
}

body.is-web .landing-screen .landing-copy h1 {
  color: var(--landing-text);
  font-size: clamp(3rem, 4.8vw, 4.9rem);
  line-height: 0.94;
  letter-spacing: -0.055em;
  max-width: 8.6ch;
}

body.is-web .landing-screen .landing-hero-text {
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.72;
}

body.is-web .landing-screen .landing-proof-row {
  gap: 10px;
}

body.is-web .landing-screen .landing-proof-pill,
body.is-web .landing-screen .landing-system-label,
body.is-web .landing-screen .landing-module-id,
body.is-web .landing-screen .landing-role-label {
  background: var(--landing-accent-soft);
  border-color: rgba(209, 165, 94, 0.24);
  color: #e5c48e;
}

body.is-web .landing-screen .landing-hero-panel,
body.is-web .landing-screen .landing-proof-card,
body.is-web .landing-screen .landing-value-card,
body.is-web .landing-screen .landing-system-card,
body.is-web .landing-screen .landing-module-card,
body.is-web .landing-screen .landing-compliance-panel,
body.is-web .landing-screen .landing-mobile-card,
body.is-web .landing-screen .landing-office-card,
body.is-web .landing-screen .landing-target-card {
  border-radius: 26px;
}

body.is-web .landing-screen .landing-hero-panel {
  padding: 28px;
}

body.is-web .landing-screen .landing-hero-panel h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.8rem);
  max-width: 11ch;
}

body.is-web .landing-screen .landing-hero-caption {
  max-width: 220px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

body.is-web .landing-screen .landing-route-item,
body.is-web .landing-screen .landing-flow-item {
  border-top-color: rgba(255, 255, 255, 0.08);
}

body.is-web .landing-screen .landing-route-step,
body.is-web .landing-screen .landing-flow-number,
body.is-web .landing-screen .btn-primary {
  background: linear-gradient(135deg, #bf914d, #dfbb81);
  color: #0f151d;
}

body.is-web .landing-screen .btn-ghost,
body.is-web .landing-screen .btn-ghost:visited {
  color: var(--landing-text);
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.02);
}

body.is-web .landing-screen .landing-value-grid {
  gap: 16px;
}

body.is-web .landing-screen .landing-value-card {
  min-height: 0;
}

body.is-web .landing-screen .landing-value-card h3 {
  font-size: 1.22rem;
}

body.is-web .landing-screen .landing-story-card,
body.is-web .landing-screen .landing-section,
body.is-web .landing-screen .landing-flow-panel,
body.is-web .landing-screen .landing-detail-card,
body.is-web .landing-screen .landing-cta-panel {
  padding: 30px;
}

body.is-web .landing-screen .landing-story-card h2,
body.is-web .landing-screen .landing-section h2,
body.is-web .landing-screen .landing-flow-panel h2,
body.is-web .landing-screen .landing-detail-card h2,
body.is-web .landing-screen .landing-cta-copy h2 {
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 1.02;
  max-width: 13ch;
}

body.is-web .landing-screen .landing-system-grid,
body.is-web .landing-screen .landing-modules,
body.is-web .landing-screen .landing-target-grid,
body.is-web .landing-screen .landing-mobile-matrix,
body.is-web .landing-screen .landing-office-metrics {
  gap: 14px;
}

body.is-web .landing-screen .landing-module-card,
body.is-web .landing-screen .landing-system-card {
  min-height: 0;
}

body.is-web .landing-screen .landing-module-card h3 {
  font-size: 1.18rem;
}

body.is-web .landing-screen .landing-target-card {
  min-height: 0;
  padding: 16px;
}

body.is-web .landing-screen .landing-checklist li,
body.is-web .landing-screen .landing-detail-list li,
body.is-web .landing-screen .landing-route-copy strong,
body.is-web .landing-screen .landing-flow-copy strong,
body.is-web .landing-screen .landing-system-card strong,
body.is-web .landing-screen .landing-module-card h3,
body.is-web .landing-screen .landing-mobile-card strong,
body.is-web .landing-screen .landing-office-card strong,
body.is-web .landing-screen .landing-compliance-item strong,
body.is-web .landing-screen .landing-target-card strong,
body.is-web .landing-screen .landing-value-card h3 {
  color: var(--landing-text);
}

@media (max-width: 1220px) {
  body.is-web .landing-screen .landing-topbar,
  body.is-web .landing-screen .landing-stage-grid,
  body.is-web .landing-screen .landing-story-grid,
  body.is-web .landing-screen .landing-flow-grid,
  body.is-web .landing-screen .landing-detail-grid,
  body.is-web .landing-screen .landing-cta-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  body.is-web .landing-screen .landing-target-grid,
  body.is-web .landing-screen .landing-value-grid,
  body.is-web .landing-screen .landing-system-grid,
  body.is-web .landing-screen .landing-modules,
  body.is-web .landing-screen .landing-mobile-matrix,
  body.is-web .landing-screen .landing-office-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body.is-web .landing-screen .landing-topbar,
  body.is-web .landing-screen .landing-stage,
  body.is-web .landing-screen .landing-story-card,
  body.is-web .landing-screen .landing-section,
  body.is-web .landing-screen .landing-flow-panel,
  body.is-web .landing-screen .landing-detail-card,
  body.is-web .landing-screen .landing-cta-panel,
  body.is-web .landing-screen .landing-hero-panel,
  body.is-web .landing-screen .landing-proof-card,
  body.is-web .landing-screen .landing-value-card,
  body.is-web .landing-screen .landing-system-card,
  body.is-web .landing-screen .landing-module-card,
  body.is-web .landing-screen .landing-compliance-panel {
    padding: 22px;
    border-radius: 24px;
  }

  body.is-web .landing-screen .landing-toplinks,
  body.is-web .landing-screen .landing-target-grid,
  body.is-web .landing-screen .landing-value-grid,
  body.is-web .landing-screen .landing-system-grid,
  body.is-web .landing-screen .landing-modules,
  body.is-web .landing-screen .landing-mobile-matrix,
  body.is-web .landing-screen .landing-office-metrics {
    grid-template-columns: 1fr;
  }

  body.is-web .landing-screen .landing-toplinks {
    display: none;
  }

  body.is-web .landing-screen .landing-copy h1,
  body.is-web .landing-screen .landing-story-card h2,
  body.is-web .landing-screen .landing-section h2,
  body.is-web .landing-screen .landing-flow-panel h2,
  body.is-web .landing-screen .landing-detail-card h2,
  body.is-web .landing-screen .landing-cta-copy h2,
  body.is-web .landing-screen .landing-hero-panel h2 {
    max-width: none;
  }

  body.is-web .landing-screen .landing-actions,
  body.is-web .landing-screen .landing-cta-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --- Landing polish v3 --- */
body.is-web .landing-screen,
body.is-web .landing-screen h1,
body.is-web .landing-screen h2,
body.is-web .landing-screen h3,
body.is-web .landing-screen strong,
body.is-web .landing-screen li,
body.is-web .landing-screen .landing-topbar-copy strong {
  color: var(--landing-text) !important;
}

body.is-web .landing-screen .muted,
body.is-web .landing-screen .small,
body.is-web .landing-screen .landing-toplink,
body.is-web .landing-screen .landing-hero-caption,
body.is-web .landing-screen .landing-target-card span,
body.is-web .landing-screen .landing-office-card span {
  color: var(--landing-muted) !important;
}

body.is-web .landing-screen .landing-shell {
  gap: 18px;
}

body.is-web .landing-screen .landing-stage {
  padding: 36px;
}

body.is-web .landing-screen .landing-stage-grid {
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

body.is-web .landing-screen .landing-copy {
  min-height: 100%;
  align-content: center;
  justify-content: center;
  padding-top: 0;
}

body.is-web .landing-screen .landing-copy h1 {
  font-size: clamp(2.8rem, 4.6vw, 4.45rem);
  line-height: 0.95;
  max-width: 7.4ch;
}

body.is-web .landing-screen .landing-hero-text {
  max-width: 31rem;
  font-size: 1rem;
  line-height: 1.68;
}

body.is-web .landing-screen .landing-actions {
  gap: 10px;
}

body.is-web .landing-screen .landing-proof-row {
  max-width: 35rem;
  gap: 8px;
}

body.is-web .landing-screen .landing-proof-pill {
  padding: 7px 11px;
  font-size: 0.72rem;
}

body.is-web .landing-screen .landing-hero-side {
  gap: 12px;
}

body.is-web .landing-screen .landing-hero-panel {
  padding: 22px;
}

body.is-web .landing-screen .landing-hero-panel h2 {
  font-size: clamp(1.7rem, 2.2vw, 2.3rem);
  line-height: 1.04;
  max-width: 11.5ch;
}

body.is-web .landing-screen .landing-hero-caption {
  max-width: 208px;
  font-size: 0.9rem;
  line-height: 1.55;
}

body.is-web .landing-screen .landing-route-item {
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
}

body.is-web .landing-screen .landing-route-step {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 0.82rem;
}

body.is-web .landing-screen .landing-route-copy strong {
  font-size: 0.98rem;
  line-height: 1.35;
}

body.is-web .landing-screen .landing-route-copy p {
  font-size: 0.92rem;
  line-height: 1.56;
}

body.is-web .landing-screen .landing-proof-card {
  padding: 18px;
}

body.is-web .landing-screen .landing-target-grid {
  gap: 10px;
}

body.is-web .landing-screen .landing-target-card {
  padding: 14px;
  border-radius: 18px;
}

body.is-web .landing-screen .landing-target-card strong {
  font-size: 0.9rem;
  line-height: 1.22;
}

body.is-web .landing-screen .landing-target-card span {
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: none;
  margin-top: 6px;
  margin-bottom: 0;
}

body.is-web .landing-screen .landing-value-grid,
body.is-web .landing-screen .landing-story-grid,
body.is-web .landing-screen .landing-flow-grid,
body.is-web .landing-screen .landing-detail-grid {
  gap: 14px;
}

body.is-web .landing-screen .landing-value-card,
body.is-web .landing-screen .landing-story-card,
body.is-web .landing-screen .landing-section,
body.is-web .landing-screen .landing-flow-panel,
body.is-web .landing-screen .landing-detail-card,
body.is-web .landing-screen .landing-cta-panel,
body.is-web .landing-screen .landing-compliance-panel,
body.is-web .landing-screen .landing-system-card,
body.is-web .landing-screen .landing-module-card,
body.is-web .landing-screen .landing-mobile-card,
body.is-web .landing-screen .landing-office-card {
  padding: 22px;
}

body.is-web .landing-screen .landing-value-card h3 {
  font-size: 1.14rem;
  line-height: 1.32;
}

body.is-web .landing-screen .landing-story-card h2,
body.is-web .landing-screen .landing-section h2,
body.is-web .landing-screen .landing-flow-panel h2,
body.is-web .landing-screen .landing-detail-card h2,
body.is-web .landing-screen .landing-cta-copy h2 {
  font-size: clamp(1.85rem, 2.35vw, 2.55rem);
  line-height: 1.04;
  max-width: 13.5ch;
}

body.is-web .landing-screen .landing-section-intro,
body.is-web .landing-screen .landing-checklist li,
body.is-web .landing-screen .landing-detail-list li,
body.is-web .landing-screen .landing-compliance-item p,
body.is-web .landing-screen .landing-value-card p,
body.is-web .landing-screen .landing-system-card p,
body.is-web .landing-screen .landing-module-card p,
body.is-web .landing-screen .landing-mobile-card p,
body.is-web .landing-screen .landing-office-card p {
  font-size: 0.95rem;
  line-height: 1.62;
}

body.is-web .landing-screen .landing-system-grid,
body.is-web .landing-screen .landing-modules,
body.is-web .landing-screen .landing-mobile-matrix,
body.is-web .landing-screen .landing-office-metrics {
  gap: 12px;
}

body.is-web .landing-screen .landing-module-card h3,
body.is-web .landing-screen .landing-system-card strong,
body.is-web .landing-screen .landing-mobile-card strong,
body.is-web .landing-screen .landing-office-card strong,
body.is-web .landing-screen .landing-compliance-item strong {
  font-size: 1rem;
  line-height: 1.35;
}

@media (max-width: 1220px) {
  body.is-web .landing-screen .landing-stage-grid {
    grid-template-columns: 1fr;
  }

  body.is-web .landing-screen .landing-copy {
    min-height: 0;
  }
}

/* --- Landing heading refinement v4 --- */
body.is-web .landing-screen h1,
body.is-web .landing-screen h2,
body.is-web .landing-screen h3 {
  text-wrap: balance;
}

body.is-web .landing-screen .landing-story-card h2,
body.is-web .landing-screen .landing-section h2,
body.is-web .landing-screen .landing-flow-panel h2,
body.is-web .landing-screen .landing-detail-card h2,
body.is-web .landing-screen .landing-cta-copy h2 {
  font-size: clamp(1.72rem, 2.1vw, 2.28rem);
  line-height: 1.08;
  max-width: 12.5ch;
}

body.is-web .landing-screen .landing-hero-panel h2 {
  font-size: clamp(1.5rem, 1.9vw, 2rem);
  line-height: 1.08;
  max-width: 10.5ch;
}

body.is-web .landing-screen .landing-value-card h3,
body.is-web .landing-screen .landing-module-card h3,
body.is-web .landing-screen .landing-system-card strong,
body.is-web .landing-screen .landing-mobile-card strong,
body.is-web .landing-screen .landing-office-card strong,
body.is-web .landing-screen .landing-compliance-item strong {
  text-wrap: balance;
}

/* --- Theme toggle & app dark mode default v6 --- */
.landing-topbar-actions,
.login-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-toolbar {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.login-toolbar-actions {
  margin-left: auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
}

.theme-toggle-compact {
  padding: 9px 12px;
}

.theme-toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.10);
  flex: 0 0 auto;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease;
}

.theme-toggle-label {
  white-space: nowrap;
}

body.theme-light .theme-toggle {
  background: rgba(255, 255, 255, 0.94);
  color: #172033;
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

body.theme-light .theme-toggle-track {
  background: rgba(201, 139, 17, 0.14);
  border-color: rgba(201, 139, 17, 0.18);
}

body.theme-light .theme-toggle-thumb {
  transform: translateX(18px);
}

body.theme-dark {
  --bg: #07111f;
  --bg-2: #0d1b30;
  --surface: rgba(13, 22, 37, 0.84);
  --surface-strong: rgba(14, 23, 39, 0.96);
  --surface-soft: rgba(24, 42, 70, 0.64);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 197, 61, 0.16);
  --text: #eef3fb;
  --muted: #9aaac2;
  --primary: #f2aa12;
  --primary-2: #ffc841;
  --primary-3: #132745;
  --warning: #ffd36d;
  --danger: #f06b5f;
  --success: #46d39b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 200, 65, 0.18), transparent 26%),
    radial-gradient(circle at top left, rgba(25, 55, 98, 0.28), transparent 34%),
    linear-gradient(180deg, #07111f 0%, #0b1627 100%);
}

body.theme-dark::before {
  background:
    linear-gradient(rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)),
    radial-gradient(circle at 18% 10%, rgba(255, 200, 65, 0.06), transparent 20%);
}

body.theme-dark .bg-scene {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.25)),
    repeating-linear-gradient(90deg, transparent, transparent 110px, rgba(255, 255, 255, 0.015) 111px, transparent 112px);
  opacity: 0.35;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
  color: var(--text);
  box-shadow: none;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: rgba(220, 236, 240, 0.44);
}

body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  border-color: rgba(255, 200, 65, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 200, 65, 0.10);
  background: rgba(255, 255, 255, 0.05);
}

body.theme-dark label {
  color: var(--text);
}

body.theme-dark .card-glass,
body.theme-dark .card-panel,
body.theme-dark .card-soft,
body.theme-dark .topbar,
body.theme-dark .sidebar,
body.theme-dark .chat-shell,
body.theme-dark .chat-sidebar-pane,
body.theme-dark .chat-main-pane,
body.theme-dark .day-column,
body.theme-dark .timeline-item,
body.theme-dark .project-card,
body.theme-dark .contact-card,
body.theme-dark .chat-room-item,
body.theme-dark .chat-message-card,
body.theme-dark .workforce-segment-card,
body.theme-dark .contact-card-grid div,
body.theme-dark .workforce-segment-grid > div {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

body.theme-dark .card-glass,
body.theme-dark .topbar,
body.theme-dark .sidebar {
  background: linear-gradient(180deg, rgba(14, 23, 39, 0.94), rgba(8, 14, 25, 0.90));
  box-shadow: var(--shadow);
}

body.theme-dark .card-panel,
body.theme-dark .chat-shell,
body.theme-dark .chat-sidebar-pane,
body.theme-dark .chat-main-pane,
body.theme-dark .day-column,
body.theme-dark .timeline-item,
body.theme-dark .project-card,
body.theme-dark .contact-card,
body.theme-dark .chat-room-item,
body.theme-dark .chat-message-card,
body.theme-dark .workforce-segment-card {
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.96), rgba(11, 20, 35, 0.94));
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

body.theme-dark .card-soft,
body.theme-dark .contact-card-grid div,
body.theme-dark .workforce-segment-grid > div {
  background: linear-gradient(180deg, rgba(27, 44, 71, 0.50), rgba(16, 28, 46, 0.48));
  box-shadow: none;
}

body.theme-dark .muted,
body.theme-dark .small,
body.theme-dark .form-hint,
body.theme-dark .table-empty,
body.theme-dark .empty-state,
body.theme-dark .contact-card-grid span,
body.theme-dark .workforce-segment-grid span,
body.theme-dark .chat-room-preview,
body.theme-dark .chat-room-time,
body.theme-dark .chat-message-time,
body.theme-dark .project-stat-card p,
body.theme-dark .mini-label,
body.theme-dark .mini-phone p {
  color: var(--muted);
}

body.theme-dark .status-chip,
body.theme-dark .date-chip,
body.theme-dark .pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line-strong);
}

body.theme-dark .login-stage {
  border: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-dark .login-showcase {
  background: linear-gradient(180deg, rgba(12, 19, 32, 0.94), rgba(8, 14, 24, 0.92));
}

body.theme-dark .mini-phone,
body.theme-dark .mini-phone.highlight {
  background: linear-gradient(180deg, rgba(14, 23, 39, 0.98), rgba(20, 32, 52, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

body.theme-dark .mini-phone.highlight {
  border-color: rgba(255, 200, 65, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 200, 65, 0.08), 0 12px 28px rgba(0, 0, 0, 0.18);
}

body.theme-dark .sidebar {
  background: linear-gradient(180deg, rgba(14, 23, 39, 0.96), rgba(10, 17, 29, 0.96));
}

body.theme-dark .nav-item {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .nav-item:hover,
body.theme-dark .nav-item.active {
  background: rgba(255, 200, 65, 0.10);
  color: var(--text);
  border-color: rgba(255, 200, 65, 0.18);
  box-shadow: none;
}

body.theme-dark .nav-icon {
  background: rgba(255, 200, 65, 0.12);
  color: var(--primary);
}

body.theme-dark .topbar h2,
body.theme-dark .section-head h3,
body.theme-dark .metric-card strong,
body.theme-dark .hero-stat strong,
body.theme-dark .project-card strong,
body.theme-dark .contact-card strong,
body.theme-dark h2,
body.theme-dark h3 {
  color: var(--text);
}

body.theme-dark .auto-break-hint {
  background: rgba(242, 170, 18, 0.10);
  border-color: rgba(242, 170, 18, 0.18);
  color: #ffd98e;
}

body.theme-dark .btn-ghost,
body.theme-dark .btn-secondary,
body.theme-dark .mobile-nav-toggle,
body.theme-dark .sidebar-close {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

body.theme-dark .btn-ghost:hover,
body.theme-dark .btn-secondary:hover,
body.theme-dark .mobile-nav-toggle:hover,
body.theme-dark .sidebar-close:hover {
  background: rgba(255, 200, 65, 0.08);
  border-color: rgba(255, 200, 65, 0.16);
}

body.theme-dark .sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.theme-dark .soft-sep {
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .project-meta-chip,
body.theme-dark .contact-stat-pill,
body.theme-dark .pill-muted {
  background: rgba(242, 170, 18, 0.12);
  color: #ffd27a;
  border-color: rgba(242, 170, 18, 0.18);
}

body.theme-dark .chat-shell {
  background: linear-gradient(180deg, rgba(13, 22, 37, 0.84), rgba(10, 17, 29, 0.92));
}

@media (max-width: 960px) {
  .landing-topbar-actions {
    justify-self: stretch;
    justify-content: flex-end;
  }
}

@media (max-width: 720px) {
  .theme-toggle {
    padding: 9px 10px;
  }

  .theme-toggle-label {
    display: none;
  }
}

/* --- Landing light theme support v7 --- */
body.is-web.theme-light .landing-screen {
  --landing-text: #172033;
  --landing-muted: #5f7188;
  --landing-accent: #c28c3d;
  --landing-accent-soft: rgba(194, 140, 61, 0.12);
}

body.is-web.theme-light .landing-screen::before {
  background:
    radial-gradient(circle at 12% 10%, rgba(194, 140, 61, 0.14), transparent 18%),
    radial-gradient(circle at 82% 14%, rgba(89, 124, 180, 0.10), transparent 20%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f9 44%, #edf2f8 100%);
}

body.is-web.theme-light .landing-screen::after {
  opacity: 0.78;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(90deg, transparent, transparent 144px, rgba(15, 23, 42, 0.018) 145px, transparent 146px);
}

body.is-web.theme-light .landing-screen .card-glass,
body.is-web.theme-light .landing-screen .card-panel,
body.is-web.theme-light .landing-screen .card-soft {
  color: var(--landing-text);
  border-color: rgba(15, 23, 42, 0.08);
}

body.is-web.theme-light .landing-screen .card-glass {
  background:
    radial-gradient(circle at top right, rgba(194, 140, 61, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 252, 0.94));
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.10);
}

body.is-web.theme-light .landing-screen .card-panel,
body.is-web.theme-light .landing-screen .landing-mobile-card,
body.is-web.theme-light .landing-screen .landing-office-card,
body.is-web.theme-light .landing-screen .landing-target-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
  border-color: rgba(15, 23, 42, 0.07);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

body.is-web.theme-light .landing-screen .landing-topbar {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.08);
}

body.is-web.theme-light .landing-screen .landing-stage {
  background:
    radial-gradient(circle at right top, rgba(194, 140, 61, 0.10), transparent 24%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.98));
}

body.is-web.theme-light .landing-screen .landing-proof-pill,
body.is-web.theme-light .landing-screen .landing-system-label,
body.is-web.theme-light .landing-screen .landing-module-id,
body.is-web.theme-light .landing-screen .landing-role-label {
  background: var(--landing-accent-soft);
  border-color: rgba(194, 140, 61, 0.20);
  color: #9b6b24;
}

body.is-web.theme-light .landing-screen .landing-hero-caption {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(15, 23, 42, 0.08);
}

body.is-web.theme-light .landing-screen .landing-route-item,
body.is-web.theme-light .landing-screen .landing-flow-item,
body.is-web.theme-light .landing-screen .landing-compliance-item {
  border-top-color: rgba(15, 23, 42, 0.08);
}

body.is-web.theme-light .landing-screen .landing-target-card span,
body.is-web.theme-light .landing-screen .landing-office-card span,
body.is-web.theme-light .landing-screen .eyebrow {
  color: #b17c33 !important;
}

body.is-web.theme-light .landing-screen .landing-toplink:hover {
  color: var(--landing-text) !important;
  background: rgba(194, 140, 61, 0.08);
  border-color: rgba(194, 140, 61, 0.16);
}

body.is-web.theme-light .landing-screen .btn-ghost,
body.is-web.theme-light .landing-screen .btn-ghost:visited {
  color: var(--landing-text);
  border-color: rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

/* --- Dark tile cleanup v8 --- */
body.theme-dark .info-tile {
  background: linear-gradient(180deg, rgba(15, 24, 40, 0.98), rgba(11, 20, 34, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .info-tile span,
body.theme-dark .empty-state,
body.theme-dark .table-empty {
  color: var(--muted);
}

body.theme-dark .info-tile strong,
body.theme-dark .timeline-body strong,
body.theme-dark .timeline-body p,
body.theme-dark .timeline-item [data-title],
body.theme-dark .timeline-item [data-subtitle] {
  color: var(--text);
}

body.theme-dark .empty-state {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(15, 24, 40, 0.98), rgba(11, 20, 34, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 24px rgba(0, 0, 0, 0.16);
}

/* --- Unified dark palette v9 --- */
body.theme-dark {
  --bg: #090d14;
  --bg-2: #0a0f16;
  --surface: rgba(10, 14, 21, 0.92);
  --surface-strong: rgba(9, 12, 18, 0.98);
  --surface-soft: rgba(14, 19, 29, 0.94);
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(209, 165, 94, 0.16);
  --text: #f4eee5;
  --muted: #9aa7b7;
  --primary: #d1a55e;
  --primary-2: #deb878;
  --primary-3: #1a202b;
  --warning: #deb878;
  --danger: #f06b5f;
  --success: #58c79a;
  --shadow: 0 28px 96px rgba(0, 0, 0, 0.42);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(209, 165, 94, 0.18), transparent 18%),
    radial-gradient(circle at 82% 14%, rgba(70, 96, 145, 0.16), transparent 20%),
    linear-gradient(180deg, #05070b 0%, #0a0f16 44%, #090d14 100%);
}

body.theme-dark::before {
  background:
    linear-gradient(180deg, rgba(4, 6, 9, 0), rgba(4, 6, 9, 0.22)),
    radial-gradient(circle at 18% 10%, rgba(209, 165, 94, 0.06), transparent 20%);
}

body.theme-dark .bg-scene {
  background:
    linear-gradient(180deg, rgba(4, 6, 9, 0), rgba(4, 6, 9, 0.34)),
    repeating-linear-gradient(90deg, transparent, transparent 144px, rgba(255, 255, 255, 0.024) 145px, transparent 146px);
  opacity: 0.36;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: rgba(244, 238, 229, 0.38);
}

body.theme-dark input:focus,
body.theme-dark select:focus,
body.theme-dark textarea:focus {
  border-color: rgba(209, 165, 94, 0.42);
  box-shadow: 0 0 0 4px rgba(209, 165, 94, 0.10);
  background: rgba(255, 255, 255, 0.05);
}

body.theme-dark .card-glass,
body.theme-dark .topbar,
body.theme-dark .sidebar {
  background:
    radial-gradient(circle at top right, rgba(204, 162, 85, 0.11), transparent 26%),
    linear-gradient(180deg, rgba(9, 12, 18, 0.98), rgba(7, 10, 15, 0.95));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 28px 96px rgba(0, 0, 0, 0.42);
}

body.theme-dark .card-panel,
body.theme-dark .chat-shell,
body.theme-dark .chat-sidebar-pane,
body.theme-dark .chat-main-pane,
body.theme-dark .day-column,
body.theme-dark .timeline-item,
body.theme-dark .project-card,
body.theme-dark .contact-card,
body.theme-dark .chat-room-item,
body.theme-dark .chat-message-card,
body.theme-dark .workforce-segment-card,
body.theme-dark .info-tile,
body.theme-dark .empty-state {
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

body.theme-dark .card-soft,
body.theme-dark .hero-stat,
body.theme-dark .contact-card-grid div,
body.theme-dark .workforce-segment-grid > div {
  background: linear-gradient(180deg, rgba(18, 24, 36, 0.92), rgba(12, 17, 26, 0.92));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

body.theme-dark .muted,
body.theme-dark .small,
body.theme-dark .form-hint,
body.theme-dark .table-empty,
body.theme-dark .empty-state,
body.theme-dark .contact-card-grid span,
body.theme-dark .workforce-segment-grid span,
body.theme-dark .chat-room-preview,
body.theme-dark .chat-room-time,
body.theme-dark .chat-message-time,
body.theme-dark .project-stat-card p,
body.theme-dark .mini-label,
body.theme-dark .mini-phone p,
body.theme-dark .info-tile span,
body.theme-dark th,
body.theme-dark .timeline-body p {
  color: var(--muted);
}

body.theme-dark .topbar h2,
body.theme-dark .section-head h3,
body.theme-dark .metric-card strong,
body.theme-dark .hero-stat strong,
body.theme-dark .project-card strong,
body.theme-dark .contact-card strong,
body.theme-dark .timeline-body strong,
body.theme-dark .info-tile strong,
body.theme-dark h2,
body.theme-dark h3 {
  color: var(--text);
}

body.theme-dark .status-chip,
body.theme-dark .date-chip,
body.theme-dark .pill,
body.theme-dark .theme-toggle {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border-color: rgba(209, 165, 94, 0.16);
}

body.theme-dark .btn-primary,
body.theme-dark .landing-topbar .btn-primary,
body.theme-dark .landing-stage .btn-primary,
body.theme-dark .landing-cta-panel .btn-primary {
  background: linear-gradient(135deg, #b98944, #deb878);
  color: #10161f;
  box-shadow: 0 14px 34px rgba(185, 137, 68, 0.25);
}

body.theme-dark .btn-ghost,
body.theme-dark .btn-secondary,
body.theme-dark .mobile-nav-toggle,
body.theme-dark .sidebar-close {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: none;
}

body.theme-dark .btn-ghost:hover,
body.theme-dark .btn-secondary:hover,
body.theme-dark .mobile-nav-toggle:hover,
body.theme-dark .sidebar-close:hover,
body.theme-dark .nav-item:hover,
body.theme-dark .nav-item.active {
  background: rgba(209, 165, 94, 0.10);
  color: var(--text);
  border-color: rgba(209, 165, 94, 0.18);
}

body.theme-dark .nav-item {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.04);
}

body.theme-dark .nav-icon,
body.theme-dark .timeline-time,
body.theme-dark .module-icon {
  background: rgba(209, 165, 94, 0.12);
  border-color: rgba(209, 165, 94, 0.18);
  color: #e0bf8b;
}

body.theme-dark .auto-break-hint,
body.theme-dark .project-meta-chip,
body.theme-dark .contact-stat-pill,
body.theme-dark .pill-muted {
  background: rgba(209, 165, 94, 0.12);
  color: #e5c48e;
  border-color: rgba(209, 165, 94, 0.18);
}

body.theme-dark .login-showcase,
body.theme-dark .mini-phone,
body.theme-dark .mini-phone.highlight {
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
}

body.theme-dark .sidebar-foot,
body.theme-dark .soft-sep {
  border-color: rgba(255, 255, 255, 0.06);
  background-color: rgba(255, 255, 255, 0.06);
}

/* --- Dark controls polish v10 --- */
body.theme-light {
  color-scheme: light;
}

body.theme-dark {
  color-scheme: dark;
  scrollbar-color: rgba(209, 165, 94, 0.52) rgba(255, 255, 255, 0.04);
}

body.theme-dark *,
body.theme-light * {
  scrollbar-width: thin;
}

body.theme-dark::-webkit-scrollbar,
body.theme-dark *::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

body.theme-dark::-webkit-scrollbar-track,
body.theme-dark *::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

body.theme-dark::-webkit-scrollbar-thumb,
body.theme-dark *::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(209, 165, 94, 0.9), rgba(185, 137, 68, 0.92));
  border: 2px solid rgba(10, 14, 21, 0.92);
  border-radius: 999px;
}

body.theme-dark select,
body.theme-dark option,
body.theme-dark optgroup,
body.theme-dark input[type="date"],
body.theme-dark input[type="time"],
body.theme-dark input[type="file"] {
  color-scheme: dark;
}

body.theme-dark select,
body.theme-dark option,
body.theme-dark optgroup {
  background-color: #10161f;
  color: var(--text);
}

body.theme-dark input[type="checkbox"],
body.theme-dark input[type="radio"] {
  accent-color: #d1a55e;
}

body.theme-dark input[type="file"] {
  padding: 10px 12px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark input[type="file"]::file-selector-button,
body.theme-dark input[type="file"]::-webkit-file-upload-button {
  margin-right: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(209, 165, 94, 0.16);
  background: linear-gradient(180deg, rgba(20, 27, 39, 0.98), rgba(14, 19, 29, 0.96));
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

body.theme-dark .table-wrap {
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  scrollbar-gutter: stable both-edges;
}

body.theme-dark table {
  background: transparent;
}

body.theme-dark th,
body.theme-dark td {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 20, 31, 0.98), rgba(12, 17, 26, 0.98));
  color: var(--muted);
}

body.theme-dark td {
  color: var(--text);
  background: transparent;
}

body.theme-dark .table-empty {
  background: transparent;
  color: var(--muted);
  text-align: center;
}

body.theme-dark .report-item,
body.theme-dark .upload-item,
body.theme-dark .order-item,
body.theme-dark .doc-item,
body.theme-dark .position-item,
body.theme-dark .info-box {
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
  color: var(--text);
}

#materialMailPreview:empty {
  display: none;
}

body.theme-dark .report-item strong,
body.theme-dark .upload-item strong,
body.theme-dark .order-item strong,
body.theme-dark .doc-item strong,
body.theme-dark .position-item strong,
body.theme-dark .contact-card-grid strong,
body.theme-dark .contact-card-grid a {
  color: var(--text);
}

body.theme-dark .report-item p,
body.theme-dark .upload-item p,
body.theme-dark .order-item p,
body.theme-dark .doc-item p,
body.theme-dark .position-item p,
body.theme-dark .info-box,
body.theme-dark .contact-card-grid span {
  color: var(--muted);
}

body.theme-dark .contact-card-grid div {
  background: linear-gradient(180deg, rgba(18, 24, 36, 0.92), rgba(12, 17, 26, 0.92));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

body.theme-dark .chat-thread {
  background-image:
    radial-gradient(rgba(209, 165, 94, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  background-size: 18px 18px, auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 16px;
}

body.theme-dark .chat-sidebar-pane,
body.theme-dark .chat-main-pane,
body.theme-dark .chat-conversation-head,
body.theme-dark .chat-composer {
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .chat-room-item,
body.theme-dark .chat-message-card,
body.theme-dark .chat-empty-state,
body.theme-dark .chat-empty-thread,
body.theme-dark .chat-date-divider {
  background: linear-gradient(180deg, rgba(18, 24, 36, 0.96), rgba(12, 17, 26, 0.96));
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  color: var(--text);
}

body.theme-dark .chat-room-item.active {
  background: linear-gradient(180deg, rgba(63, 47, 22, 0.94), rgba(45, 32, 14, 0.96));
  border-color: rgba(209, 165, 94, 0.24);
  box-shadow: 0 14px 30px rgba(83, 58, 23, 0.22);
}

body.theme-dark .chat-message-row.mine .chat-message-card {
  background: linear-gradient(180deg, rgba(63, 47, 22, 0.94), rgba(45, 32, 14, 0.96));
  border-color: rgba(209, 165, 94, 0.22);
}

body.theme-dark .chat-message-row.theirs .chat-message-card {
  background: linear-gradient(180deg, rgba(18, 24, 36, 0.96), rgba(12, 17, 26, 0.96));
}

body.theme-dark .chat-message-text,
body.theme-dark .chat-room-title,
body.theme-dark .chat-conversation-meta h3 {
  color: var(--text);
}

body.theme-dark .chat-room-preview,
body.theme-dark .chat-room-time,
body.theme-dark .chat-message-time,
body.theme-dark .chat-empty-thread,
body.theme-dark .chat-date-divider,
body.theme-dark .chat-empty-state .muted {
  color: var(--muted);
}

body.theme-dark .chat-composer-field textarea {
  background: linear-gradient(180deg, rgba(18, 24, 36, 0.96), rgba(12, 17, 26, 0.96));
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

body.theme-dark .chat-composer-field textarea::placeholder {
  color: rgba(244, 238, 229, 0.34);
}

body.theme-dark .signature-pad {
  background:
    radial-gradient(circle at top right, rgba(209, 165, 94, 0.08), transparent 22%),
    linear-gradient(180deg, rgba(18, 24, 36, 0.96), rgba(12, 17, 26, 0.96));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 14px 30px rgba(0, 0, 0, 0.22);
}

body.theme-dark.is-web .table-wrap table thead th,
body.theme-dark .table-wrap table thead th {
  background: linear-gradient(180deg, rgba(15, 20, 31, 0.98), rgba(12, 17, 26, 0.98));
  color: var(--muted);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark.is-web .chat-composer,
body.theme-dark .chat-composer {
  background: linear-gradient(180deg, rgba(13, 18, 28, 0.94), rgba(10, 14, 21, 0.98));
  border-top-color: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.theme-dark.is-web .chat-send-btn:disabled,
body.theme-dark .chat-send-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 238, 229, 0.38);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}


/* --- Auto close correction notice v11 --- */
.auto-correction-notice {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(201, 139, 17, 0.22);
  background: rgba(255, 247, 223, 0.92);
  color: #7b5308;
  display: grid;
  gap: 12px;
}

.auto-correction-copy strong {
  display: block;
  margin-bottom: 4px;
}

.auto-correction-copy p {
  margin: 0;
  color: inherit;
}

.auto-correction-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.theme-dark .auto-correction-notice {
  background: linear-gradient(180deg, rgba(55, 40, 14, 0.94), rgba(42, 30, 10, 0.96));
  border-color: rgba(209, 165, 94, 0.26);
  color: #f2d29c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

@media (max-width: 760px) {
  .auto-correction-actions .btn {
    width: 100%;
  }
}


/* --- Usability Clarity Pass --- */
.page-guide {
  margin-top: 14px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
}

.page-guide-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.page-guide-copy p {
  margin: 0;
}

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

.page-guide-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.9));
}

.page-guide-step-badge {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
  background: rgba(229, 196, 142, 0.9);
}

.panel-summary {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.88));
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.panel-summary--tight {
  margin-top: 10px;
}

.panel-summary__copy {
  flex: 1 1 260px;
}

.panel-summary__copy strong {
  display: block;
  margin-bottom: 4px;
}

.panel-summary__copy p {
  margin: 0;
  color: var(--muted);
}

.panel-summary__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-summary__chips span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.empty-state-rich {
  display: grid;
  gap: 6px;
  text-align: left;
}

.empty-state-rich strong {
  color: var(--text);
}

.empty-state-rich p {
  margin: 0;
}

body.theme-dark .page-guide,
body.theme-dark .panel-summary {
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.94), rgba(10, 14, 21, 0.94));
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .page-guide-step {
  background: linear-gradient(180deg, rgba(15, 24, 40, 0.96), rgba(11, 20, 34, 0.96));
  border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .panel-summary__chips span {
  background: rgba(15, 24, 40, 0.88);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

@media (max-width: 980px) {
  .page-guide {
    grid-template-columns: 1fr;
  }
}


/* --- Login demo placement --- */
body.is-web .login-showcase {
  display: flex !important;
  flex-direction: column;
  gap: 18px;
}

body.is-web .login-showcase .showcase-grid {
  order: 1;
}

body.is-web #demoLoginMountShowcase {
  order: 2;
}

#demoLoginMountShowcase .demo-login-panel {
  margin-top: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

#demoLoginMountCard .demo-login-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}


#demoLoginMountCard:empty,
#demoLoginMountShowcase:empty {
  display: none;
}


/* --- CrewClock mobile + activity management v35 --- */
.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

.activity-item-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.activity-item-main strong,
.activity-item-main p {
  margin: 0;
}

.activity-code {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(209, 165, 94, 0.1);
  color: var(--primary-2);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

body.theme-dark .activity-item {
  background: linear-gradient(180deg, rgba(20, 33, 54, 0.72), rgba(13, 23, 39, 0.72));
  border-color: rgba(255, 255, 255, 0.07);
}

@media (max-width: 980px) {
  body.is-web .admin-main-grid {
    display: flex;
    flex-direction: column;
  }

  body.is-web .admin-main-stack {
    order: -1;
  }

  body.is-web .page-guide {
    display: none;
  }

  body.is-web .topbar {
    min-height: 0;
  }
}

@media (max-width: 760px) {
  html {
    scroll-padding-top: 72px;
  }

  body.is-web .app-shell {
    padding: max(8px, env(safe-area-inset-top)) 8px max(10px, env(safe-area-inset-bottom));
  }

  body.is-web .workspace,
  body.is-web .main-stage,
  body.is-web .admin-page-shell,
  body.is-web .admin-side-stack,
  body.is-web .admin-main-stack {
    gap: 10px;
  }

  body.is-web .mobile-nav-toggle {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    left: 10px;
    z-index: 70;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  }

  body.is-web .topbar {
    padding: 13px 12px 13px 58px;
    border-radius: 18px;
    gap: 8px;
    align-items: flex-start;
  }

  body.is-web .topbar > div:first-child .eyebrow,
  body.is-web #pageSubtitle {
    display: none;
  }

  body.is-web .topbar h2 {
    font-size: 1.12rem;
    line-height: 1.2;
    margin: 2px 0 0;
  }

  body.is-web .topbar-meta {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
  }

  body.is-web .topbar-meta .status-chip,
  body.is-web .topbar-meta .date-chip,
  body.is-web .topbar-meta .running-chip,
  body.is-web .topbar-meta .offline-chip {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  body.is-web .topbar-meta .theme-toggle {
    min-height: 34px;
    padding: 6px 8px;
  }

  body.is-web .topbar-meta .theme-toggle-label {
    display: none;
  }

  body.is-web .topbar-meta .theme-toggle-track {
    width: 36px;
    height: 22px;
  }

  body.is-web .topbar-meta .theme-toggle-thumb {
    width: 16px;
    height: 16px;
  }

  body.is-web .tab-panel.active {
    margin-top: 0;
  }

  body.is-web .card-panel,
  body.is-web .card-glass,
  body.is-web .card-soft,
  body.is-web .form-panel,
  body.is-web .table-panel,
  body.is-web .admin-tools-section {
    border-radius: 18px;
  }

  body.is-web .card-panel,
  body.is-web .form-panel,
  body.is-web .table-panel,
  body.is-web .admin-tools-section {
    padding: 16px;
  }

  body.is-web .section-head {
    margin-bottom: 12px;
  }

  body.is-web .section-head h3 {
    font-size: 1.18rem;
  }

  body.is-web .table-wrap table.admin-user-table {
    min-width: 0;
    width: 100%;
  }

  body.is-web .admin-user-table thead {
    display: none;
  }

  body.is-web .admin-user-table tbody,
  body.is-web .admin-user-table tr,
  body.is-web .admin-user-table td {
    display: block;
    width: 100%;
  }

  body.is-web .admin-user-table tr {
    margin: 0 0 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
  }

  body.is-web .admin-user-table td {
    padding: 7px 0;
    border: 0;
  }

  body.is-web .admin-user-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  body.is-web .admin-user-table td:last-child .inline-actions {
    flex-direction: row;
  }

  body.is-web .admin-user-table td:last-child .btn {
    width: auto;
    flex: 1 1 120px;
  }

  .activity-item {
    align-items: stretch;
    flex-direction: column;
    padding: 13px;
  }

  .activity-item-main {
    align-items: flex-start;
  }

  .activity-item .inline-actions {
    flex-direction: row;
  }

  .activity-item .inline-actions .btn {
    width: auto;
    flex: 1 1 120px;
  }

  /* Mobile landing: Login ist sofort erreichbar, ohne eine lange Marketingstrecke. */
  body.is-web .landing-shell {
    gap: 10px;
  }

  body.is-web .landing-screen .landing-topbar {
    position: sticky;
    top: max(6px, env(safe-area-inset-top));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px 12px;
    border-radius: 18px;
    gap: 10px;
  }

  body.is-web .landing-screen .landing-topbar-copy,
  body.is-web .landing-screen .landing-toplinks,
  body.is-web .landing-screen .landing-topbar-actions .theme-toggle {
    display: none;
  }

  body.is-web .landing-screen .landing-wordmark {
    width: 132px;
  }

  body.is-web .landing-screen .landing-topbar-actions {
    gap: 0;
  }

  body.is-web .landing-screen .landing-topbar-actions .btn {
    min-height: 42px;
    padding: 9px 13px;
  }

  body.is-web .landing-screen .landing-stage {
    padding: 18px;
    border-radius: 20px;
  }

  body.is-web .landing-screen .landing-copy {
    gap: 14px;
  }

  body.is-web .landing-screen .landing-copy h1 {
    font-size: clamp(2.2rem, 12vw, 3.25rem);
    max-width: 9ch;
  }

  body.is-web .landing-screen .landing-hero-text {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  body.is-web .landing-screen .landing-proof-row {
    display: none;
  }

  body.is-web .landing-screen .landing-hero-side {
    display: none;
  }

  /* Mobile login: Formular steht direkt im sichtbaren Bereich. */
  body.is-web .login-screen {
    min-height: calc(100dvh - 16px);
    align-items: start;
  }

  body.is-web .login-stage {
    max-width: none;
    padding: 14px;
    border-radius: 20px;
  }

  body.is-web .login-toolbar {
    min-height: 38px;
  }

  body.is-web .login-toolbar .theme-toggle-label,
  body.is-web .login-brand .eyebrow,
  body.is-web .login-brand h1,
  body.is-web .login-brand .login-copy,
  body.is-web .login-showcase {
    display: none !important;
  }

  body.is-web .login-brand {
    margin: 0 0 10px;
  }

  body.is-web .logo-wordmark-login {
    width: 150px;
  }

  body.is-web .login-card {
    padding: 18px;
    border-radius: 18px;
  }
}

/* --- CrewClock mobile layout hotfix v36 ---
   Prevent CSS grid tracks from stretching to the full viewport height.
   Without this, the first visible dashboard panel can be pushed far below the fold on phones. */
@media (max-width: 980px) {
  body.is-web .workspace {
    min-height: 0;
    align-content: start;
  }

  body.is-web .main-stage {
    min-height: 0;
    align-content: start;
    grid-auto-rows: max-content;
  }

  body.is-web .topbar,
  body.is-web .tab-panel.active,
  body.is-web .overview-grid {
    align-self: start;
  }
}

@media (max-width: 760px) {
  body.is-web .main-stage {
    display: grid;
    gap: 10px;
    padding-top: 0;
  }

  body.is-web .topbar {
    min-height: 0;
    height: auto;
  }

  body.is-web #tab-overview {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  body.is-web .overview-grid {
    min-height: 0;
    align-content: start;
  }
}

/* --- CrewClock mobile dashboard hard reset v37 ---
   Mobile browsers must not keep the desktop workspace grid. The fixed sidebar
   and menu button are removed from document flow; the actual page starts at y=0. */
@media (max-width: 980px) {
  body.is-web #dashboardView.workspace {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.is-web #dashboardView > .main-stage {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body.is-web #dashboardView > .main-stage > .topbar {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 0 10px !important;
    transform: none !important;
  }

  body.is-web #dashboardView > .main-stage > .tab-panel.active {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 0 8px !important;
    transform: none !important;
  }

  body.is-web #dashboardView .overview-grid,
  body.is-web #dashboardView .content-grid {
    display: grid !important;
    min-height: 0 !important;
    height: auto !important;
    align-content: start !important;
    grid-auto-rows: max-content !important;
  }
}

@media (max-width: 760px) {
  body.is-web #dashboardView > .main-stage > .topbar {
    padding: 12px 10px 12px 58px !important;
  }
}

/* --- CrewClock mobile navigation flow fix v38 ---
   The later desktop sidebar rule used position:sticky and kept the hidden
   navigation in document flow. On mobile the drawer must always be fixed. */
@media (max-width: 980px) {
  body.is-web #dashboardView > .sidebar {
    position: fixed !important;
    top: max(10px, calc(var(--safe-top) + 6px)) !important;
    right: auto !important;
    bottom: max(10px, calc(var(--safe-bottom) + 6px)) !important;
    left: max(10px, calc(var(--safe-left) + 6px)) !important;
    width: min(84vw, 320px) !important;
    max-width: 320px !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: calc(100dvh - 20px - var(--safe-top) - var(--safe-bottom)) !important;
    margin: 0 !important;
    z-index: 50 !important;
    overflow-y: auto !important;
    transform: translateX(calc(-100% - 28px)) !important;
  }

  body.is-web #dashboardView.mobile-nav-open > .sidebar {
    transform: translateX(0) !important;
  }

  body.is-web #dashboardView > .mobile-nav-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 49 !important;
  }

  body.is-web #dashboardView > .main-stage {
    position: relative !important;
    z-index: 1 !important;
  }
}

/* --- CrewClock dark schedule editor contrast fix v41 --- */
body.theme-dark .schedule-row {
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.98), rgba(10, 18, 31, 0.98)) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 10px 28px rgba(0, 0, 0, 0.18) !important;
}

body.theme-dark .schedule-row .schedule-day strong,
body.theme-dark .schedule-row .schedule-switch,
body.theme-dark .schedule-row label {
  color: var(--text) !important;
}

body.theme-dark .schedule-row .schedule-day span,
body.theme-dark .schedule-row .schedule-field span {
  color: var(--muted) !important;
}

body.theme-dark .schedule-row input[type="time"],
body.theme-dark .schedule-row input[type="text"],
body.theme-dark .schedule-row select {
  background: rgba(255, 255, 255, 0.045) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  color: var(--text) !important;
  color-scheme: dark;
}

body.theme-dark .schedule-row input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.75);
}

body.theme-dark .schedule-switch {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.10) !important;
}

body.theme-dark .schedule-switch.is-enabled {
  background: rgba(242, 170, 18, 0.12) !important;
  border-color: rgba(242, 170, 18, 0.32) !important;
  color: #ffe2a3 !important;
}

body.theme-dark .schedule-switch input[type="checkbox"] {
  accent-color: var(--primary);
}
