:root {
  --bg: #f6efe6;
  --panel: rgba(255, 252, 247, 0.88);
  --panel-strong: #fffaf4;
  --text: #182028;
  --muted: #5a6470;
  --line: rgba(24, 32, 40, 0.1);
  --brand: #b55233;
  --brand-dark: #7d3722;
  --highlight: #1f6b5f;
  --danger: #9f2d2d;
  --shadow: 0 18px 45px rgba(74, 48, 32, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:
    radial-gradient(circle at top left, rgba(181, 82, 51, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(31, 107, 95, 0.16), transparent 30%),
    linear-gradient(180deg, #f9f4ed 0%, var(--bg) 100%);
}

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

.app-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding:
    max(1rem, env(safe-area-inset-top))
    max(0px, env(safe-area-inset-right))
    max(3rem, env(safe-area-inset-bottom))
    max(0px, env(safe-area-inset-left));
}

a,
button,
input,
select,
textarea {
  touch-action: manipulation;
}

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

.hero {
  display: grid;
  grid-template-columns: 1.7fr 0.9fr;
  gap: 1rem;
  align-items: stretch;
  margin: 1rem 0 1.5rem;
}

.hero-compact h1 {
  max-width: 16ch;
}

.hero,
.panel {
  backdrop-filter: blur(18px);
}

.hero > div,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
  border-radius: var(--radius-xl);
}

.hero > div:first-child,
.panel {
  padding: 1.4rem;
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  background:
    linear-gradient(140deg, rgba(181, 82, 51, 0.12), rgba(31, 107, 95, 0.12)),
    var(--panel-strong);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  line-height: 1.05;
}

h1 {
  max-width: 13ch;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

h2 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.hero-copy,
.hero-meta,
.entry-subtitle,
.empty-state,
.entry-meta dt,
.auth-copy {
  color: var(--muted);
}

.hero-copy,
.auth-copy {
  margin: 1rem 0 0;
  max-width: 58ch;
  font-size: 1.05rem;
}

.hero-stat-label,
.hero-meta {
  margin: 0;
}

.hero-stat {
  margin: 0.3rem 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--highlight);
}

.auth-grid,
.layout {
  display: grid;
  gap: 1.2rem;
}

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

.layout {
  grid-template-columns: repeat(12, 1fr);
}

.page-layout {
  display: grid;
  gap: 1.2rem;
}

#mobileSidebarToggle {
  display: none;
}

.page-panel {
  width: 100%;
  display: grid;
  gap: 1rem;
}

.page-panel > .panel-head {
  align-items: flex-start;
}

.page-panel > .panel-head p,
.page-panel > .panel-head h2 {
  max-width: 42rem;
}

.page-panel .hero-meta {
  margin-top: 0.25rem;
}

.page-panel .entry-form,
.page-panel .report-controls,
.page-panel .report-summary,
.page-panel .entries-list,
.page-panel .report-output,
.page-panel .empty-state {
  margin-top: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  padding: 0.7rem 0.9rem;
}

.app-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(24, 32, 40, 0.05);
  text-decoration: none;
  font-weight: 700;
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.nav-link.is-locked {
  opacity: 0.62;
  border: 1px dashed rgba(24, 32, 40, 0.2);
  background: rgba(24, 32, 40, 0.04);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.topbar .section-kicker {
  margin-bottom: 0.12rem;
  font-size: 0.64rem;
}

.topbar #sessionName {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.05;
}

.topbar #sessionRole {
  margin-top: 0.1rem;
  font-size: 0.78rem;
}

.topbar-actions .button {
  min-height: 2.1rem;
  padding: 0.38rem 0.62rem;
}

.topbar-actions .badge {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
}

.user-card-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.user-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.user-search {
  margin-top: 1rem;
}

.user-search span {
  display: block;
  margin-bottom: 0.15rem;
}

.user-search input {
  background: rgba(255, 255, 255, 0.96);
}

.badge.inactive {
  background: rgba(159, 45, 45, 0.12);
  color: var(--danger);
}

.status-bar {
  margin: 0 0 1rem;
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-lg);
  background: rgba(31, 107, 95, 0.12);
  color: var(--highlight);
  font-weight: 700;
}

.status-bar.warning {
  background: rgba(159, 45, 45, 0.12);
  color: var(--danger);
}

.status-popup {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translate(-50%, -12px);
  opacity: 0;
  pointer-events: none;
  z-index: 2200;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.status-popup.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.status-popup-card {
  min-width: min(92vw, 360px);
  max-width: min(94vw, 680px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(31, 107, 95, 0.24);
  background: #e7f6f2;
  color: #114d43;
  box-shadow: 0 12px 30px rgba(17, 77, 67, 0.22);
  font-weight: 700;
}

.status-popup.warning .status-popup-card {
  border-color: rgba(159, 45, 45, 0.3);
  background: #fdecec;
  color: #7f1f1f;
  box-shadow: 0 12px 30px rgba(127, 31, 31, 0.22);
}

.status-popup-message {
  flex: 1;
  line-height: 1.25;
}

.status-popup-close {
  width: 1.8rem;
  height: 1.8rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.status-popup-close:hover {
  filter: brightness(0.95);
}

.timer-flow-dialog {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(17, 24, 32, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.timer-flow-dialog.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.timer-flow-dialog-sheet {
  width: min(100%, 560px);
}

.timer-flow-dialog-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: 22px 22px 18px 18px;
  border: 1px solid rgba(24, 32, 40, 0.14);
  background: #ffffff;
  color: #11161b;
  box-shadow: 0 18px 40px rgba(17, 24, 32, 0.32);
  transform: translateY(18px);
  transition: transform 0.18s ease;
}

.timer-flow-dialog.is-visible .timer-flow-dialog-card {
  transform: translateY(0);
}

.timer-flow-dialog-head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  justify-content: space-between;
}

.timer-flow-dialog-head h3 {
  margin: 0.15rem 0 0.25rem;
  font-size: 1.25rem;
}

.timer-flow-dialog-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 32, 40, 0.06);
  color: var(--text);
  font-weight: 700;
}

.timer-flow-dialog-body {
  display: grid;
  gap: 0.9rem;
}

.timer-flow-dialog-static {
  display: grid;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(24, 32, 40, 0.12);
  background: #f4f7fb;
  color: #11161b;
}

.timer-flow-checkbox {
  min-height: 0;
  padding: 0.2rem 0;
}

.timer-flow-dialog-card label,
.timer-flow-dialog-card span,
.timer-flow-dialog-card strong,
.timer-flow-dialog-card h3,
.timer-flow-dialog-card p,
.timer-flow-dialog-card small {
  color: #11161b;
}

.timer-flow-dialog-card .hero-meta {
  color: #44505c;
}

.timer-flow-dialog-card input,
.timer-flow-dialog-card select {
  background: #ffffff;
  color: #11161b;
  border-color: rgba(24, 32, 40, 0.14);
}

.timer-flow-dialog-card input::placeholder {
  color: #6b7682;
}

.timer-flow-odometer-wrap small {
  margin-top: -0.05rem;
}

.timer-flow-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem;
}

.timer-flow-dialog-actions-spread {
  justify-content: space-between;
  align-items: center;
}

.timer-flow-dialog-actions-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .timer-flow-dialog {
    padding: 0.65rem;
  }

  .timer-flow-dialog-sheet {
    width: 100%;
  }

  .timer-flow-dialog-card {
    padding: 0.9rem;
    border-radius: 24px 24px 16px 16px;
  }

  .timer-flow-dialog-actions,
  .timer-flow-dialog-actions-group {
    display: grid;
    width: 100%;
  }

  .timer-flow-dialog-actions .button,
  .timer-flow-dialog-actions-group .button {
    width: 100%;
  }
}

.panel-form,
.panel-report {
  grid-column: span 7;
}

.panel-list,
.panel-admin {
  grid-column: span 5;
}

.panel-head,
.entry-topline,
.report-controls,
.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.entry-form,
.entries-list,
.report-output {
  margin-top: 1rem;
}

.auth-inline-actions {
  margin-top: 0.75rem;
}

.auth-screen .status-bar {
  width: min(860px, 100%);
  margin: 0 auto;
}

.workspace-summary {
  margin-top: 0.2rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.32rem;
  margin-bottom: 0.2rem;
}

.workspace-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.workspace-panel {
  gap: 0.4rem;
  padding: 0.85rem 0.95rem;
}

.workspace-panel .panel-head {
  padding-bottom: 0;
}

.workspace-panel .panel-head .section-kicker {
  font-size: 0.62rem;
  margin-bottom: 0.04rem;
}

.workspace-panel .panel-head h2 {
  font-size: clamp(0.94rem, 1.55vw, 1.08rem);
}

.workspace-panel .panel-head .hero-meta {
  margin-top: 0.08rem;
  font-size: 0.76rem;
  line-height: 1.18;
}

.workspace-panel .workspace-summary article {
  padding: 0.38rem 0.5rem;
  border-radius: 10px;
}

.workspace-panel .workspace-summary span {
  font-size: 0.58rem;
  white-space: nowrap;
}

.workspace-panel .workspace-summary strong {
  margin-top: 0.08rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.workspace-panel .workspace-actions .button {
  min-height: 2.1rem;
  padding: 0.32rem 0.62rem;
  font-size: 0.78rem;
}

.timer-shell,
.offline-entries-list {
  margin-top: 1rem;
}

.timer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.timer-summary-card,
.offline-entry-summary {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.timer-summary-card {
  padding: 1.2rem;
  background:
    linear-gradient(135deg, rgba(181, 82, 51, 0.12), rgba(31, 107, 95, 0.1)),
    rgba(255, 255, 255, 0.9);
}

.timer-summary-label,
.timer-summary-meta,
.offline-entry-summary span {
  margin: 0;
  color: var(--muted);
}

.timer-duration {
  margin: 0.35rem 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  color: var(--highlight);
}

.timer-summary-text {
  margin: 0;
  max-width: 44ch;
  font-size: 1rem;
}

.timer-summary-meta {
  margin-top: 0.8rem;
  font-size: 0.95rem;
}

.timer-type-toggle {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.timer-type-toggle-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-right: 0.15rem;
}

.timer-type-toggle-button {
  min-height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  font-size: 0.84rem;
  cursor: pointer;
}

.timer-type-toggle-button.is-active {
  border-color: var(--brand);
  background: rgba(181, 82, 51, 0.12);
  color: var(--brand-dark);
  font-weight: 700;
}

.manual-entry-type-toggle {
  margin-top: 0;
  min-height: 2.8rem;
  align-items: center;
}

.manual-entry-type-toggle .timer-type-toggle-button {
  flex: 1 1 7.5rem;
}

.timer-summary-actions {
  margin-top: 0.9rem;
  justify-content: flex-start;
  gap: 0.5rem;
}

.timer-summary-actions .button {
  min-height: 2.5rem;
  padding: 0.5rem 0.85rem;
}

.timer-actions,
.offline-entry-actions,
.offline-entry-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.timer-actions {
  align-content: start;
}

.timer-actions .button {
  width: 100%;
}

.timer-slots {
  display: grid;
  grid-template-columns: 1fr;
}

.timer-slot-card {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
}

.timer-slot-type-row {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.timer-slot-type-row .timer-type-toggle-button {
  min-height: 1.95rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
}

.timer-slot-card.is-running {
  border-color: rgba(31, 107, 95, 0.35);
  background: rgba(31, 107, 95, 0.12);
}

.timer-slot-card span {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
  color: var(--highlight);
}

.attendance-slot-card {
  border-style: dashed;
}

.attendance-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.attendance-history-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.84rem;
}

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

.entry-time-type-badge {
  border: 1px solid rgba(31, 107, 95, 0.32);
  background: rgba(31, 107, 95, 0.12);
  color: var(--text);
}

.entry-time-type-badge.is-travel {
  border-color: rgba(181, 82, 51, 0.4);
  background: rgba(181, 82, 51, 0.14);
}

.offline-sync-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

.offline-entries-list {
  display: grid;
  gap: 0.9rem;
}

.offline-quick-stats {
  margin-top: 0.85rem;
}

.offline-group-section {
  display: grid;
  gap: 0.65rem;
}

.offline-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.offline-group-head h3 {
  margin: 0;
  font-size: 1rem;
}

.offline-group-list {
  display: grid;
  gap: 0.75rem;
}

.offline-section-empty {
  margin-top: 0;
}

.offline-entry-card {
  display: grid;
  gap: 0.75rem;
}

.offline-entry-card.is-ready {
  border-color: rgba(31, 107, 95, 0.25);
}

.offline-entry-card.is-open {
  border-color: rgba(181, 82, 51, 0.28);
}

.offline-entry-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.offline-entry-topline h3 {
  font-size: 1.05rem;
}

.offline-missing-hint {
  margin: 0;
  color: var(--brand-dark);
  font-size: 0.9rem;
}

.offline-entry-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0.95rem;
}

.offline-entry-summary strong {
  display: block;
  margin-top: 0.2rem;
  font-family: "Space Grotesk", sans-serif;
}

.offline-entry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.offline-entry-grid-main {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.inline-select-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.inline-create-button.button {
  min-height: 2.05rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.76rem;
  white-space: nowrap;
}

.offline-inline-select-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem;
  align-items: center;
}

.offline-inline-jump-button.button {
  min-height: 2.05rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.76rem;
  white-space: nowrap;
}

.offline-entry-details {
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
  background: rgba(255, 255, 255, 0.46);
}

.offline-entry-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
}

.offline-entry-details[open] {
  background: rgba(255, 255, 255, 0.7);
}

.offline-entry-grid-extra {
  margin-top: 0.7rem;
}

body.is-offline .status-bar:not(.warning) {
  background: rgba(181, 82, 51, 0.12);
  color: var(--brand-dark);
}

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

.plan-feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.plan-feature-control {
  display: grid;
  grid-template-columns: 260px 128px;
  column-gap: 0.55rem;
  row-gap: 0.2rem;
  align-items: center;
  justify-content: start;
}

.plan-feature-item {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  width: 100%;
  min-width: 0;
}

.plan-feature-item input[type="checkbox"] {
  width: 1rem;
  min-height: 1rem;
  height: 1rem;
  padding: 0;
  margin: 0;
  accent-color: var(--brand);
}

.plan-feature-item span {
  font-size: 0.94rem;
}

.feature-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  margin-top: 0.28rem;
}

.feature-checklist label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.feature-checklist label span {
  display: inline;
  font-weight: 600;
}

.feature-checklist input[type="checkbox"] {
  width: 1rem;
  min-height: 1rem;
  height: 1rem;
  padding: 0;
  margin: 0;
  accent-color: var(--brand);
}

.feature-checklist input[type="checkbox"]:disabled {
  opacity: 0.55;
}

.plan-inline-limit-input {
  min-height: 2rem;
  width: 100%;
  padding: 0.34rem 0.45rem;
  border-radius: 9px;
}

.plan-inline-limit-input:disabled {
  opacity: 0.58;
}

.plan-inline-limit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  width: 100%;
  padding-left: 0.45rem;
  margin-left: 0.1rem;
  border-left: 1px dashed var(--line);
  justify-self: start;
}

.plan-inline-limit-caption {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 600;
}

label span {
  font-size: 0.94rem;
}

input,
textarea,
select {
  width: 100%;
  min-height: 3.1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .user-search input {
  color: #11161b;
  background: rgba(255, 255, 255, 0.94);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(181, 82, 51, 0.18);
  border-color: rgba(181, 82, 51, 0.5);
}

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

.actions {
  flex-wrap: wrap;
  margin-top: 1rem;
}

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

.form-grid-two .actions,
.form-grid-two .field-full {
  grid-column: 1 / -1;
}

.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
  min-height: 3.1rem;
}

.checkbox-label input[type="checkbox"] {
  width: 1.1rem;
  min-height: 1.1rem;
  height: 1.1rem;
  padding: 0;
}

.compact-inline-filter {
  margin: 0.35rem 0 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.compact-filters {
  margin-top: 0.9rem;
  align-items: flex-end;
}

.compact-filters label {
  min-width: 180px;
}

.compact-filters .actions {
  margin-top: 0;
}

.fleet-image-preview {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.fleet-image-preview img {
  width: min(100%, 280px);
  max-height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}

#profileCompanyLogoPreview {
  width: min(100%, 240px);
  max-height: 120px;
  object-fit: contain;
  background: #fff;
  padding: 0.3rem 0.45rem;
}

.fleet-vehicle-thumb {
  width: 72px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 0.35rem;
}

.fleet-trip-history-panel {
  margin-top: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  display: grid;
  gap: 0.45rem;
}

.fleet-trip-history-row {
  display: grid;
  gap: 0.12rem;
}

.fleet-trip-history-row span,
.fleet-trip-history-row small {
  color: var(--muted);
  font-size: 0.83rem;
}

.report-checkbox-label {
  min-width: 13rem;
  align-self: end;
}

.report-checkbox-label input[type="checkbox"] {
  width: 1.05rem;
  min-height: 1.05rem;
  height: 1.05rem;
  padding: 0;
  justify-self: start;
}

.theme-toggle-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.theme-toggle-control {
  position: relative;
  width: 2.8rem;
  height: 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-control input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  cursor: pointer;
}

.theme-toggle-slider {
  width: 2.8rem;
  height: 1.6rem;
  border-radius: 999px;
  background: rgba(24, 32, 40, 0.2);
  border: 1px solid var(--line);
  transition: background 0.2s ease;
  position: relative;
}

.theme-toggle-slider::after {
  content: "";
  position: absolute;
  top: 0.13rem;
  left: 0.13rem;
  width: 1.22rem;
  height: 1.22rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.theme-toggle-control input:checked + .theme-toggle-slider {
  background: rgba(31, 107, 95, 0.42);
}

.theme-toggle-control input:checked + .theme-toggle-slider::after {
  transform: translateX(1.2rem);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrap input {
  width: 100%;
  padding-right: 3.1rem;
}

.password-toggle {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(24, 32, 40, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.password-toggle:hover {
  background: rgba(24, 32, 40, 0.14);
}

.password-eye {
  position: relative;
  width: 1.02rem;
  height: 0.66rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-eye-dot {
  width: 0.26rem;
  height: 0.26rem;
  border-radius: 999px;
  background: currentColor;
}

.password-toggle.is-visible .password-eye::before {
  content: "";
  position: absolute;
  width: 0.95rem;
  height: 2px;
  background: currentColor;
  transform: rotate(-35deg);
}

.button,
.icon-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.button {
  min-height: 3.1rem;
  padding: 0.85rem 1.2rem;
  font-weight: 700;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.button-secondary,
.icon-button {
  color: var(--text);
  background: rgba(24, 32, 40, 0.07);
}

a.upgrade-hint-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.75rem;
  padding: 0.22rem 0.5rem;
  border-radius: 8px;
  background: rgba(24, 32, 40, 0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
}

.danger-button {
  color: #fff;
  background: linear-gradient(135deg, #b33c3c, #8f2020);
}

.badge {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(31, 107, 95, 0.1);
  color: var(--highlight);
  font-weight: 700;
}

.entries-list,
.report-output {
  display: grid;
  gap: 0.85rem;
}

.entry-card,
.report-card {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.management-card {
  padding: 0.9rem;
  border-radius: 18px;
}

.management-card .entry-title {
  font-size: 1.02rem;
}

.management-card .entry-subtitle {
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.compact-topline {
  align-items: flex-start;
}

.management-card .entry-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem 0.75rem;
  margin-top: 0.85rem;
}

.management-card .entry-meta div {
  padding-top: 0.45rem;
}

.management-card .entry-meta dt {
  font-size: 0.78rem;
}

.management-card .entry-meta dd {
  font-size: 0.98rem;
}

.management-card .user-card-actions {
  margin-top: 0.85rem;
}

.mainuser-plan-assign {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
}

.mainuser-plan-select {
  min-height: 2.2rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
}

.mainuser-plan-save.button {
  min-height: 2.2rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
}

.management-card .button,
.management-card .icon-button {
  min-height: 2.9rem;
  padding-top: 0.72rem;
  padding-bottom: 0.72rem;
}

.management-card .badge {
  padding: 0.35rem 0.7rem;
}

.compact-management-list {
  gap: 0.55rem;
}

.compact-management-card {
  padding: 0.72rem 0.8rem;
}

.compact-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.compact-management-card > .actions {
  margin-top: 0.55rem;
}

.compact-management-card .button {
  min-height: 2.2rem;
  padding: 0.38rem 0.62rem;
  font-size: 0.78rem;
}

.management-card-entry {
  padding: 0.8rem;
}

.management-card-entry .entry-title {
  font-size: 0.98rem;
}

.management-card-entry .entry-subtitle {
  font-size: 0.86rem;
}

.management-card-entry .entry-meta {
  margin-top: 0.6rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem 0.65rem;
}

.management-card-entry .entry-meta div {
  padding-top: 0.35rem;
}

.management-card-entry .entry-meta dt {
  font-size: 0.73rem;
}

.management-card-entry .entry-meta dd {
  font-size: 0.88rem;
}

.management-card-entry .entry-side-fields {
  margin-top: 0.6rem;
  gap: 0.35rem;
  align-items: center;
}

.management-card-entry .entry-side-badge {
  padding: 0.2rem 0.5rem;
  font-size: 0.73rem;
  font-weight: 600;
}

.management-card-entry .entry-edit-button,
.management-card-entry .entry-delete-button {
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.status-indicator-group {
  cursor: default;
}

.status-indicator-group .status-indicator {
  cursor: default;
  user-select: none;
  opacity: 0.92;
  box-shadow: none;
}

.status-indicator-group .user-subusers-link-button {
  min-height: 2rem;
  padding: 0.28rem 0.56rem;
  font-size: 0.78rem;
}

.status-indicator-group .user-status-edit-link {
  cursor: pointer;
  user-select: auto;
  text-decoration: underline;
  text-underline-offset: 0.12rem;
}

#subusersList .user-edit-button {
  display: none !important;
}

#subusersList .subuser-inline-actions {
  align-items: center;
}

#subusersList .subuser-inline-actions .button {
  min-height: 2rem;
  padding: 0.32rem 0.58rem;
  font-size: 0.78rem;
}

#subusersList .user-status-pill {
  cursor: pointer;
}

#subusersList .user-status-pill.is-inactive {
  background: rgba(159, 45, 45, 0.12);
  color: var(--danger);
}

#employeesList {
  gap: 0.38rem;
}

#employeesList .employee-compact-row {
  padding: 0.56rem 0.68rem;
  border-radius: 12px;
}

#employeesList .employee-compact-row .entry-title {
  font-size: 0.94rem;
  line-height: 1.18;
}

#employeesList .employee-compact-row .entry-subtitle {
  margin-top: 0.04rem;
  font-size: 0.76rem;
  line-height: 1.2;
}

#employeesList .employee-compact-row .actions {
  margin-top: 0.2rem;
  gap: 0.3rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

#employeesList .employee-compact-row .button {
  min-height: 1.75rem;
  padding: 0.24rem 0.48rem;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1;
}

#employeesList .employee-compact-row .badge {
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
}

#activitiesList {
  gap: 0.38rem;
}

#activitiesList .activity-compact-row {
  padding: 0.56rem 0.68rem;
  border-radius: 12px;
}

#activitiesList .activity-compact-row .entry-title {
  font-size: 0.94rem;
  line-height: 1.18;
}

#activitiesList .activity-compact-row .entry-subtitle {
  margin-top: 0.04rem;
  font-size: 0.76rem;
  line-height: 1.2;
}

#activitiesList .activity-compact-row .activity-meta {
  margin-top: 0.45rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem 0.58rem;
}

#activitiesList .activity-compact-row .activity-meta div {
  padding-top: 0.34rem;
}

#activitiesList .activity-compact-row .activity-meta dt {
  font-size: 0.72rem;
}

#activitiesList .activity-compact-row .activity-meta dd {
  font-size: 0.84rem;
}

#activitiesList .activity-side-fields {
  margin-top: 0.16rem;
  gap: 0.28rem;
  align-items: center;
}

#activitiesList .activity-side-badge {
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
}

#activitiesList .activity-compact-row .activity-edit-button,
#activitiesList .activity-compact-row .activity-delete-button {
  min-height: 1.75rem;
  padding: 0.24rem 0.48rem;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1;
}

#fleetVehiclesList {
  gap: 0.38rem;
}

#fleetVehiclesList .fleet-compact-row {
  padding: 0.56rem 0.68rem;
  border-radius: 12px;
}

#fleetVehiclesList .fleet-compact-row .entry-title {
  font-size: 0.94rem;
  line-height: 1.18;
}

#fleetVehiclesList .fleet-compact-row .entry-subtitle {
  margin-top: 0.04rem;
  font-size: 0.76rem;
  line-height: 1.2;
}

#fleetVehiclesList .fleet-compact-row .actions {
  margin-top: 0.2rem;
  gap: 0.3rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

#fleetVehiclesList .fleet-compact-row .button {
  min-height: 1.75rem;
  padding: 0.24rem 0.48rem;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1;
}

#fleetVehiclesList .fleet-compact-row .badge {
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
}

.entry-title {
  font-size: 1.1rem;
}

.icon-button {
  padding: 0.7rem 0.9rem;
}

.entry-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
  margin: 1rem 0 0;
}

.entry-meta div {
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.entry-meta dt,
.entry-meta dd {
  margin: 0;
}

.entry-meta dd {
  font-weight: 700;
}

.todo-page {
  gap: 0.6rem;
}

.todo-page .panel-head .hero-meta {
  font-size: 0.86rem;
}

.todo-filters {
  margin-top: 0.1rem;
  gap: 0.5rem;
  grid-template-columns: minmax(220px, 1.7fr) repeat(2, minmax(150px, 1fr));
}

.todo-filters label {
  gap: 0.12rem;
}

.todo-filters label span {
  font-size: 0.8rem;
}

.todo-filters input,
.todo-filters select {
  min-height: 2.28rem;
  padding: 0.46rem 0.68rem;
  border-radius: 11px;
}

.todo-list {
  gap: 0.38rem;
}

.todo-row {
  padding: 0.56rem 0.68rem;
  border-radius: 12px;
}

.todo-row-main {
  display: grid;
  grid-template-columns: minmax(170px, 1.8fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.todo-row .entry-title {
  font-size: 0.94rem;
  line-height: 1.18;
}

.todo-row .entry-subtitle {
  margin-top: 0.02rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.todo-row .todo-row-badges {
  justify-content: flex-start;
  gap: 0.35rem;
}

.todo-row .todo-row-badges .badge {
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.todo-row .todo-row-actions {
  margin-top: 0;
  gap: 0.3rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.todo-row .todo-row-actions .button {
  min-height: 1.75rem;
  padding: 0.24rem 0.48rem;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1;
}

.todo-row-description {
  margin: 0.34rem 0 0;
  padding-top: 0.3rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--muted);
}

.fleet-trip-row {
  padding: 0.56rem 0.68rem;
  border-radius: 12px;
}

.fleet-trip-row-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.9fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.fleet-trip-row .entry-title {
  font-size: 0.94rem;
  line-height: 1.18;
}

.fleet-trip-row .entry-subtitle {
  margin-top: 0.02rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.fleet-trip-row-badges {
  justify-content: flex-start;
  gap: 0.35rem;
}

.fleet-trip-row-badges .badge {
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.fleet-trip-row-actions {
  margin-top: 0;
  gap: 0.3rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.fleet-trip-row-actions .button {
  min-height: 1.75rem;
  padding: 0.24rem 0.48rem;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1;
}

.fleet-trip-row-note {
  margin: 0.34rem 0 0;
  padding-top: 0.3rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  line-height: 1.3;
  color: var(--muted);
}

#plansList {
  gap: 0.38rem;
}

.plan-row {
  padding: 0.56rem 0.68rem;
  border-radius: 12px;
}

.plan-row .plan-row-main {
  display: grid;
  grid-template-columns: minmax(180px, 1.9fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.plan-row .entry-title {
  font-size: 0.94rem;
  line-height: 1.18;
}

.plan-row .entry-subtitle {
  margin-top: 0.02rem;
  font-size: 0.74rem;
  line-height: 1.2;
}

.plan-row .plan-row-badges {
  justify-content: flex-start;
  gap: 0.35rem;
}

.plan-row .plan-row-badges .badge {
  padding: 0.18rem 0.45rem;
  font-size: 0.7rem;
}

.plan-row .plan-row-actions {
  margin-top: 0;
  gap: 0.3rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.plan-row .plan-row-actions .button {
  min-height: 1.75rem;
  padding: 0.24rem 0.48rem;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1;
}

.plan-row .plan-row-meta {
  margin: 0.3rem 0 0;
  padding-top: 0.26rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  line-height: 1.28;
  color: var(--muted);
}

.report-controls {
  margin-top: 1rem;
  flex-wrap: wrap;
}

.export-actions {
  justify-content: flex-end;
}

.export-actions .button {
  min-width: 11rem;
}

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

.report-summary article {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
}

.report-summary span {
  display: block;
  color: var(--muted);
}

.report-summary strong {
  display: block;
  margin-top: 0.25rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
}

.report-summary article,
.entry-card,
.report-card,
.status-bar,
.badge {
  overflow-wrap: anywhere;
}

.report-compose-panel {
  margin-top: 0.95rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
  display: grid;
  gap: 0.55rem;
}

.report-pending-list {
  display: grid;
  gap: 0.4rem;
}

.report-pending-group {
  border: 1px solid var(--line);
  border-left-width: 6px;
  border-radius: 12px;
  overflow: hidden;
}

.report-pending-group.tone-a {
  background: rgba(34, 107, 179, 0.06);
  border-left-color: rgba(34, 107, 179, 0.55);
}

.report-pending-group.tone-b {
  background: rgba(181, 82, 51, 0.08);
  border-left-color: rgba(181, 82, 51, 0.55);
}

.report-pending-group-header {
  padding: 0.48rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid rgba(24, 32, 40, 0.08);
}

.report-pending-group.tone-a .report-pending-group-header {
  background: rgba(34, 107, 179, 0.12);
}

.report-pending-group.tone-b .report-pending-group-header {
  background: rgba(181, 82, 51, 0.14);
}

.report-pending-group-body {
  display: grid;
}

.report-pending-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.85);
}

.report-pending-group .report-pending-row {
  border: 0;
  border-top: 1px solid rgba(24, 32, 40, 0.08);
  border-radius: 0;
  padding-left: 0.7rem;
  padding-right: 0.7rem;
}

.report-pending-group .report-pending-row:first-child {
  border-top: 0;
}

.report-pending-group.tone-a .report-pending-row {
  background: rgba(234, 243, 252, 0.96);
}

.report-pending-group.tone-b .report-pending-row {
  background: rgba(252, 241, 236, 0.96);
}

.report-pending-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.report-pending-meta {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.report-pending-main {
  font-size: 0.9rem;
}

.report-pending-side {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: right;
}

.report-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.report-sections {
  display: grid;
  gap: 1rem;
}

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

.report-section {
  display: grid;
  gap: 0.2rem;
}

.report-section-head {
  margin-bottom: 0.2rem;
}

.report-card {
  padding: 0;
  overflow: hidden;
}

.report-summary-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.7rem;
  padding: 0.8rem 1rem;
}

.report-summary-row {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(8rem, 0.95fr) 4.5rem 6.5rem 8rem 7.5rem;
  gap: 0.8rem;
  align-items: center;
  text-align: left;
  padding: 0.15rem 0;
  cursor: pointer;
}

.report-summary-row:hover {
  background: rgba(181, 82, 51, 0.05);
}

.report-card.is-open .report-summary-row {
  border-bottom: 1px solid var(--line);
  background: rgba(181, 82, 51, 0.04);
}

.report-summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.report-summary-pdf-button {
  white-space: nowrap;
}

.report-summary-main {
  min-width: 0;
  display: grid;
  gap: 0.14rem;
}

.report-summary-main strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
}

.report-summary-main span,
.report-summary-date,
.report-summary-hours,
.report-summary-count,
.report-summary-total {
  color: var(--muted);
  font-size: 0.88rem;
}

.report-summary-count,
.report-summary-hours,
.report-summary-total {
  text-align: right;
}

.report-summary-status {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.9);
}

.report-summary-status.is-signed {
  color: #0d6b34;
  background: rgba(82, 181, 114, 0.12);
  border-color: rgba(82, 181, 114, 0.22);
}

.report-summary-status.is-open {
  color: #8b5a16;
  background: rgba(232, 184, 76, 0.16);
  border-color: rgba(232, 184, 76, 0.26);
}

.report-summary-status.is-archived {
  color: #44536a;
  background: rgba(154, 174, 196, 0.18);
  border-color: rgba(154, 174, 196, 0.32);
}

.report-detail-panel {
  padding: 1rem;
  display: grid;
  gap: 0.85rem;
}

.report-card-header-compact {
  margin-bottom: 0.2rem;
}

.report-table-grouped {
  gap: 0.8rem;
}

.report-day-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  border-left-width: 6px;
}

.report-day-group.tone-a {
  background: rgba(34, 107, 179, 0.07);
  border-left-color: rgba(34, 107, 179, 0.55);
}

.report-day-group.tone-b {
  background: rgba(181, 82, 51, 0.09);
  border-left-color: rgba(181, 82, 51, 0.55);
}

.report-day-header {
  padding: 0.55rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid rgba(24, 32, 40, 0.1);
}

.report-day-group.tone-a .report-day-header {
  background: rgba(34, 107, 179, 0.12);
}

.report-day-group.tone-b .report-day-header {
  background: rgba(181, 82, 51, 0.14);
}

.report-day-rows {
  display: grid;
}

.report-company-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--line);
}

.report-company-brand-meta {
  min-width: 0;
}

.report-company-logo {
  width: auto;
  height: 52px;
  max-width: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 0.22rem 0.4rem;
}

.report-card-header,
.report-row,
.report-footer {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr 0.8fr 0.8fr;
  gap: 0.75rem;
  align-items: start;
}

.report-card-header {
  margin-bottom: 0.9rem;
}

.report-table {
  display: grid;
  gap: 0.75rem;
}

.report-material-section {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.report-material-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.report-material-summary {
  display: grid;
  gap: 0.15rem;
  justify-items: end;
  text-align: right;
}

.report-material-summary span {
  color: var(--muted);
  font-size: 0.84rem;
}

.report-material-editor {
  display: grid;
  gap: 0.75rem;
  padding: 0.8rem;
  border: 1px dashed rgba(24, 32, 40, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.report-material-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(7rem, 0.55fr) auto;
  gap: 0.75rem;
  align-items: end;
}

.report-material-field {
  min-width: 0;
}

.report-material-field span {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}

.report-inline-select-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.report-material-field select,
.report-material-field input {
  min-height: 2.5rem;
}

.report-inline-add-button {
  min-width: 2.15rem;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.report-material-form-actions {
  justify-content: flex-end;
  align-self: end;
}

.report-material-list {
  display: grid;
  gap: 0.55rem;
}

.report-material-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.report-material-line-main {
  min-width: 0;
  display: grid;
  gap: 0.12rem;
}

.report-material-line-main span,
.report-material-line-main small {
  color: var(--muted);
}

.report-material-line-main small {
  font-size: 0.82rem;
}

.report-material-line-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-cost-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.report-cost-summary-item {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  gap: 0.18rem;
}

.report-cost-summary-item span {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.report-cost-summary-item-accent {
  background: rgba(181, 82, 51, 0.08);
  border-color: rgba(181, 82, 51, 0.22);
}

.report-row {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.report-day-rows .report-row:first-child {
  border-top: 0;
}

.report-day-group .report-row {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.report-day-group.tone-a .report-row {
  background: rgba(34, 107, 179, 0.03);
}

.report-day-group.tone-b .report-row {
  background: rgba(181, 82, 51, 0.04);
}

.report-cell {
  min-width: 0;
}

.report-cell strong,
.report-cell h3 {
  overflow-wrap: anywhere;
}

.report-cell-accent {
  background: rgba(181, 82, 51, 0.06);
  border-radius: 16px;
  padding: 0.7rem 0.8rem;
}

.report-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.report-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid rgba(24, 32, 40, 0.12);
  font-weight: 700;
}

.report-footer strong {
  font-family: "Space Grotesk", sans-serif;
}

.report-signature-block {
  margin-top: 1rem;
  padding-top: 0.95rem;
  border-top: 1px dashed rgba(24, 32, 40, 0.2);
  display: grid;
  gap: 0.75rem;
}

.report-signature-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: flex-start;
}

.report-signature-summary {
  display: grid;
  gap: 0.2rem;
}

.report-archive-summary {
  display: grid;
  gap: 0.2rem;
}

.report-archive-summary span,
.report-signature-summary span {
  color: var(--muted);
  font-size: 0.93rem;
}

.report-signature-image {
  max-width: min(100%, 520px);
  max-height: 180px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
}

.report-signature-editor,
.report-email-editor {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  color: #11161b;
}

.report-signature-editor label span,
.report-email-editor label span {
  color: #11161b;
}

.report-email-editor input[type="email"] {
  min-height: 2.5rem;
}

.report-email-hint {
  color: #3d4955;
  font-size: 0.92rem;
  line-height: 1.45;
}

.report-signature-customer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.report-signature-customer-row select {
  min-height: 2.2rem;
}

.report-signature-add-customer {
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.report-signature-canvas-wrap {
  background: #fff;
  border: 1px dashed rgba(24, 32, 40, 0.35);
  border-radius: var(--radius-md);
  padding: 0.45rem;
}

.report-signature-canvas {
  width: 100%;
  min-height: 140px;
  border-radius: 10px;
  display: block;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.report-signature-workspace {
  max-width: 1180px;
  margin-inline: auto;
}

.report-output-standalone {
  margin-top: 0.35rem;
}

.report-list-standalone {
  display: grid;
}

.report-card-standalone {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.report-card-standalone .report-detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.report-signature-summary-bar {
  display: none;
}

.profile-company-fields {
  margin-top: 0.35rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.52);
}

.profile-company-heading h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.welcome-tour-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 1rem;
}

.welcome-tour-sidebar,
.welcome-tour-stage {
  min-width: 0;
}

.welcome-tour-progress-card,
.welcome-tour-stage-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.welcome-tour-progress-card {
  padding: 1rem;
}

.welcome-tour-progress-card h3 {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.05rem;
}

.welcome-tour-progress-bar {
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(31, 107, 95, 0.12);
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.welcome-tour-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #1f6b5f, #56a68f);
  border-radius: inherit;
}

.welcome-tour-step-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.welcome-tour-step-item {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.85rem;
  text-align: left;
  color: inherit;
}

.welcome-tour-step-item.is-active {
  border-color: rgba(31, 107, 95, 0.55);
  box-shadow: 0 0 0 1px rgba(31, 107, 95, 0.18);
}

.welcome-tour-step-index {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 107, 95, 0.12);
  font-weight: 700;
}

.welcome-tour-step-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.welcome-tour-step-copy strong,
.welcome-tour-summary-box strong {
  font-family: "Space Grotesk", sans-serif;
}

.welcome-tour-step-copy small {
  color: var(--muted);
}

.badge-success {
  background: rgba(31, 107, 95, 0.12);
  color: #1f6b5f;
}

.badge-warning {
  background: rgba(200, 130, 32, 0.14);
  color: #8b5c12;
}

.badge-muted {
  background: rgba(61, 73, 85, 0.1);
  color: #51606f;
}

.welcome-tour-stage-card {
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.welcome-tour-stage-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
}

.welcome-tour-stage-head h3 {
  margin: 0.1rem 0 0.35rem;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

.welcome-tour-stage-body {
  display: grid;
  gap: 0.85rem;
}

.welcome-tour-summary-box {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(31, 107, 95, 0.07);
  border: 1px solid rgba(31, 107, 95, 0.12);
}

.welcome-tour-summary-box p {
  margin: 0.4rem 0 0;
}

.welcome-tour-action-row,
.welcome-tour-stage-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.welcome-tour-stage-footer {
  justify-content: space-between;
}

@media (max-width: 900px) {
  .welcome-tour-layout {
    grid-template-columns: 1fr;
  }
}

.empty-state {
  padding: 1rem;
  text-align: center;
  border: 1px dashed rgba(24, 32, 40, 0.18);
  border-radius: var(--radius-lg);
}

.page-panel .user-search {
  margin-top: 0;
}

.page-panel .user-search input {
  min-height: 3rem;
}

@media (max-width: 820px) {
  .page-split-grid {
    grid-template-columns: 1fr;
  }

  .report-company-brand-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-company-logo {
    height: 42px;
    max-width: 180px;
  }

  .hero {
    gap: 0.85rem;
    margin: 0.75rem 0 1rem;
  }

  .hero-copy,
  .auth-copy {
    font-size: 1rem;
  }

  .topbar {
    position: sticky;
    top: 0.5rem;
    z-index: 5;
    background: rgba(255, 252, 247, 0.95);
  }

  .app-nav {
    position: sticky;
    top: 6.8rem;
    z-index: 4;
    background: rgba(255, 252, 247, 0.95);
  }

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

  .report-pending-row {
    grid-template-columns: auto auto 1fr;
  }

  .report-material-form-grid,
  .report-material-line,
  .report-cost-summary {
    grid-template-columns: 1fr;
  }

  .report-inline-select-row {
    grid-template-columns: 1fr auto;
  }

  .report-material-summary,
  .report-material-line-actions,
  .report-material-form-actions {
    justify-items: start;
    justify-content: flex-start;
    text-align: left;
  }

  .report-pending-side {
    grid-column: 2 / span 2;
    text-align: left;
  }

  .report-summary-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(7rem, 1fr) 4rem 5.2rem;
  }

  .report-summary-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.45rem;
  }

  .report-summary-actions {
    justify-content: flex-start;
  }

  .report-summary-total,
  .report-summary-status {
    display: none;
  }

  .timer-shell,
  .offline-sync-head,
  .offline-entry-topline {
    grid-template-columns: 1fr;
  }

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

  .page-entries .workspace-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.24rem;
  }
}

@media (max-width: 980px) {
  .hero,
  .auth-grid,
  .layout {
    grid-template-columns: 1fr;
  }

  .timer-shell,
  .offline-entry-grid {
    grid-template-columns: 1fr;
  }

  .offline-entry-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-form,
  .panel-list,
  .panel-report,
  .panel-admin {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 1rem, 100%);
    padding-bottom: 1.5rem;
  }

  .hero > div:first-child,
  .hero-card,
  .panel {
    padding: 1rem;
    border-radius: 22px;
  }

  .field-grid,
  .entry-meta,
  .report-summary,
  .report-card-header,
  .report-row,
  .report-footer,
  .offline-entry-summary,
  .offline-entry-grid {
    grid-template-columns: 1fr;
  }

  .report-summary-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    align-items: start;
  }

  .report-summary-head {
    padding: 0.85rem 1rem;
  }

  .report-summary-date,
  .report-summary-count,
  .report-summary-hours,
  .report-summary-total,
  .report-summary-status {
    justify-self: start;
    text-align: left;
  }

  .report-summary-total,
  .report-summary-status {
    display: inline-flex;
  }

  .page-entries .workspace-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.2rem;
  }

  .page-entries .workspace-panel .workspace-summary article {
    padding: 0.3rem 0.34rem;
  }

  .page-entries .workspace-panel .workspace-summary span {
    font-size: 0.52rem;
  }

  .page-entries .workspace-panel .workspace-summary strong {
    font-size: 0.72rem;
  }

  .button,
  .icon-button {
    width: 100%;
  }

  .hero {
    margin-top: 0.5rem;
  }

  .app-nav {
    position: static;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
  }

  .nav-link {
    width: 100%;
  }

  h1 {
    max-width: none;
    font-size: clamp(1.85rem, 10vw, 2.6rem);
  }

  h2 {
    font-size: 1.35rem;
  }

  .hero-copy,
  .auth-copy,
  .hero-meta,
  .entry-subtitle {
    font-size: 0.96rem;
  }

  .hero-stat {
    font-size: 2.3rem;
  }

  .topbar {
    position: sticky;
    top: 0.35rem;
    margin-bottom: 0.9rem;
    z-index: 10;
  }

  .topbar-actions .badge,
  #sessionScope {
    width: 100%;
    text-align: center;
  }

  .field-grid {
    gap: 0.75rem;
  }

  label span,
  .report-label {
    font-size: 0.78rem;
  }

  input,
  textarea,
  select,
  .button,
  .icon-button {
    min-height: 3.25rem;
  }

  textarea {
    min-height: 7rem;
  }

  .actions {
    gap: 0.6rem;
  }

  .entry-card,
  .report-card,
  .report-summary article {
    padding: 0.9rem;
  }

  .report-card {
    padding: 0;
  }

  .entry-topline {
    gap: 0.85rem;
  }

  .entry-title,
  .report-summary strong {
    font-size: 1.05rem;
  }

  .report-controls {
    gap: 0.9rem;
  }

  .plan-feature-control {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .plan-inline-limit-wrap {
    border-left: 0;
    padding-left: 0;
    margin-left: 0;
  }

  .todo-filters {
    grid-template-columns: 1fr;
  }

  .todo-row-main {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.38rem;
  }

  .todo-row .todo-row-badges {
    justify-content: flex-start;
  }

  .todo-row .todo-row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .todo-row .todo-row-actions .button {
    width: 100%;
  }

  .fleet-trip-row-main {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.38rem;
  }

  .fleet-trip-row-badges {
    justify-content: flex-start;
  }

  .fleet-trip-row-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-content: stretch;
  }

  .fleet-trip-row-actions .button {
    width: 100%;
  }

  .plan-row .plan-row-main {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.38rem;
  }

  .plan-row .plan-row-badges {
    justify-content: flex-start;
  }

  .plan-row .plan-row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .plan-row .plan-row-actions .button {
    width: 100%;
  }

  .export-actions .button {
    width: 100%;
    min-width: 0;
  }

  .timer-shell,
  .offline-sync-head,
  .offline-entry-topline,
  .offline-entry-actions,
  .offline-entry-badges {
    flex-direction: column;
    align-items: stretch;
  }

  .report-summary {
    gap: 0.65rem;
  }

  .report-row,
  .report-footer {
    gap: 0.45rem;
    padding-top: 0.8rem;
    padding-bottom: 0.1rem;
  }

  .report-card-header {
    gap: 0.55rem;
    margin-bottom: 0.5rem;
  }

  .report-table {
    gap: 0.4rem;
  }

  .report-card-header,
  .report-row,
  .report-footer {
    background: rgba(255, 255, 255, 0.48);
    border-radius: 18px;
    padding: 0.7rem;
  }

  .report-day-group .report-row {
    border-radius: 0;
    padding: 0.7rem;
  }

  .report-row {
    border-top: 0;
  }

  .report-cell {
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(24, 32, 40, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
  }

  .report-day-group.tone-a .report-cell {
    background: rgba(234, 243, 252, 0.98);
  }

  .report-day-group.tone-b .report-cell {
    background: rgba(252, 241, 236, 0.98);
  }

  .report-cell-accent {
    background: linear-gradient(135deg, rgba(181, 82, 51, 0.12), rgba(181, 82, 51, 0.05));
    border-color: rgba(181, 82, 51, 0.14);
    padding: 0.75rem 0.85rem;
  }

  .report-label {
    margin-bottom: 0.18rem;
  }

  .report-cell-wide strong + div,
  .report-cell div:last-child {
    margin-top: 0.15rem;
  }

  .user-search {
    margin-top: 0.9rem;
  }

  .user-badges {
    justify-content: flex-start;
  }

  .management-card .entry-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mainuser-plan-assign {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .entry-topline,
  .report-controls,
  .actions,
  .topbar,
  .topbar-actions,
  .user-card-actions,
  .app-nav,
  .offline-sync-head {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: calc(100% - 0.75rem);
  }

  .hero > div:first-child,
  .hero-card,
  .panel {
    padding: 0.85rem;
    border-radius: 18px;
  }

  .eyebrow,
  .section-kicker {
    letter-spacing: 0.12em;
    font-size: 0.68rem;
  }

  .hero-stat {
    font-size: 2rem;
  }

  .report-summary article,
  .entry-card,
  .report-card {
    padding: 0.8rem;
  }

  .management-card {
    padding: 0.78rem;
  }

  .management-card .entry-meta {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .management-card .user-card-actions .button,
  .management-card .user-card-actions .icon-button {
    min-height: 3rem;
  }
}

@media print {
  body {
    background: #fff;
  }

  .hero,
  .auth-grid,
  .topbar,
  .panel-form,
  .panel-list,
  .panel-admin,
  .report-controls,
  .status-bar {
    display: none;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .panel-report {
    box-shadow: none;
    border: 0;
    background: #fff;
    padding: 0;
  }

  .report-card,
  .report-summary article {
    box-shadow: none;
    break-inside: avoid;
  }

  .report-company-logo {
    max-width: 180px;
    height: 44px;
  }
}

[data-theme="dark"] {
  --bg: #11161b;
  --panel: rgba(22, 28, 34, 0.86);
  --panel-strong: #1b2228;
  --text: #eef2f4;
  --muted: #a9b3bc;
  --line: rgba(255, 255, 255, 0.08);
  --brand: #e07d58;
  --brand-dark: #b95c3b;
  --highlight: #7dcdbd;
  --danger: #df6a6a;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.auth-screen {
  min-height: calc(100vh - 2rem);
  align-content: center;
  justify-items: center;
}

.auth-screen .auth-card {
  width: min(560px, 100%);
}

.auth-brand-card {
  grid-column: 1 / -1;
  width: min(860px, 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.6rem;
}

.auth-brand-logo {
  display: block;
  width: min(100%, 620px);
  height: auto;
}

.app-frame {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 1rem;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.sidebar-brand {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.brand-lockup {
  display: grid;
  gap: 0.35rem;
}

.brand-logo {
  display: block;
  width: 176px;
  max-width: 100%;
  height: auto;
}

.logo-dark-only {
  display: none;
}

[data-theme="dark"] .logo-light-only {
  display: none !important;
}

[data-theme="dark"] .logo-dark-only {
  display: block !important;
}

.brand-logo-icon {
  display: none;
  width: 40px;
}

.sidebar-brand strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sidebar-nav {
  display: grid;
  gap: 0.55rem;
}

.sidebar-footer {
  display: grid;
  gap: 0.55rem;
}

.sidebar-action,
.sidebar-toggle {
  width: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 3rem;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  color: var(--text);
  background: rgba(24, 32, 40, 0.05);
  text-decoration: none;
  font-weight: 700;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 auto;
}

.nav-icon-svg {
  width: 1.35rem;
  height: 1.35rem;
}

.nav-label {
  white-space: nowrap;
}

.app-main {
  display: grid;
  gap: 1rem;
}

.app-frame {
  display: block;
}

.sidebar,
.sidebar-backdrop {
  display: none !important;
}

.app-header-nav {
  display: grid;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
}

.header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.header-brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.header-brand .brand-logo-full {
  width: min(100%, 340px);
}

.header-brand .brand-logo-icon {
  display: none;
}

.header-tour-button {
  min-height: 2.3rem;
  padding: 0.42rem 0.72rem;
  white-space: nowrap;
}

.header-tour-control,
.profile-tour-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.header-tour-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: var(--muted);
  font: inherit;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.header-tour-dismiss:hover {
  color: var(--text);
  border-color: var(--brand);
}

.header-account-box {
  display: grid;
  gap: 0.35rem;
  justify-items: end;
  text-align: right;
}

.header-account-info .section-kicker {
  margin-bottom: 0.08rem;
  font-size: 0.64rem;
}

.header-company-logo-wrap {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.35rem;
}

.header-company-logo-wrap img {
  width: auto;
  height: 42px;
  max-width: 170px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.18rem 0.32rem;
}

.header-account-info #sessionName {
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  line-height: 1.05;
}

.header-account-info #sessionRole {
  margin-top: 0.08rem;
  font-size: 0.78rem;
}

.header-account-actions {
  justify-content: flex-end;
}

.header-account-actions .button {
  min-height: 2.1rem;
  padding: 0.38rem 0.62rem;
}

.header-account-actions .badge {
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
}

.admin-dashboard-logo-link .brand-logo-full {
  width: min(100%, 260px);
}

.admin-dashboard-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.admin-dashboard-tools .button {
  min-height: 2.4rem;
  padding: 0.45rem 0.8rem;
}

.admin-dashboard-quick-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.admin-dashboard-menu {
  margin-top: 0.35rem;
}

.admin-dashboard-menu .nav-link {
  min-height: 2.45rem;
  padding: 0.45rem 0.78rem;
  border: 0;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease, filter 0.1s ease;
}

.admin-dashboard-menu .nav-link:hover {
  background: rgba(24, 32, 40, 0.11);
}

.admin-dashboard-menu .nav-link:active {
  filter: brightness(0.94);
  transform: translateY(1px);
}

.admin-dashboard-menu .nav-link.is-active,
.admin-dashboard-menu .nav-link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.version-history-list {
  margin: 0.75rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
}

.version-history-list li + li {
  margin-top: 0.35rem;
}

.version-overview-panel code {
  font-size: 0.92em;
  word-break: break-word;
}

.cookie-consent-root {
  position: relative;
  z-index: 90;
}

.cookie-settings-button {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 91;
  border: 0;
  border-radius: 999px;
  background: rgba(21, 31, 42, 0.92);
  color: #fff;
  padding: 0.72rem 1rem;
  box-shadow: 0 16px 36px rgba(12, 37, 48, 0.24);
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 92;
}

.cookie-banner-card {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.8fr) minmax(18rem, 1fr);
  align-items: end;
  background: rgba(255, 251, 243, 0.98);
  color: #111827;
  border: 1px solid rgba(31, 107, 95, 0.18);
  border-radius: 1.25rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 24px 60px rgba(12, 37, 48, 0.22);
  backdrop-filter: blur(12px);
}

.cookie-banner-copy h2,
.cookie-preferences-dialog h2 {
  margin-bottom: 0.35rem;
}

.cookie-banner-copy p:last-child {
  margin-bottom: 0;
}

.cookie-banner-actions,
.cookie-preferences-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.cookie-preferences {
  position: fixed;
  inset: 0;
  z-index: 93;
}

.cookie-preferences-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 33, 0.58);
}

.cookie-preferences-dialog {
  position: relative;
  width: min(46rem, calc(100vw - 2rem));
  margin: min(8vh, 4rem) auto 0;
  background: var(--panel);
  color: var(--text);
  border-radius: 1.35rem;
  padding: 1.15rem;
  box-shadow: 0 28px 80px rgba(12, 37, 48, 0.28);
  max-height: calc(100vh - 6rem);
  overflow: auto;
}

.cookie-preferences-body {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0;
}

.cookie-preference-card {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.72);
}

[data-theme="dark"] .cookie-preference-card {
  background: rgba(13, 20, 28, 0.82);
}

.cookie-preference-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

body.cookie-preferences-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .cookie-banner-card {
    grid-template-columns: 1fr;
    max-height: min(70vh, 34rem);
    overflow: auto;
    gap: 0.8rem;
    padding: 0.9rem;
  }

  .cookie-banner-actions,
  .cookie-preferences-actions {
    justify-content: stretch;
  }

  .cookie-banner-actions .button,
  .cookie-preferences-actions .button {
    width: 100%;
  }

  .cookie-settings-button {
    right: 0.75rem;
    left: auto;
    bottom: 0.75rem;
    max-width: calc(100vw - 1.5rem);
    padding: 0.68rem 0.9rem;
  }

  .cookie-banner {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }

  .cookie-preferences-dialog {
    width: calc(100vw - 1.5rem);
    margin-top: 0.75rem;
    max-height: calc(100vh - 1.5rem);
  }

  .cookie-banner-copy h2 {
    font-size: clamp(1.3rem, 6vw, 1.8rem);
    line-height: 1.02;
  }

  .cookie-banner-copy p {
    margin: 0.45rem 0 0;
    font-size: 0.96rem;
    line-height: 1.42;
  }
}

@media (max-width: 560px) {
  .cookie-banner {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
  }

  .cookie-banner-card {
    border-radius: 1rem;
    max-height: min(66vh, 30rem);
    padding: 0.8rem;
  }

  .cookie-banner-actions {
    gap: 0.5rem;
  }

  .cookie-banner-actions .button {
    min-height: 2.85rem;
  }

  .cookie-settings-button {
    right: 0.5rem;
    bottom: 0.5rem;
    max-width: calc(100vw - 1rem);
    font-size: 0.94rem;
  }
}

.admin-dashboard-quick-actions .button {
  transition: background 0.18s ease, color 0.18s ease, transform 0.1s ease, filter 0.1s ease;
}

.admin-dashboard-quick-actions .button:active {
  filter: brightness(0.94);
  transform: translateY(1px);
}

.admin-dashboard-title-logo {
  width: min(100%, 320px);
}

.admin-breadcrumb {
  margin: 0.15rem 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.8;
}

.admin-mainuser-section {
  margin-top: 0.9rem;
}

.admin-profile-section {
  margin-top: 0.9rem;
}

.admin-mainuser-toggle-actions {
  margin-top: 0.7rem;
}

.is-admin-scope .app-header-nav {
  gap: 0.7rem;
  padding: 0.9rem 1rem;
}

.is-admin-scope .header-brand .brand-logo-full {
  width: min(100%, 300px);
}

.is-admin-scope .header-nav {
  gap: 0.5rem;
}

.is-admin-scope .header-nav .nav-link {
  min-height: 2.5rem;
  padding: 0.5rem 0.75rem;
}

.is-admin-scope .topbar {
  margin-bottom: 0.55rem;
  padding: 0.6rem 0.75rem;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.app-mobile-menu-toggle {
  display: none;
}

.header-nav .nav-link {
  min-height: 2.7rem;
  padding: 0.55rem 0.8rem;
  border-radius: 14px;
}

.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.45rem;
  margin-left: 0.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: rgba(24, 32, 40, 0.12);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.nav-link.is-active .nav-count {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.header-meta-actions {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.app-hero {
  grid-template-columns: 1fr 0.85fr;
  margin-top: 0;
}

.page-entries .app-hero {
  grid-template-columns: 0.78fr 1.22fr;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

/* Keep the daily overview and configured timers directly below the main menu. */
.page-entries .app-main > .app-header-nav {
  order: 0;
}

.page-entries .app-main > .page-layout {
  display: contents;
}

.page-entries .workspace-panel {
  order: 1;
}

.page-entries .quick-timer-panel {
  order: 2;
}

.page-entries .app-main > .app-hero {
  order: 3;
}

.page-entries .app-main > #statusBar {
  order: 4;
}

.page-entries .page-layout > .page-panel:not(.workspace-panel):not(.quick-timer-panel) {
  order: 5;
}

.page-entries .app-hero .hero-card,
.page-entries .app-hero .hero-mini-panel {
  padding: 0.82rem 0.95rem;
  border-radius: 18px;
}

.page-entries .app-hero .hero-stat-label {
  font-size: 0.72rem;
}

.page-entries .app-hero .hero-stat {
  margin: 0.14rem 0;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.page-entries .app-hero .hero-mini-panel h2 {
  font-size: clamp(1.06rem, 1.8vw, 1.3rem);
}

.page-entries .app-hero .hero-copy {
  margin-top: 0.42rem;
  font-size: 0.9rem;
}

.page-customers .app-hero,
.page-projects .app-hero,
.page-activities .app-hero,
.page-users .app-hero,
.page-profile .app-hero,
.page-exports .app-hero {
  display: none;
}

.hero-mini-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.nav-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.nav-link[aria-current="page"] {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.page-layout {
  display: grid;
  gap: 1.2rem;
}

[data-theme="dark"] .entry-card,
[data-theme="dark"] .report-card,
[data-theme="dark"] .report-material-section,
[data-theme="dark"] .report-material-line,
[data-theme="dark"] .report-cost-summary-item,
[data-theme="dark"] .report-summary article,
[data-theme="dark"] .timer-summary-card,
[data-theme="dark"] .offline-entry-summary,
[data-theme="dark"] .panel {
  background: rgba(28, 35, 41, 0.95);
}

[data-theme="dark"] .report-material-editor,
[data-theme="dark"] .report-signature-editor,
[data-theme="dark"] .report-email-editor {
  background: rgba(255, 255, 255, 0.92);
}

/* Hard override: "Heute im Blick" must stay in one row */
.page-entries #workspaceSummary {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0.2rem !important;
}

.page-entries #workspaceSummary > article {
  min-width: 0;
}

@media (max-width: 640px) {
  .page-entries #workspaceSummary {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

body.sidebar-collapsed .app-frame {
  grid-template-columns: 86px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar-brand strong,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .sidebar-action {
  display: none;
}

body.sidebar-collapsed .brand-logo {
  width: 40px;
}

body.sidebar-collapsed .brand-logo-full {
  display: none;
}

body.sidebar-collapsed .brand-logo-icon {
  display: block;
}

body.sidebar-collapsed .nav-link {
  justify-content: center;
}

body.sidebar-collapsed .sidebar {
  padding: 0.85rem;
}

body.sidebar-collapsed .sidebar-nav {
  justify-items: center;
}

@media (max-width: 980px) {
  .app-frame {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .sidebar {
    padding: 0.85rem;
  }

  .sidebar-brand strong,
  .nav-label,
  .sidebar-action {
    display: none;
  }

  .brand-logo {
    width: 40px;
  }

  .brand-logo-full {
    display: none;
  }

  .brand-logo-icon {
    display: block;
  }

  .nav-link {
    justify-content: center;
    padding: 0.85rem;
  }
}

@media (max-width: 640px) {
  .app-header-nav {
    padding: 0.85rem;
    margin-bottom: 0;
  }

  .header-top-row {
    flex-direction: column;
    align-items: stretch;
  }

  .header-brand-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .header-account-box {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "account-info menu-toggle"
      "account-actions menu-toggle";
    column-gap: 0.65rem;
    align-items: center;
    justify-items: start;
    text-align: left;
  }

  .header-account-info {
    grid-area: account-info;
    min-width: 0;
  }

  .header-account-actions {
    grid-area: account-actions;
    justify-content: flex-start;
  }

  .app-mobile-menu-toggle {
    grid-area: menu-toggle;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    align-self: center;
    width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(47, 124, 255, 0.1);
    color: var(--text);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
  }

  .app-mobile-menu-toggle svg {
    width: 1.3rem;
    height: 1.3rem;
  }

  .app-mobile-menu-toggle span {
    display: none;
  }

  .header-nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
  }

  .app-header-nav.is-mobile-menu-open .header-nav {
    display: flex;
  }

  .header-brand .brand-logo-full {
    width: min(100%, 280px);
  }

  .header-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .header-meta-actions .button {
    width: auto;
  }

  .app-frame {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    top: 0;
  }

  .sidebar-brand strong,
  .nav-label {
    display: inline;
  }

  .brand-logo {
    width: 158px;
  }

  .brand-logo-full.logo-light-only {
    display: block;
  }

  .brand-logo-full.logo-dark-only {
    display: none;
  }

  .brand-logo-icon {
    display: none;
  }

  .sidebar-action {
    display: block;
  }

  #mobileSidebarToggle {
    display: block;
  }

  .nav-link {
    justify-content: flex-start;
  }

  .topbar {
    margin-bottom: 0.9rem;
  }

  .page-entries .app-hero {
    display: none !important;
  }

  .page-entries .page-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .page-entries .workspace-panel {
    order: 1;
  }

  .page-entries .quick-timer-panel {
    order: 2;
    display: flex;
    flex-direction: column;
  }

  .page-entries .quick-timer-panel > .timer-shell {
    display: contents;
  }

  .page-entries .quick-timer-panel .timer-slots {
    order: 1;
  }

  .page-entries .quick-timer-panel > .panel-head {
    order: 2;
    margin-top: 0.15rem;
  }

  .page-entries .quick-timer-panel .timer-summary-card {
    order: 3;
  }
}

.auth-grid.auth-one-card {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.auth-grid.auth-one-card .auth-card {
  width: 100%;
}

.page-panel .panel-head {
  padding-bottom: 0.2rem;
}

.page-panel .panel-head h2 {
  margin-top: 0.1rem;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 18;
  border: 0;
  background: rgba(13, 18, 24, 0.42);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 640px) {
  .form-grid-two {
    grid-template-columns: 1fr;
  }

  .compact-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-filters .actions {
    width: 100%;
  }

  .auth-brand-card {
    padding: 1rem;
  }

  .auth-brand-logo {
    width: min(100%, 420px);
  }

  .app-frame {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    max-width: 320px;
    transform: translateX(-108%);
    transition: transform 220ms ease;
    z-index: 19;
    border-radius: 0 28px 28px 0;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-brand strong,
  .nav-label {
    display: inline;
  }

  .sidebar-action {
    display: block;
  }

  #mobileSidebarToggle {
    display: block;
  }

  .nav-link {
    justify-content: flex-start;
  }

  .topbar {
    margin-bottom: 0.9rem;
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  body.sidebar-collapsed .sidebar:hover {
    width: 290px;
  }
}

.export-split-layout {
  display: grid;
  gap: 1rem;
}

.export-scope-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.82);
}

.panel-head-inline {
  margin-bottom: 0.75rem;
}

.export-range-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  align-items: end;
}

.export-range-grid .actions {
  align-self: end;
}

.export-summary-compact {
  margin-top: 0.9rem;
}

@media (max-width: 640px) {
  .export-scope-card {
    padding: 0.85rem;
  }
}

.fleet-gap-assist {
  margin-top: 1rem;
  border-left: 4px solid rgba(194, 65, 12, 0.85);
}

.fleet-gap-assist-head {
  margin-bottom: 0.75rem;
}

.fleet-gap-assist-grid {
  display: grid;
  gap: 0.85rem;
}

.fleet-gap-assist-block {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(255, 247, 237, 0.9);
}

.fleet-gap-row {
  border-left: 4px solid rgba(194, 65, 12, 0.22);
}

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