:root {
  --tf-blue: #0b63ff;
  --tf-blue-deep: #0057ff;
  --tf-blue-soft: #eef5ff;
  --tf-text: #050505;
  --tf-muted: #6b7280;
  --tf-border: #e5e7eb;
  --tf-bg: #ffffff;
  --tf-surface: #ffffff;
  --tf-soft: #f7f9fc;
  --tf-green: #16a34a;
  --tf-red: #ef4444;
  --tf-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --tf-shell-width: 430px;
  --tf-radius: 22px;
  --tf-radius-lg: 28px;
}

/* Desktop and tablet administration shell */
:root {
  --ca-sidebar-start: #0b63ff;
  --ca-sidebar-end: #0057ff;
  --ca-primary: #0b63ff;
  --ca-primary-hover: #0953d6;
  --ca-success: #16a34a;
  --ca-warning: #f59e0b;
  --ca-danger: #ef4444;
  --ca-cyan: #06b6d4;
  --ca-bg: #f5f7fb;
  --ca-surface: #ffffff;
  --ca-border: #e5e7eb;
  --ca-text: #111827;
  --ca-muted: #6b7280;
  --ca-radius: 12px;
  --ca-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

html[data-carrec-theme="dark"] {
  color-scheme: dark;
  --tf-blue: #00a8d8;
  --tf-blue-deep: #0057c8;
  --tf-blue-soft: rgba(0, 168, 216, 0.14);
  --tf-text: #f7fbff;
  --tf-muted: #a9bdd0;
  --tf-border: #17456a;
  --tf-bg: #000d1c;
  --tf-surface: #06172a;
  --tf-soft: #08213c;
  --tf-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --ca-sidebar-start: #000d1c;
  --ca-sidebar-end: #003b78;
  --ca-primary: #00a8d8;
  --ca-primary-hover: #18c7f5;
  --ca-cyan: #18c7f5;
  --ca-bg: #000d1c;
  --ca-surface: #06172a;
  --ca-border: #17456a;
  --ca-text: #f7fbff;
  --ca-muted: #a9bdd0;
  --ca-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.ca-admin-shell {
  display: none;
}

.ca-preview-toolbar {
  display: none;
}

.ca-admin-shell,
.ca-admin-shell * {
  box-sizing: border-box;
}

.ca-admin-shell button,
.ca-admin-shell input,
.ca-admin-shell select {
  font: inherit;
}

@media (min-width: 768px) {
  .tf-fee-option-card__grid,
  .tf-fee-option-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-fee-option-card__grid .tf-form-grid__wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  html,
  body.carrec-app-shell {
    min-height: 100%;
    background: var(--ca-bg);
  }

  .tf-mobile-shell {
    display: none;
  }

  .tf-bottom-nav {
    display: none;
  }

  .ca-admin-shell {
    display: grid;
    min-height: 100svh;
    grid-template-columns: 248px minmax(0, 1fr);
    color: var(--ca-text);
    background: var(--ca-bg);
  }

  .ca-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100svh;
    flex-direction: column;
    gap: 18px;
    padding: 18px 14px;
    overflow-y: auto;
    color: #fff;
    background:
      radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.14), transparent 24%),
      linear-gradient(180deg, var(--ca-sidebar-start), var(--ca-sidebar-end));
  }

  .ca-sidebar__brand a {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    color: #fff;
    font-size: 26px;
    font-weight: 950;
    font-style: italic;
    text-decoration: none;
  }

  .ca-sidebar__brand small {
    color: #dbeafe;
    font-size: 15px;
  }

  .ca-sidebar__brand p,
  .ca-sidebar__company span,
  .ca-sidebar__group-title,
  .ca-sidebar__footer span {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    font-weight: 750;
  }

  .ca-sidebar__company,
  .ca-sidebar__footer {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
  }

  .ca-sidebar__company b,
  .ca-sidebar__footer b {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 13px;
  }

  .ca-sidebar__nav {
    display: grid;
    gap: 16px;
  }

  .ca-sidebar__group {
    display: grid;
    gap: 6px;
  }

  .ca-sidebar__group-title {
    padding: 0 10px;
  }

  .ca-sidebar__item {
    display: flex;
    min-height: 42px;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.84);
    background: transparent;
    text-align: left;
    cursor: pointer;
  }

  .ca-sidebar__item svg {
    width: 19px;
    height: 19px;
  }

  .ca-sidebar__item span {
    font-size: 13px;
    font-weight: 800;
  }

  .ca-sidebar__item:hover,
  .ca-sidebar__item.is-active {
    color: #fff;
    background: rgba(255, 255, 255, 0.17);
  }

  .ca-sidebar__footer {
    margin-top: auto;
  }

  .ca-main {
    min-width: 0;
  }

  .ca-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--ca-border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
  }

  .ca-topbar__eyebrow {
    margin: 0 0 3px;
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .ca-topbar h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
  }

  .ca-topbar__actions {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ca-device-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: #eef5ff;
  }

  .ca-device-toggle button {
    min-height: 32px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    color: var(--ca-muted);
    background: transparent;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
  }

  .ca-device-toggle button:hover,
  .ca-device-toggle button.is-active {
    color: #fff;
    background: var(--ca-primary);
  }

  .ca-company-switch,
  .ca-icon-button,
  .ca-logout,
  .ca-button,
  .ca-detail-button {
    min-height: 40px;
    border: 1px solid var(--ca-border);
    border-radius: 9px;
    color: var(--ca-text);
    background: #fff;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
  }

  .ca-company-switch {
    padding: 0 12px;
  }

  .ca-icon-button {
    display: grid;
    position: relative;
    width: 40px;
    place-items: center;
  }

  .ca-icon-button svg {
    width: 18px;
    height: 18px;
  }

  .ca-notification-count {
    position: absolute;
    top: -7px;
    right: -7px;
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    place-items: center;
    color: #fff;
    background: var(--ca-danger);
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
  }

  .ca-notification-count[hidden] {
    display: none;
  }

  .ca-user-menu {
    display: grid;
    min-width: 112px;
    gap: 1px;
  }

  .ca-user-menu span {
    font-size: 13px;
    font-weight: 900;
  }

  .ca-user-menu small {
    color: var(--ca-muted);
    font-size: 11px;
    font-weight: 800;
  }

  .ca-logout {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: var(--ca-primary);
  }

  .ca-content {
    display: grid;
    gap: 22px;
    padding: 24px;
  }

  .ca-screen[hidden] {
    display: none;
  }

  .ca-screen {
    display: grid;
    gap: 18px;
  }

  .ca-page-head,
  .ca-panel__head,
  .ca-filter-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .ca-page-head h2,
  .ca-panel h3 {
    margin: 0;
    font-size: 22px;
  }

  .ca-page-head p,
  .ca-panel__head p {
    margin: 5px 0 0;
    color: var(--ca-muted);
    font-size: 13px;
    font-weight: 700;
  }

  .ca-action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  .ca-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
  }

  .ca-button svg {
    width: 16px;
    height: 16px;
  }

  .ca-button--primary {
    border-color: transparent;
    color: #fff;
    background: var(--ca-primary);
  }

  .ca-button--primary:hover {
    background: var(--ca-primary-hover);
  }

  .ca-button--compact {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

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

  .ca-kpi-card,
  .ca-panel,
  .ca-filter-panel,
  .ca-setting-card,
  .ca-photo-card,
  .ca-detail-summary,
  .ca-detail-panel {
    border: 1px solid var(--ca-border);
    border-radius: var(--ca-radius);
    background: var(--ca-surface);
    box-shadow: var(--ca-shadow);
  }

  .ca-kpi-card {
    display: grid;
    gap: 6px;
    min-height: 116px;
    padding: 16px;
  }

  .ca-kpi-card span,
  .ca-kpi-card small {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .ca-kpi-card b {
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1;
  }

  .ca-panel,
  .ca-filter-panel {
    padding: 16px;
  }

  .ca-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 16px;
    align-items: start;
  }

  .ca-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--ca-border);
    border-radius: 10px;
    background: #fff;
  }

  .ca-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    font-size: 13px;
  }

  .ca-table th,
  .ca-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--ca-border);
    border-right: 1px solid var(--ca-border);
    text-align: left;
    vertical-align: top;
  }

  .ca-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    font-weight: 900;
  }

  .ca-table tbody tr:nth-child(odd) {
    background: #f8fafc;
  }

  .ca-table b,
  .ca-table small {
    display: block;
  }

  .ca-table small {
    margin-top: 4px;
    color: var(--ca-muted);
    font-weight: 700;
  }

  .ca-job-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
  }

  .ca-job-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--ca-border);
    border-radius: var(--ca-radius);
    background: var(--ca-surface);
    box-shadow: var(--ca-shadow);
  }

  .ca-job-card__head,
  .ca-job-card__foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .ca-job-card__head span {
    color: var(--ca-primary);
    font-size: 12px;
    font-weight: 950;
  }

  .ca-job-card__head h3 {
    margin: 3px 0 2px;
    color: var(--ca-text);
    font-size: 17px;
    line-height: 1.35;
  }

  .ca-job-card__head p,
  .ca-job-card__foot small {
    margin: 0;
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .ca-job-card__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0;
  }

  .ca-job-card__grid div {
    min-width: 0;
    padding: 10px;
    border-radius: 10px;
    background: #f8fafc;
  }

  .ca-job-card__grid .ca-job-card__wide {
    grid-column: 1 / -1;
  }

  .ca-job-card__grid dt {
    color: var(--ca-muted);
    font-size: 11px;
    font-weight: 950;
  }

  .ca-job-card__grid dd {
    margin: 3px 0 0;
    color: var(--ca-text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }

  .ca-job-card__foot {
    align-items: center;
  }

  .ca-job-card__foot div {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  @media (max-width: 1180px) {
    .ca-job-board {
      grid-template-columns: 1fr;
    }
  }

  .ca-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
  }

  .ca-status--danger { background: var(--ca-danger); }
  .ca-status--blue { background: var(--ca-primary); }
  .ca-status--cyan { background: var(--ca-cyan); }
  .ca-status--green { background: var(--ca-success); }
  .ca-status--amber { background: var(--ca-warning); }
  .ca-status--working { background: var(--ca-success); }
  .ca-status--break { background: #64748b; }
  .ca-status--completed { background: var(--ca-primary); }
  .ca-status--off { background: #94a3b8; }

  .ca-attendance-alert {
    display: block;
    margin-top: 6px;
    color: var(--ca-danger);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.35;
  }

  .ca-detail-button {
    min-height: 32px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .ca-map-card {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
  }

  .ca-map-headline,
  .ca-map-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
  }

  .ca-map-actions {
    align-items: center;
  }

  .ca-map-kicker {
    margin: 0 0 4px;
    color: var(--ca-primary);
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ca-map-headline h3,
  .ca-map-headline p {
    margin: 0;
  }

  .ca-map-headline h3 {
    font-size: 20px;
    line-height: 1.2;
  }

  .ca-map-headline [data-admin-map-status] {
    margin-top: 5px;
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 800;
  }

  .ca-map-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  .ca-map-stats div {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: #ffffff;
  }

  .ca-map-stats span {
    display: block;
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 850;
  }

  .ca-map-stats strong {
    display: block;
    margin-top: 4px;
    color: var(--ca-text);
    font-size: 24px;
    font-weight: 950;
    line-height: 1;
  }

  .ca-map-mode-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ca-map-mode-bar button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: #334155;
    background: #ffffff;
    font-weight: 900;
    cursor: pointer;
  }

  .ca-map-mode-bar button:hover,
  .ca-map-mode-bar button.is-active {
    color: #ffffff;
    border-color: var(--ca-primary);
    background: var(--ca-primary);
  }

  .ca-map-trail-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.9);
  }

  .ca-map-trail-controls button,
  .ca-map-trail-controls select {
    min-height: 34px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    color: #334155;
    background: #ffffff;
    font-weight: 900;
  }

  .ca-map-trail-controls button {
    padding: 0 13px;
    cursor: pointer;
  }

  .ca-map-trail-controls select {
    min-width: 104px;
    padding: 0 28px 0 12px;
  }

  .ca-map-trail-controls button:hover,
  .ca-map-trail-controls button.is-active {
    color: #ffffff;
    border-color: var(--ca-primary);
    background: var(--ca-primary);
  }

  .ca-map-trail-controls label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 900;
  }

  .ca-map-trail-controls [data-trail-status] {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    color: #475569;
    background: #eef2ff;
    font-size: 12px;
    font-weight: 850;
  }

  .ca-admin-map-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(11, 99, 255, 0.14);
    border-radius: 22px;
    background: #eaf2ff;
  }

  .ca-admin-map {
    display: grid;
    min-height: 330px;
    overflow: hidden;
    place-items: center;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    color: var(--ca-primary);
    background:
      linear-gradient(90deg, rgba(11, 99, 255, 0.08) 1px, transparent 1px),
      linear-gradient(rgba(11, 99, 255, 0.08) 1px, transparent 1px),
      #eef5ff;
    background-size: 34px 34px;
    font-weight: 900;
  }

  .ca-admin-map--maplibre,
  .ca-admin-map--maplibre .maplibregl-canvas {
    width: 100%;
    height: 100%;
  }

  .ca-admin-map--maplibre {
    min-height: 440px;
    height: min(62vh, 680px);
  }

  .ca-admin-map.is-ready {
    display: block;
    background: #e5e7eb;
  }

  .ca-map-card--large .ca-admin-map--maplibre {
    min-height: 620px;
    height: min(72vh, 820px);
  }

  .ca-map-legend {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: calc(100% - 28px);
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(10px);
  }

  .ca-map-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
  }

  .ca-map-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
  }

  .ca-map-legend .is-online { background: #22c55e; }
  .ca-map-legend .is-dispatched { background: #0b63ff; }
  .ca-map-legend .is-working { background: #f59e0b; }
  .ca-map-legend .is-offline { background: #94a3b8; }

  .ca-map-card .maplibregl-ctrl-bottom-right {
    bottom: 58px;
  }

  .ca-map-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
  }

  .ca-worker-location-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    width: 100%;
    min-width: 0;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    color: var(--ca-text);
    background: #ffffff;
    text-align: left;
    cursor: pointer;
  }

  .ca-worker-location-card:hover,
  .ca-worker-location-card.is-selected {
    border-color: rgba(11, 99, 255, 0.32);
    box-shadow: 0 0 0 3px rgba(11, 99, 255, 0.1);
  }

  .ca-worker-location-card__body {
    min-width: 0;
  }

  .ca-worker-location-card strong,
  .ca-worker-location-card small {
    display: block;
  }

  .ca-worker-location-card small {
    margin-top: 3px;
    color: var(--ca-muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
  }

  .ca-worker-location-card em {
    color: var(--ca-primary);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    white-space: nowrap;
  }

  .ca-worker-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
  }

  .ca-worker-status-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
  }

  .ca-worker-status-dot.is-dispatched {
    background: #0b63ff;
    box-shadow: 0 0 0 4px rgba(11, 99, 255, 0.16);
  }

  .ca-worker-status-dot.is-working {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
  }

  .ca-worker-status-dot.is-offline {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
  }

  .ca-map-list.is-loading {
    opacity: 0.72;
  }

  .ca-map-list .ca-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 14px;
    color: var(--ca-muted);
    border: 1px dashed var(--ca-border);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
  }

  .ca-map-worker-time {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 10px;
  }

  .ca-map-pin {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    box-shadow: 0 0 0 3px rgba(11, 99, 255, 0.12);
  }

  .ca-map-pin--green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14); }
  .ca-map-pin--blue { background: #0b63ff; box-shadow: 0 0 0 3px rgba(11, 99, 255, 0.14); }
  .ca-map-pin--cyan { background: #06b6d4; box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.14); }
  .ca-map-pin--orange { background: #f97316; box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16); }
  .ca-map-pin--purple { background: #8b5cf6; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16); }
  .ca-map-pin--gray { background: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18); }
  .ca-map-pin--red { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16); }

  .ca-map-pin {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: var(--ca-primary);
  }

  .ca-map-pin--green { background: var(--ca-success); }
  .ca-map-pin--blue { background: var(--ca-primary); }
  .ca-map-pin--cyan { background: var(--ca-cyan); }

  .ca-alert-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .ca-alert-list article {
    padding: 12px;
    border: 1px solid var(--ca-border);
    border-radius: 10px;
    background: #f8fafc;
  }

  .ca-alert-list b,
  .ca-alert-list span {
    display: block;
  }

  .ca-alert-list span {
    margin-top: 5px;
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 750;
  }

  .ca-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
  }

  .ca-tabs button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: #fff;
    font-weight: 850;
  }

  .ca-tabs button.is-active {
    color: #fff;
    border-color: var(--ca-primary);
    background: var(--ca-primary);
  }

  .ca-filter-panel {
    display: grid;
    gap: 14px;
  }

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

  .ca-filter-grid label {
    display: grid;
    gap: 6px;
  }

  .ca-filter-grid span {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 850;
  }

  .ca-filter-grid input,
  .ca-filter-grid select {
    min-height: 42px;
    width: 100%;
    border: 1px solid var(--ca-border);
    border-radius: 8px;
    padding: 0 11px;
    background: #fff;
  }

  .ca-photo-grid,
  .ca-settings-grid,
  .ca-detail-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
  }

  .ca-settings-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
  }

  .ca-settings-control-grid > div {
    display: grid;
    gap: 8px;
  }

  .ca-settings-control-grid span {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 850;
  }

  .ca-photo-card,
  .ca-setting-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    text-align: left;
  }

  .ca-setting-card {
    min-height: 118px;
    border: 1px solid var(--ca-border);
    cursor: pointer;
  }

  .ca-setting-card b,
  .ca-photo-card b {
    font-size: 15px;
  }

  .ca-setting-card span,
  .ca-photo-card p,
  .ca-photo-card small {
    margin: 0;
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 750;
  }

  .ca-settings-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 18px;
  }

  .ca-settings-nav {
    position: sticky;
    top: 82px;
    display: grid;
    gap: 8px;
    padding: 10px;
    background: var(--ca-surface);
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    box-shadow: var(--ca-shadow);
  }

  .ca-settings-nav a {
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 0 12px;
    color: var(--ca-muted);
    text-decoration: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 900;
  }

  .ca-settings-nav a:hover,
  .ca-settings-nav a:focus {
    color: #fff;
    background: var(--ca-primary);
    outline: none;
  }

  .ca-settings-stack {
    display: grid;
    gap: 18px;
  }

  .ca-admin-setting-section {
    scroll-margin-top: 86px;
  }

  .ca-admin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
  }

  .ca-admin-form-grid label {
    display: grid;
    gap: 7px;
  }

  .ca-admin-form-grid span {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 850;
  }

  .ca-admin-form-grid input,
  .ca-admin-form-grid select,
  .ca-admin-form-grid textarea {
    width: 100%;
    min-height: 42px;
    padding: 0 11px;
    color: var(--ca-text);
    background: #fff;
    border: 1px solid var(--ca-border);
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
  }

  .ca-admin-form-grid textarea {
    min-height: 88px;
    padding-top: 10px;
    resize: vertical;
  }

  .ca-admin-form-grid input:focus,
  .ca-admin-form-grid select:focus,
  .ca-admin-form-grid textarea:focus {
    border-color: var(--ca-primary);
    box-shadow: 0 0 0 4px rgba(11, 99, 255, 0.11);
    outline: none;
  }

  .ca-admin-form-grid__wide {
    grid-column: span 2;
  }

  .ca-setting-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--ca-border);
  }

  .ca-setting-subhead b {
    font-size: 15px;
    font-weight: 950;
  }

  .ca-setting-subhead span {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 900;
  }

  .ca-pricing-option-list,
  .ca-setting-toggle-list,
  .ca-setting-status-grid,
  .ca-user-setting-list {
    margin-top: 14px;
  }

  .ca-notification-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 14px;
  }

  .ca-notification-settings-grid section {
    min-width: 0;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
  }

  .ca-notification-settings-grid h4 {
    margin: 0 0 10px;
    color: var(--ca-text);
    font-size: 14px;
    font-weight: 950;
  }

  .ca-notification-quiet-toggle {
    margin-top: 14px;
  }

  .ca-notification-rule-grid {
    margin-top: 12px;
  }

  .ca-photo-card__thumb {
    display: grid;
    min-height: 120px;
    place-items: center;
    border-radius: 10px;
    color: var(--ca-primary);
    background: var(--tf-blue-soft);
    font-weight: 900;
  }

  .ca-photo-card__thumb img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: inherit;
  }

  .ca-detail-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 16px;
  }

  .ca-detail-summary {
    display: grid;
    align-content: start;
    gap: 7px;
    padding: 16px;
  }

  .ca-detail-summary span {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 850;
  }

  .ca-detail-summary b {
    margin-bottom: 8px;
  }

  .ca-detail-panel {
    padding: 16px;
  }

  .ca-detail-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ca-detail-cards article {
    padding: 14px;
    border: 1px solid var(--ca-border);
    border-radius: 10px;
    background: #f8fafc;
  }

  .ca-detail-cards p {
    margin: 7px 0 0;
    color: var(--ca-muted);
    font-size: 13px;
    font-weight: 700;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .ca-admin-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .ca-sidebar {
    align-items: center;
    padding: 14px 10px;
  }

  .ca-sidebar__brand a {
    font-size: 18px;
  }

  .ca-sidebar__brand p,
  .ca-sidebar__company,
  .ca-sidebar__group-title,
  .ca-sidebar__item span,
  .ca-sidebar__footer {
    display: none;
  }

  .ca-sidebar__item {
    width: 52px;
    justify-content: center;
    padding: 0;
  }

  .ca-topbar {
    padding: 12px 18px;
  }

  .ca-user-menu,
  .ca-company-switch {
    display: none;
  }

  .ca-content {
    padding: 18px;
  }

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

  .ca-dashboard-grid,
  .ca-detail-layout {
    grid-template-columns: 1fr;
  }

  .ca-filter-grid,
  .ca-photo-grid,
  .ca-photo-section__grid,
  .ca-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ca-settings-layout {
    grid-template-columns: 1fr;
  }

  .ca-settings-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .ca-notification-settings-grid {
    grid-template-columns: 1fr;
  }

  .tf-fleet-list--admin {
    grid-template-columns: 1fr;
  }

  .ca-alert-list,
  .ca-map-list,
  .ca-detail-cards {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .tf-app[data-display-mode="tablet"],
  .tf-app[data-display-mode="mobile-preview"] {
    display: grid;
    min-height: 100svh;
    place-items: start center;
    padding: 24px;
    background: var(--ca-bg);
  }

  .tf-app[data-display-mode="tablet"] {
    --tf-shell-width: 768px;
  }

  .tf-app[data-display-mode="mobile-preview"] {
    --tf-shell-width: 430px;
  }

  .tf-app[data-display-mode="tablet"] .ca-admin-shell,
  .tf-app[data-display-mode="mobile-preview"] .ca-admin-shell {
    display: none;
  }

  .tf-app[data-display-mode="tablet"] .tf-mobile-shell,
  .tf-app[data-display-mode="mobile-preview"] .tf-mobile-shell {
    display: block;
    min-height: calc(100svh - 48px);
    border: 1px solid var(--tf-border);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  }

  .tf-app[data-display-mode="tablet"] .tf-mobile-shell {
    padding-right: 28px;
    padding-left: 28px;
  }

  .tf-app[data-display-mode="mobile-preview"] .tf-mobile-shell {
    border-radius: 28px;
  }

  .tf-app[data-display-mode="tablet"] .tf-bottom-nav,
  .tf-app[data-display-mode="mobile-preview"] .tf-bottom-nav {
    display: grid;
  }

  .tf-app[data-display-mode="tablet"] .tf-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-app[data-display-mode="tablet"] .ca-preview-toolbar,
  .tf-app[data-display-mode="mobile-preview"] .ca-preview-toolbar {
    position: fixed;
    z-index: 80;
    top: max(14px, env(safe-area-inset-top));
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--ca-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(14px);
  }

  .ca-preview-toolbar button {
    min-height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    color: var(--ca-muted);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
  }

  .ca-preview-toolbar button:hover,
  .ca-preview-toolbar button.is-active {
    color: #fff;
    background: var(--ca-primary);
  }
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--tf-text);
  background: var(--tf-bg);
  font-family:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans JP", sans-serif;
  letter-spacing: 0;
}

body.carrec-app-shell {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--tf-text);
  background: #ffffff;
}

body.carrec-app-shell.admin-bar {
  padding-top: 0;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.tf-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  color: currentColor;
}

.tf-icon,
.tf-icon * {
  pointer-events: none;
}

.tf-icon :where(path, circle, rect, line, polyline, polygon) {
  vector-effect: non-scaling-stroke;
}

.tf-app {
  width: 100%;
  min-height: 100svh;
  background: #ffffff;
  isolation: isolate;
}

body.carrec-app-shell .tf-app :where(h1, h2, h3, p, dl, dd, figure) {
  margin-block-start: 0;
}

body.carrec-app-shell .tf-app :where(button, input) {
  min-width: 0;
  margin: 0;
  font-family: inherit;
  line-height: normal;
  appearance: none;
  -webkit-appearance: none;
}

body.carrec-app-shell .tf-app :where(button) {
  padding-block: 0;
}

.tf-shell {
  position: relative;
  width: min(100%, var(--tf-shell-width));
  max-width: var(--tf-shell-width);
  min-height: 100svh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 20px calc(126px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  background: #ffffff;
}

.tf-offline-status {
  position: sticky;
  top: calc(8px + env(safe-area-inset-top));
  z-index: 40;
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -6px 0 14px;
  padding: 8px 10px 8px 12px;
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.12);
}

.tf-offline-status button {
  min-height: 28px;
  padding: 0 10px;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  background: #f59e0b;
  border: 0;
  border-radius: 999px;
}

.tf-offline-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.tf-offline-actions small {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 750;
}

.tf-app[data-current-screen="pdf-preview"] .tf-shell {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.tf-screen[hidden],
.tf-offline-status[hidden],
.tf-toast[hidden] {
  display: none;
}

.tf-pdf-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0 16px;
}

.tf-pdf-actions a {
  text-align: center;
  text-decoration: none;
}

.tf-pdf-actions a[hidden] {
  display: none;
}

.tf-screen {
  display: block;
}

.tf-header,
.tf-pdf-nav,
.tf-dashboard-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.tf-header {
  margin-bottom: 20px;
}

.tf-logo,
.tf-pdf-logo {
  display: inline-flex;
  align-items: baseline;
  color: #050505;
  font-size: 24px;
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.tf-logo span:nth-child(2),
.tf-logo small,
.tf-pdf-logo span:nth-child(2),
.tf-pdf-logo small {
  color: var(--tf-blue);
}

.tf-logo small,
.tf-pdf-logo small {
  margin-left: 3px;
  font-size: 0.58em;
}

.tf-subtitle {
  margin: 6px 0 0;
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 700;
}

.tf-notification {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 999px;
}

.tf-notification svg {
  width: 26px;
  height: 26px;
  color: #6b7280;
}

.tf-notification__dot {
  position: absolute;
  top: 8px;
  right: 9px;
  width: 7px;
  height: 7px;
  background: var(--tf-red);
  border-radius: 999px;
}

.tf-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 184px;
  margin-bottom: 16px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(90deg, #0b63ff 0%, rgba(11, 99, 255, 0.9) 45%, rgba(11, 99, 255, 0.16) 100%),
    url("../towflow/backgrounds/top_hero_background_truck.png") right center / auto 100% no-repeat,
    linear-gradient(135deg, #1b74ff 0%, #2768f7 45%, #0b63ff 100%);
  border-radius: var(--tf-radius-lg);
  box-shadow: 0 18px 34px rgba(11, 99, 255, 0.23);
}

@media (min-resolution: 2dppx) {
  .tf-hero {
    background:
      linear-gradient(90deg, #0b63ff 0%, rgba(11, 99, 255, 0.9) 45%, rgba(11, 99, 255, 0.16) 100%),
      url("../towflow/backgrounds/top_hero_background_truck@2x.png") right center / auto 100% no-repeat,
      linear-gradient(135deg, #1b74ff 0%, #2768f7 45%, #0b63ff 100%);
  }
}

.tf-hero__copy {
  z-index: 2;
  padding: 22px 18px;
}

.tf-hero__copy span,
.tf-hero__copy small {
  display: block;
  font-size: 13px;
  font-weight: 800;
  opacity: 0.92;
}

.tf-hero__copy strong {
  display: flex;
  gap: 6px;
  align-items: baseline;
  margin: 5px 0 18px;
}

.tf-hero__copy strong b {
  font-size: 39px;
  font-weight: 850;
  line-height: 1;
}

.tf-hero__copy strong em {
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
}

.tf-hero__copy p {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
}

.tf-location-card {
  --tf-location-accent: #0b63ff;
  --tf-location-state: #94a3b8;
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.tf-location-card[data-location-state="online"] {
  --tf-location-state: #22c55e;
  --tf-location-accent: #0b63ff;
}

.tf-location-card[data-location-state="offline"] {
  --tf-location-state: #f59e0b;
  --tf-location-accent: #f59e0b;
}

.tf-location-card[data-location-state="denied"] {
  --tf-location-state: #94a3b8;
  --tf-location-accent: #64748b;
}

.tf-location-card[data-location-state="loading"] {
  --tf-location-state: #0b63ff;
  --tf-location-accent: #0b63ff;
}

.tf-location-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tf-location-card__label,
.tf-location-status span,
.tf-location-meta dt {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 850;
}

.tf-location-card h2 {
  margin: 3px 0 0;
  font-size: 19px;
  line-height: 1.2;
}

.tf-location-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 18px;
  margin: 5px 0 0;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
}

.tf-location-card__status::before {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--tf-location-state);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tf-location-state) 18%, transparent);
}

.tf-location-toggle {
  display: inline-flex;
  position: relative;
  flex: 0 0 auto;
  min-width: 48px;
  min-height: 28px;
  align-items: center;
  justify-content: flex-start;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--tf-location-accent);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 8px 16px color-mix(in srgb, var(--tf-location-accent) 24%, transparent);
  cursor: pointer;
}

.tf-location-toggle::after {
  content: "";
  width: 18px;
  height: 18px;
  margin-left: 5px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
}

.tf-location-toggle[aria-pressed="false"] {
  justify-content: flex-end;
  color: #64748b;
  background: #e2e8f0;
  box-shadow: none;
}

.tf-location-toggle[aria-pressed="false"]::after {
  order: -1;
  margin-right: 5px;
  margin-left: 0;
}

.tf-location-card p {
  margin: 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.tf-location-status {
  display: grid;
  gap: 7px;
}

.tf-location-status select {
  min-height: 44px;
  padding: 0 12px;
  color: var(--tf-text);
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  font-weight: 850;
}

.tf-location-map-frame {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background: #eff6ff;
  isolation: isolate;
}

.tf-location-map-frame.is-expanded {
  min-height: min(64vh, 420px);
}

.tf-location-map,
.tf-location-map .maplibregl-canvas {
  width: 100%;
  height: 100%;
}

.tf-location-map {
  position: absolute;
  inset: 0;
}

.tf-location-map-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #64748b;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    linear-gradient(180deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px),
    #eff6ff;
  background-size: 28px 28px;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  z-index: 1;
}

.tf-location-map-frame.is-ready .tf-location-map-fallback {
  display: none;
}

.tf-location-map-frame[data-location-map-state="offline"] .tf-location-map {
  filter: grayscale(0.72) opacity(0.9);
}

.tf-location-map-control {
  position: absolute;
  right: 10px;
  z-index: 4;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 999px;
  color: #334155;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
  cursor: pointer;
}

.tf-location-map-control--center {
  bottom: 52px;
}

.tf-location-map-control--center::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 999px;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.tf-location-map-control--expand {
  bottom: 10px;
}

.tf-location-map-control--expand::before {
  content: "⛶";
  font-size: 17px;
  line-height: 1;
}

.tf-location-marker {
  width: 22px;
  height: 22px;
  border: 4px solid #ffffff;
  border-radius: 999px;
  background: var(--tf-location-accent);
  box-shadow:
    0 0 0 8px color-mix(in srgb, var(--tf-location-accent) 18%, transparent),
    0 10px 20px color-mix(in srgb, var(--tf-location-accent) 30%, transparent);
}

.tf-location-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tf-location-chips span {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  overflow: hidden;
  color: #334155;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-location-actions {
  display: block;
}

.tf-location-send {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tf-location-send svg {
  width: 17px;
  height: 17px;
}

.tf-location-send:disabled {
  color: #ffffff;
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
}

.tf-location-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0;
}

.tf-location-meta div {
  min-width: 0;
  padding: 11px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

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

.tf-location-meta dd {
  margin-top: 3px;
  font-size: 12px;
  font-weight: 900;
  word-break: break-word;
}

@media (min-width: 768px) {
  .tf-location-card {
    padding: 18px;
  }

  .tf-location-map-frame {
    min-height: 250px;
  }

  .tf-location-chips,
  .tf-location-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tf-menu-list,
.tf-history-list,
.tf-settings-list,
.tf-option-list {
  display: grid;
  gap: 10px;
}

.tf-menu-card,
.tf-settings-list button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 16px;
  box-shadow: var(--tf-shadow);
}

.tf-menu-card b,
.tf-settings-list b {
  display: block;
  font-size: 15px;
  font-weight: 850;
}

.tf-menu-card small,
.tf-settings-list small {
  display: block;
  margin-top: 4px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 650;
}

.tf-menu-card__icon,
.tf-action-icon {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--tf-muted);
  background: #f3f4f6;
  border-radius: 999px;
}

.tf-menu-card__icon--primary,
.tf-menu-card:first-child .tf-menu-card__icon {
  color: #ffffff;
  background: linear-gradient(180deg, #5c98ff, var(--tf-blue));
}

.tf-menu-card__icon svg {
  width: 28px;
  height: 28px;
}

.tf-menu-card__body {
  min-width: 0;
}

.tf-menu-card__chevron {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #9ca3af;
}

.tf-menu-card__chevron svg {
  width: 22px;
  height: 22px;
}

.tf-menu-card--attendance .tf-menu-card__icon {
  color: #ffffff;
  background: linear-gradient(180deg, #22c55e, var(--tf-green));
}

.tf-screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.tf-screen-header span {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tf-screen-header h1 {
  margin: 2px 0 0;
  color: var(--tf-text);
  font-size: 24px;
  font-weight: 950;
}

.tf-back-button {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--tf-text);
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  box-shadow: var(--tf-shadow);
}

.tf-back-button svg {
  width: 22px;
  height: 22px;
}

.tf-attendance-card {
  display: grid;
  gap: 22px;
  padding: 24px 18px 20px;
  color: #0f172a;
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.06), rgba(255, 255, 255, 0)),
    #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 24px;
  box-shadow: var(--tf-shadow);
}

.tf-attendance-brand,
.tf-attendance-location,
.tf-attendance-status,
.tf-attendance-meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tf-attendance-logo {
  color: var(--tf-green);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.tf-attendance-user {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: var(--tf-green);
  border-radius: 999px;
}

.tf-attendance-user svg {
  width: 22px;
  height: 22px;
}

.tf-attendance-clock {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 6px 0;
}

.tf-attendance-clock time {
  color: #64748b;
  font-size: 16px;
  font-weight: 850;
}

.tf-attendance-clock strong {
  color: #334155;
  font-size: 44px;
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tf-attendance-location {
  justify-content: center;
  color: var(--tf-green);
  font-size: 13px;
  font-weight: 900;
}

.tf-attendance-location svg {
  width: 18px;
  height: 18px;
}

.tf-attendance-status {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.tf-attendance-status span {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.tf-attendance-status b {
  color: var(--tf-green);
  font-size: 16px;
  font-weight: 950;
}

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

.tf-attendance-button {
  min-height: 78px;
  padding: 0 12px;
  color: var(--tf-green);
  background: #ffffff;
  border: 2px solid var(--tf-green);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 950;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.08);
}

.tf-attendance-button--clock-in {
  color: #ffffff;
  background: var(--tf-green);
}

.tf-attendance-button--break-start,
.tf-attendance-button--break-end {
  min-height: 64px;
  color: #64748b;
  border-color: #94a3b8;
  font-size: 16px;
}

.tf-attendance-button--break-start {
  color: #ffffff;
  background: #94a3b8;
}

.tf-attendance-button:disabled {
  color: #94a3b8;
  background: #e5e7eb;
  border-color: #e5e7eb;
  box-shadow: none;
  opacity: 1;
}

.tf-attendance-button.is-loading {
  opacity: 0.72;
}

.tf-attendance-help {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.6;
  text-align: center;
}

.tf-attendance-meta {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tf-attendance-meta div {
  align-items: flex-start;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 12px;
}

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

.tf-attendance-meta dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.tf-attendance-meta dd {
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  text-align: right;
  word-break: break-word;
}

html[data-carrec-theme="dark"] .tf-attendance-card {
  color: var(--tf-text);
  background:
    linear-gradient(180deg, rgba(0, 168, 216, 0.1), rgba(6, 23, 42, 0)),
    var(--tf-surface);
}

html[data-carrec-theme="dark"] .tf-attendance-clock strong,
html[data-carrec-theme="dark"] .tf-attendance-meta dd {
  color: var(--tf-text);
}

html[data-carrec-theme="dark"] .tf-attendance-clock time,
html[data-carrec-theme="dark"] .tf-attendance-status span,
html[data-carrec-theme="dark"] .tf-attendance-meta dt,
html[data-carrec-theme="dark"] .tf-attendance-help {
  color: var(--tf-muted);
}

html[data-carrec-theme="dark"] .tf-attendance-status,
html[data-carrec-theme="dark"] .tf-attendance-meta div {
  background: var(--tf-soft);
  border-color: var(--tf-border);
}

.tf-attendance-confirm[hidden] {
  display: none !important;
}

.tf-attendance-confirm {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
}

.tf-attendance-confirm__backdrop {
  position: absolute;
  inset: 0;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.18), rgba(15, 23, 42, 0.42)),
    rgba(15, 23, 42, 0.36);
  border: 0;
  backdrop-filter: blur(8px);
}

.tf-attendance-confirm__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 340px);
  padding: 28px 22px 22px;
  color: #0f172a;
  text-align: center;
  background:
    radial-gradient(circle at top, rgba(22, 163, 74, 0.14), transparent 42%),
    #ffffff;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 28px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.28);
  animation: tfAttendanceConfirmIn 180ms ease-out;
}

.tf-attendance-confirm__panel.is-clock-out {
  background:
    radial-gradient(circle at top, rgba(11, 99, 255, 0.12), transparent 42%),
    #ffffff;
  border-color: rgba(11, 99, 255, 0.18);
}

.tf-attendance-confirm__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
}

.tf-attendance-confirm__mark {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  place-items: center;
  color: #ffffff;
  background: var(--tf-green);
  border-radius: 999px;
  font-size: 38px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(22, 163, 74, 0.32);
}

.tf-attendance-confirm__panel.is-clock-out .tf-attendance-confirm__mark {
  background: linear-gradient(135deg, var(--tf-green), var(--tf-blue));
}

.tf-attendance-confirm__eyebrow {
  margin: 0 0 4px;
  color: var(--tf-green);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.tf-attendance-confirm__panel.is-clock-out .tf-attendance-confirm__eyebrow {
  color: var(--tf-blue);
}

.tf-attendance-confirm__panel h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

.tf-attendance-confirm__date {
  display: block;
  margin-top: 18px;
  color: #64748b;
  font-size: 15px;
  font-weight: 850;
}

.tf-attendance-confirm__time {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tf-attendance-confirm__meta {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
}

.tf-attendance-confirm__meta div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 14px;
}

.tf-attendance-confirm__meta dt,
.tf-attendance-confirm__meta dd {
  margin: 0;
}

.tf-attendance-confirm__meta dt {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.tf-attendance-confirm__meta dd {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.tf-attendance-confirm__primary {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  color: #ffffff;
  background: var(--tf-green);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.24);
}

.tf-attendance-confirm__panel.is-clock-out .tf-attendance-confirm__primary {
  background: linear-gradient(135deg, var(--tf-green), var(--tf-blue));
}

body.is-attendance-confirm-open {
  overflow: hidden;
}

html[data-carrec-theme="dark"] .tf-attendance-confirm__panel {
  color: var(--tf-text);
  background:
    radial-gradient(circle at top, rgba(22, 163, 74, 0.18), transparent 42%),
    var(--tf-surface);
  border-color: rgba(148, 163, 184, 0.24);
}

html[data-carrec-theme="dark"] .tf-attendance-confirm__panel.is-clock-out {
  background:
    radial-gradient(circle at top, rgba(0, 168, 216, 0.16), transparent 42%),
    var(--tf-surface);
}

html[data-carrec-theme="dark"] .tf-attendance-confirm__panel h2,
html[data-carrec-theme="dark"] .tf-attendance-confirm__time,
html[data-carrec-theme="dark"] .tf-attendance-confirm__meta dd {
  color: var(--tf-text);
}

html[data-carrec-theme="dark"] .tf-attendance-confirm__date,
html[data-carrec-theme="dark"] .tf-attendance-confirm__meta dt {
  color: var(--tf-muted);
}

html[data-carrec-theme="dark"] .tf-attendance-confirm__meta div,
html[data-carrec-theme="dark"] .tf-attendance-confirm__close {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.24);
}

@keyframes tfAttendanceConfirmIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tf-settings-logout {
  color: #991b1b;
}

.tf-settings-logout .tf-menu-card__icon {
  color: #dc2626;
  background: #fee2e2;
}

.tf-settings-logout .tf-menu-card__chevron {
  color: #dc2626;
}

.tf-step-head {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.tf-step-head > span {
  font-size: 12px;
  font-weight: 850;
}

.tf-progress {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: center;
}

.tf-progress i {
  position: relative;
  display: block;
  height: 2px;
  background: #d7dbe2;
  border-radius: 999px;
}

.tf-progress i::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 9px;
  content: "";
  background: #d7dbe2;
  border-radius: 999px;
  transform: translateY(-50%);
}

.tf-progress[data-step="1"] i:nth-child(-n + 1),
.tf-progress[data-step="1"] i:nth-child(-n + 1)::before,
.tf-progress[data-step="2"] i:nth-child(-n + 2),
.tf-progress[data-step="2"] i:nth-child(-n + 2)::before,
.tf-progress[data-step="3"] i:nth-child(-n + 3),
.tf-progress[data-step="3"] i:nth-child(-n + 3)::before,
.tf-progress[data-step="4"] i,
.tf-progress[data-step="4"] i::before {
  background: var(--tf-blue);
}

.tf-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 850;
  line-height: 1.22;
}

.tf-lead,
.tf-period {
  margin: 0 0 18px;
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 650;
}

.tf-section-title {
  margin: 28px 0 12px;
  font-size: 16px;
  font-weight: 850;
}

.tf-vehicle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.tf-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.tf-select-card {
  display: grid;
  min-height: 95px;
  place-items: center;
  padding: 10px 8px;
  color: #4b5563;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 8px;
}

.tf-time-grid .tf-select-card {
  min-height: 98px;
}

.tf-select-card b {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 850;
}

.tf-select-card small {
  display: block;
  margin-top: 3px;
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 650;
}

.tf-select-card.is-selected {
  color: var(--tf-blue);
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  border-color: var(--tf-blue);
  box-shadow: 0 12px 26px rgba(11, 99, 255, 0.14);
}

.tf-select-card svg {
  width: 44px;
  height: 44px;
  color: #6b7280;
}

.tf-select-card.is-selected svg {
  color: var(--tf-blue);
}

.tf-field {
  display: grid;
  gap: 8px;
  margin-bottom: 17px;
}

.tf-field > span {
  font-size: 13px;
  font-weight: 850;
}

.tf-field div {
  position: relative;
}

.tf-location-input {
  display: grid;
  grid-template-columns: 1fr 44px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 9px;
}

.tf-field input {
  width: 100%;
  min-height: 46px;
  padding: 0 12px 0 14px;
  color: #374151;
  background: #ffffff;
  border: 0;
  outline: 0;
}

.tf-location-input:focus-within {
  border-color: var(--tf-blue);
  box-shadow: 0 0 0 4px rgba(11, 99, 255, 0.11);
}

.tf-address-input-row {
  grid-template-columns: minmax(0, 1fr) auto 44px;
}

.tf-address-input-row.is-company-button-hidden {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.tf-address-input-row.is-map-button-hidden {
  grid-template-columns: minmax(0, 1fr) auto;
}

.tf-address-input-row.is-company-button-hidden.is-map-button-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.tf-address-company-button {
  min-height: 46px;
  padding: 0 12px;
  color: var(--tf-blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  background: rgba(11, 99, 255, 0.08);
  border: 0;
  border-left: 1px solid var(--tf-border);
}

.tf-map-pick-button {
  display: grid;
  width: 44px;
  min-height: 46px;
  place-items: center;
  color: var(--tf-blue);
  background: #f8fbff;
  border: 0;
  border-left: 1px solid var(--tf-border);
}

.tf-map-pick-button svg {
  width: 23px;
  height: 23px;
}

.tf-map-pick-button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.tf-field input.is-disabled-by-permission {
  color: #94a3b8;
  background: #f8fafc;
  -webkit-text-fill-color: #94a3b8;
  cursor: not-allowed;
}

.tf-address-company-button.is-disabled-by-permission,
.tf-map-pick-button.is-disabled-by-permission,
.tf-distance-calc-button.is-disabled-by-permission {
  opacity: 0.55;
  cursor: not-allowed;
}

.tf-location-status {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 750;
}

.tf-location-status.is-set {
  color: var(--tf-blue);
}

.tf-location-status.is-set::before {
  width: 8px;
  height: 8px;
  margin-right: 5px;
  content: "";
  background: currentColor;
  border-radius: 999px;
}

.tf-form-section {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.tf-form-section__head {
  display: block;
}

.tf-form-section__head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 850;
}

.tf-form-section__head p {
  margin: 4px 0 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.tf-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.tf-input,
.tf-textarea,
.tf-color-custom {
  display: grid;
  gap: 8px;
}

.tf-input > span,
.tf-textarea > span,
.tf-color-custom > span {
  color: #111827;
  font-size: 12px;
  font-weight: 850;
}

.tf-input input,
.tf-input select,
.tf-input textarea,
.tf-textarea textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: #111827;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 10px;
  outline: 0;
}

.tf-textarea textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

.tf-input textarea {
  min-height: 74px;
  padding-top: 11px;
  resize: vertical;
}

.tf-input input:focus,
.tf-input select:focus,
.tf-input textarea:focus,
.tf-textarea textarea:focus {
  border-color: var(--tf-blue);
  box-shadow: 0 0 0 4px rgba(11, 99, 255, 0.11);
}

.tf-work-report-time-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
}

.tf-work-report-time-panel__head {
  display: grid;
  gap: 3px;
}

.tf-work-report-time-panel__head strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.tf-work-report-time-panel__head small {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.tf-work-report-fee-options {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.tf-work-report-fee-options__head {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: #eef5ff;
  border: 1px solid #cfe1ff;
  border-radius: 12px;
}

.tf-work-report-fee-options__head strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.tf-work-report-fee-options__head small {
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.tf-fee-option-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #ffffff;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
}

.tf-fee-option-card[hidden] {
  display: none;
}

.tf-fee-option-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tf-fee-option-card__head b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.tf-fee-option-card__head small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.tf-fee-option-card__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.tf-fee-option-card input[readonly] {
  background: #f8fafc;
  color: #0f172a;
}

.tf-fee-option-settings-grid {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .tf-fee-option-card__grid,
  .tf-fee-option-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-fee-option-card__grid .tf-form-grid__wide {
    grid-column: 1 / -1;
  }
}

.tf-work-report-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tf-time-sync-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tf-chip-button {
  min-height: 34px;
  padding: 0 11px;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.tf-chip-button:focus,
.tf-chip-button:hover {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
}

.tf-help-text {
  margin: 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 650;
}

.tf-form-note {
  margin: 10px 0 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.tf-color-palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.tf-color-custom--compact .tf-color-palette {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.tf-color-choice {
  position: relative;
  display: grid;
  min-height: 58px;
  place-items: center;
  padding: 7px 4px;
  color: #374151;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
}

.tf-color-choice i {
  display: block;
  width: 25px;
  height: 25px;
  background: var(--color);
  border: 1px solid rgba(17, 24, 39, 0.18);
  border-radius: 999px;
}

.tf-color-choice__other {
  background:
    linear-gradient(135deg, #ffffff 0 49%, transparent 50%),
    conic-gradient(#f97316, #facc15, #16a34a, #2563eb, #7c3aed, #ec4899, #f97316) !important;
}

.tf-color-choice b {
  margin-top: 4px;
  overflow: hidden;
  max-width: 100%;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-color-choice.is-selected {
  color: var(--tf-blue);
  border-color: var(--tf-blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 255, 0.12);
}

.tf-color-choice.is-selected::after {
  position: absolute;
  top: 5px;
  right: 6px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  content: "✓";
  background: var(--tf-blue);
  border-radius: 999px;
}

.tf-color-custom-input {
  margin-top: 10px;
}

.tf-report-launch-button {
  width: 100%;
  margin: 14px 0 18px;
}

.tf-work-report {
  display: grid;
  gap: 14px;
}

.tf-work-content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tf-work-content-chip {
  min-height: 42px;
  padding: 8px 10px;
  color: #374151;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 999px;
}

.tf-work-content-chip.is-selected {
  color: #ffffff;
  background: var(--tf-blue);
  border-color: var(--tf-blue);
  box-shadow: 0 9px 18px rgba(11, 99, 255, 0.2);
}

.tf-history-empty {
  margin: 0;
  padding: 18px;
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}

.tf-breakdown--compact {
  margin-top: 0;
}

.tf-breakdown--compact [data-report-option-breakdown] {
  display: contents;
}

.tf-signature-screen .tf-input {
  margin: 16px 0 12px;
}

.tf-signature-consent {
  padding: 16px;
  background: #eef5ff;
  border: 1px solid #cfe1ff;
  border-radius: 16px;
}

.tf-signature-consent h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 850;
}

.tf-signature-consent p {
  margin: 0;
  color: #1f2937;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.tf-signature-card {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 16px;
  color: var(--tf-text);
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: 18px;
  box-shadow: var(--tf-shadow);
}

.tf-signature-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tf-signature-card__head b,
.tf-signature-card__head small {
  display: block;
}

.tf-signature-card__head b {
  font-size: 15px;
  font-weight: 900;
}

.tf-signature-card__head small {
  margin-top: 4px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.tf-signature-status {
  display: inline-flex;
  min-height: 28px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  color: var(--tf-muted);
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.tf-signature-status.is-signed {
  color: #ffffff;
  background: var(--tf-green);
}

.tf-signature-preview {
  display: grid;
  min-height: 118px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(#eef2f7 1px, transparent 1px) left 74% / 100% 1px no-repeat,
    #ffffff;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
}

.tf-signature-preview span {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 850;
}

.tf-signature-preview.has-signature {
  background: #ffffff;
}

.tf-signature-preview img {
  display: block;
  width: 100%;
  max-height: 116px;
  object-fit: contain;
  object-position: center;
}

.tf-signature-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tf-signature-card__actions .tf-primary-button,
.tf-signature-card__actions .tf-secondary-button {
  min-height: 46px;
}

.tf-signature-pad {
  position: relative;
  overflow: hidden;
  min-height: clamp(190px, 42vw, 270px);
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.03);
}

.tf-signature-pad canvas {
  display: block;
  width: 100%;
  height: clamp(190px, 42vw, 270px);
  touch-action: none;
}

.tf-signature-pad span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 800;
  pointer-events: none;
}

.tf-signature-empty-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  background: #fff1f0;
  border: 1px solid #fecaca;
  border-radius: 12px;
}

.tf-signature-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.tf-signature-actions button:last-child {
  grid-column: 1 / -1;
}

.tf-signature-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
    linear-gradient(135deg, #020617 0%, #0f172a 100%);
  padding:
    env(safe-area-inset-top, 0px)
    env(safe-area-inset-right, 0px)
    env(safe-area-inset-bottom, 0px)
    env(safe-area-inset-left, 0px);
}

.tf-signature-fullscreen[hidden] {
  display: none !important;
}

body.tf-signature-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.tf-signature-open .tf-bottom-nav,
body.tf-signature-open .tf-mobile-nav {
  display: none !important;
}

.tf-signature-fullscreen__topbar {
  display: flex;
  min-width: 0;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.tf-signature-fullscreen__title {
  min-width: 0;
  text-align: center;
}

.tf-signature-fullscreen__title b,
.tf-signature-fullscreen__title small {
  display: block;
}

.tf-signature-fullscreen__title b {
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-signature-fullscreen__title small {
  margin-top: 2px;
  color: #cbd5e1;
  font-size: 11px;
  font-weight: 750;
}

.tf-signature-fullscreen__stage {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  padding: 10px;
}

.tf-signature-fullscreen__stage canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.32);
  touch-action: none;
  cursor: crosshair;
}

.tf-signature-fullscreen__toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tf-signature-fullscreen button {
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.tf-signature-fullscreen__save {
  color: #ffffff;
  background: #2563eb;
}

.tf-signature-fullscreen__cancel,
.tf-signature-fullscreen__toolbar button {
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.12);
}

.tf-signature-fullscreen__toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.tf-signature-pen-tools {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.tf-signature-pen-tools button {
  min-height: 34px;
  padding: 0 11px;
}

.tf-signature-pen-tools button.is-active {
  color: #0f172a;
  background: #f59e0b;
}

@media (orientation: landscape) and (max-height: 560px) {
  .tf-signature-fullscreen {
    grid-template-rows: 44px minmax(0, 1fr) 44px;
  }

  .tf-signature-fullscreen__topbar {
    min-height: 44px;
    padding: 4px 10px;
  }

  .tf-signature-fullscreen__title small {
    display: none;
  }

  .tf-signature-fullscreen__toolbar {
    min-height: 44px;
    padding: 4px 10px calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .tf-signature-fullscreen__stage {
    padding: 5px 8px 3px;
  }

  .tf-signature-fullscreen button {
    min-height: 34px;
    padding-inline: 12px;
  }

  .tf-signature-pen-tools button {
    min-height: 30px;
  }
}

@media (max-width: 380px) {
  .tf-signature-fullscreen__toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-signature-pen-tools {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

@media (orientation: portrait) and (max-width: 767px) {
  .tf-signature-fullscreen {
    inset: auto;
    top: 50%;
    left: 50%;
    width: 100vh;
    height: 100vw;
    min-width: 100vh;
    min-height: 100vw;
    grid-template-rows: 42px minmax(0, 1fr) 42px;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
  }

  .tf-signature-fullscreen__topbar {
    min-height: 42px;
    padding: 4px 10px;
  }

  .tf-signature-fullscreen__title b {
    font-size: 13px;
  }

  .tf-signature-fullscreen__title small {
    display: none;
  }

  .tf-signature-fullscreen__stage {
    padding: 5px 7px 2px;
  }

  .tf-signature-fullscreen__toolbar {
    display: flex;
    min-height: 42px;
    gap: 6px;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom, 0px));
  }

  .tf-signature-fullscreen button {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .tf-signature-pen-tools {
    grid-column: auto;
    gap: 3px;
    padding: 3px;
  }

  .tf-signature-pen-tools button {
    min-height: 28px;
    padding-inline: 9px;
  }
}

@supports (width: 100dvh) {
  @media (orientation: portrait) and (max-width: 767px) {
    .tf-signature-fullscreen {
      width: 100dvh;
      height: 100dvw;
      min-width: 100dvh;
      min-height: 100dvw;
    }
  }
}

.tf-pdf-signature-box img {
  display: block;
  max-width: 100%;
  height: 36px;
  margin-top: 7px;
  object-fit: contain;
  object-position: left center;
}

.tf-pdf-signature-box small {
  display: block;
  margin-top: 3px;
  color: var(--tf-muted);
  font-size: 8px;
}

.tf-pricing-section {
  margin-bottom: 14px;
}

.tf-pricing-option-list {
  display: grid;
  gap: 9px;
}

.tf-pricing-option-list label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
}

.tf-pricing-option-list span {
  font-size: 13px;
  font-weight: 850;
}

.tf-pricing-option-list input {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 9px;
  outline: 0;
}

.tf-pricing-option-list input:focus {
  border-color: var(--tf-blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 255, 0.11);
}

.tf-pricing-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #0b63ff, #0057ff);
  border-radius: 18px;
  box-shadow: 0 14px 26px rgba(11, 99, 255, 0.22);
}

.tf-pricing-preview span {
  font-size: 13px;
  font-weight: 800;
}

.tf-pricing-preview strong {
  font-size: 24px;
  font-weight: 900;
}

.tf-map-card {
  display: grid;
  gap: 12px;
  margin: 18px 0 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 16px;
  box-shadow: 0 9px 24px rgba(15, 23, 42, 0.05);
}

.tf-map-card__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.tf-map-card h2 {
  margin: 0 0 4px;
  font-size: 15px;
}

.tf-map-card p {
  margin: 0;
  color: var(--tf-muted);
  font-size: 11px;
  line-height: 1.5;
}

.tf-map-card__head button {
  min-height: 34px;
  padding: 0 12px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  background: var(--tf-blue);
  border: 0;
  border-radius: 999px;
}

.tf-map-card__head button:disabled {
  color: #94a3b8;
  background: #e5e7eb;
  cursor: not-allowed;
}

.tf-map-error {
  padding: 9px 11px;
  color: #b42318;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff1f0;
  border: 1px solid #fecaca;
  border-radius: 12px;
}

.tf-map-canvas {
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  color: var(--tf-blue);
  text-align: center;
  background:
    linear-gradient(90deg, rgba(11, 99, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(11, 99, 255, 0.08) 1px, transparent 1px),
    var(--tf-blue-soft);
  background-size: 24px 24px;
  border: 1px solid #dbeafe;
  border-radius: 13px;
}

.tf-map-canvas span {
  max-width: 15rem;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
}

.tf-map-canvas.is-ready {
  display: block;
  background: #eef5ff;
}

.tf-map-canvas img {
  max-width: none;
}

.pac-container {
  z-index: 99999;
}

.tf-route-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tf-route-summary div {
  display: grid;
  gap: 3px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 12px;
}

.tf-route-summary span {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 750;
}

.tf-route-summary b {
  color: #111827;
  font-size: 15px;
}

.tf-route-summary small {
  color: var(--tf-muted);
  font-size: 10px;
  font-weight: 700;
}

.tf-is-loading {
  opacity: 0.72;
  pointer-events: none;
}

.tf-map-modal[hidden] {
  display: none;
}

.tf-map-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  align-items: end;
}

.tf-map-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  border: 0;
}

.tf-map-modal__panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(100%, var(--tf-shell-width));
  max-height: calc(92svh - env(safe-area-inset-top));
  margin: 0 auto;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  overflow: auto;
  background: #ffffff;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -20px 50px rgba(15, 23, 42, 0.18);
}

.tf-map-modal__header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.tf-map-modal__header h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.tf-map-modal__header p,
.tf-map-picker-status {
  margin: 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.tf-map-picker-status[data-status-mode="warning"] {
  color: #b45309;
}

.tf-map-picker-status[data-status-mode="error"] {
  color: #dc2626;
}

.tf-map-picker-status[data-status-mode="ready"] {
  color: var(--tf-blue);
}

.tf-map-modal__header button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--tf-blue);
  font-size: 12px;
  font-weight: 850;
  background: var(--tf-blue-soft);
  border: 0;
  border-radius: 999px;
}

.tf-map-canvas--picker {
  min-height: 55svh;
}

.tf-map-actions {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
}

.tf-stepper {
  display: grid;
  grid-template-columns: 1fr 44px 56px auto 44px;
  gap: 8px;
  align-items: center;
  min-height: 62px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 9px;
}

.tf-stepper span {
  color: #374151;
  font-size: 13px;
  font-weight: 750;
}

.tf-stepper button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #111827;
  background: #ffffff;
  border: 0;
  border-radius: 9px;
}

.tf-stepper button svg {
  width: 20px;
  height: 20px;
}

.tf-stepper strong {
  font-size: 24px;
  font-weight: 850;
  text-align: center;
}

.tf-distance-input {
  width: 58px;
  min-width: 0;
  height: 38px;
  color: #111827;
  font-size: 21px;
  font-weight: 850;
  text-align: center;
  background: #ffffff;
  border: 1px solid transparent;
  border-radius: 9px;
  outline: 0;
}

.tf-distance-input:focus {
  border-color: var(--tf-blue);
  box-shadow: 0 0 0 3px rgba(11, 99, 255, 0.11);
}

.tf-distance-input::-webkit-outer-spin-button,
.tf-distance-input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

.tf-stepper em {
  color: var(--tf-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.tf-actions {
  display: grid;
  grid-template-columns: 1fr 2.05fr;
  gap: 12px;
  margin-top: 26px;
}

.tf-actions--single {
  grid-template-columns: 1fr;
}

.tf-primary-button,
.tf-secondary-button {
  min-height: 54px;
  font-size: 15px;
  font-weight: 850;
  border-radius: 9px;
}

.tf-primary-button {
  color: #ffffff;
  background: linear-gradient(180deg, #2d7cff, var(--tf-blue-deep));
  border: 0;
  box-shadow: 0 13px 26px rgba(11, 99, 255, 0.24);
}

.tf-secondary-button {
  color: #111827;
  background: #ffffff;
  border: 1px solid var(--tf-border);
}

.tf-option-list {
  gap: 7px;
}

.tf-option-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto 42px;
  gap: 8px;
  align-items: center;
  min-height: 43px;
  padding: 6px 0;
  text-align: left;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #edf0f5;
}

.tf-option-row b {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-option-row em {
  color: #111827;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.tf-option-row__icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #111827;
}

.tf-option-row__icon svg {
  width: 28px;
  height: 28px;
}

.tf-toggle {
  position: relative;
  display: block;
  width: 40px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 999px;
  transition: background 160ms ease;
}

.tf-toggle::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  content: "";
  background: #ffffff;
  border-radius: 999px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.16);
  transition: transform 160ms ease;
}

.tf-option-row[aria-pressed="true"] .tf-toggle {
  background: var(--tf-blue);
}

.tf-option-row[aria-pressed="true"] .tf-toggle::after {
  transform: translateX(16px);
}

.tf-total-card {
  display: grid;
  min-height: 136px;
  place-items: center;
  margin: 16px 0;
  padding: 18px;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: var(--tf-radius);
  box-shadow: var(--tf-shadow);
}

.tf-total-card span {
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 800;
}

.tf-total-card strong {
  display: block;
  margin-top: 7px;
  color: var(--tf-blue);
  font-size: 34px;
  font-weight: 850;
  line-height: 1;
}

.tf-breakdown {
  display: grid;
  gap: 0;
  margin: 0;
}

.tf-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #eef0f4;
}

[data-option-breakdown] {
  display: contents !important;
}

[data-option-breakdown] div {
  display: flex;
}

.tf-breakdown dt,
.tf-breakdown dd {
  margin: 0;
  font-size: 13px;
}

.tf-breakdown dt {
  color: #111827;
  font-weight: 700;
}

.tf-breakdown dd {
  font-weight: 850;
}

.tf-breakdown__sub {
  margin-top: 8px;
  padding-top: 12px !important;
}

.tf-breakdown__total dt,
.tf-breakdown__total dd {
  font-size: 18px;
  font-weight: 900;
}

.tf-action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.tf-action-grid button {
  display: grid;
  min-height: 82px;
  place-items: center;
  padding: 10px 6px;
  color: var(--tf-blue);
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 13px;
}

.tf-action-icon {
  width: 42px;
  height: 42px;
  color: currentColor;
  background: var(--tf-blue-soft);
}

.tf-action-icon svg {
  width: 30px;
  height: 30px;
}

.tf-action-card--line {
  color: var(--tf-green) !important;
}

.tf-action-card--line .tf-action-icon {
  background: #ecfdf3;
}

.tf-action-card:disabled,
.tf-action-card[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.tf-line-share-button {
  display: inline-grid;
  min-height: 38px;
  padding: 0 16px;
  place-items: center;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  background: #06c755;
  border: 0;
  border-radius: 12px;
}

.tf-line-share-button:disabled,
.tf-line-share-button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.tf-action-grid b {
  font-size: 12px;
  font-weight: 850;
}

.tf-history-search {
  display: grid;
  grid-template-columns: 22px 1fr 38px;
  gap: 8px;
  align-items: center;
  min-height: 47px;
  margin-bottom: 12px;
  padding: 0 8px 0 13px;
  background: #f3f4f6;
  border-radius: 12px;
}

.tf-history-search input {
  min-width: 0;
  background: transparent;
  border: 0;
  outline: 0;
}

.tf-history-search button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #6b7280;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 999px;
}

.tf-history-search__icon {
  display: grid;
  place-items: center;
  color: #9ca3af;
}

.tf-history-search__icon svg,
.tf-history-search button svg {
  width: 20px;
  height: 20px;
}

.tf-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  background: #f3f6fb;
  border-radius: 12px;
}

.tf-tabs button {
  min-height: 34px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
  background: transparent;
  border: 0;
  border-radius: 9px;
}

.tf-tabs .is-selected {
  color: var(--tf-blue);
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.tf-history-card {
  display: grid;
  gap: 6px;
  padding: 13px;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  cursor: pointer;
}

.tf-history-card:focus-visible {
  outline: 3px solid rgba(11, 99, 255, 0.25);
  outline-offset: 2px;
}

.tf-history-card div,
.tf-history-card footer {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: space-between;
}

.tf-history-card span,
.tf-history-card time,
.tf-history-card p {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 700;
}

.tf-history-card h2 {
  margin: 0;
  font-size: 15px;
}

.tf-history-card p {
  margin: 0;
}

.tf-history-card footer {
  justify-content: flex-start;
}

.tf-history-card footer strong {
  margin-left: auto;
  color: var(--tf-blue);
  font-size: 14px;
}

.tf-history-card footer b {
  padding: 4px 8px;
  color: var(--tf-blue);
  font-size: 11px;
  background: var(--tf-blue-soft);
  border-radius: 999px;
}

.tf-history-card footer b.is-complete {
  color: var(--tf-green);
  background: #ecfdf3;
}

.tf-history-resume {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

.tf-history-resume small {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.tf-history-resume button {
  min-height: 32px;
  padding: 0 13px;
  color: #ffffff;
  background: var(--tf-blue);
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.tf-history-resume button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.tf-history-swipe {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-radius: 14px;
  touch-action: pan-y;
}

.tf-history-swipe__action {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 0;
  display: flex;
  width: min(56%, 190px);
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 0 18px;
  color: #ffffff;
  pointer-events: none;
}

.tf-history-swipe__action b {
  font-size: 14px;
  font-weight: 950;
}

.tf-history-swipe__action span {
  font-size: 11px;
  font-weight: 800;
  opacity: 0.9;
}

.tf-history-swipe__action--bundle {
  left: 0;
  align-items: flex-start;
  background: linear-gradient(90deg, #f59e0b, #b45309);
  text-align: left;
}

.tf-history-swipe__action--card {
  right: 0;
  align-items: flex-end;
  background: linear-gradient(270deg, #ef4444, #b91c1c);
  text-align: right;
}

.tf-history-swipe .tf-history-card {
  position: relative;
  z-index: 1;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
  will-change: transform;
}

.tf-history-swipe.is-touching .tf-history-card,
.tf-history-swipe.is-swiping .tf-history-card {
  transition: none;
}

.tf-history-swipe.is-card-delete .tf-history-card {
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.22);
}

.tf-history-swipe.is-bundle-delete .tf-history-card {
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.24);
}

.tf-history-detail[hidden] {
  display: none !important;
}

.tf-history-detail {
  position: fixed;
  inset: 0;
  z-index: 99970;
  display: grid;
  place-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 14px calc(14px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(10px);
}

.tf-history-detail-open {
  overflow: hidden;
}

.tf-history-delete-modal[hidden] {
  display: none !important;
}

.tf-history-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 99980;
  display: grid;
  place-items: center;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px);
}

.tf-history-delete-open {
  overflow: hidden;
}

.tf-history-delete-modal__panel {
  width: min(100%, 390px);
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 20px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

.tf-history-delete-modal__panel header {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.tf-history-delete-modal__panel span {
  color: #dc2626;
  font-size: 12px;
  font-weight: 950;
}

.tf-history-delete-modal__panel h2 {
  margin: 0;
  color: var(--tf-ink);
  font-size: 18px;
  line-height: 1.35;
}

.tf-history-delete-modal__panel p {
  margin: 0;
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.7;
}

.tf-history-delete-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.tf-history-delete-modal__confirm {
  background: #dc2626;
}

.tf-history-delete-modal__confirm:disabled {
  opacity: 0.65;
}

.tf-history-detail__panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  width: min(100%, 430px);
  max-height: min(92svh, 820px);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 20px;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.2);
}

.tf-history-detail__header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--tf-border);
}

.tf-history-detail__header span {
  display: block;
  color: var(--tf-blue);
  font-size: 12px;
  font-weight: 900;
}

.tf-history-detail__header strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
  word-break: break-all;
}

.tf-history-detail__tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 12px;
  border-bottom: 1px solid var(--tf-border);
}

.tf-history-detail__tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
  background: #f3f6fb;
  border: 0;
  border-radius: 999px;
}

.tf-history-detail__tabs button.is-selected {
  color: #ffffff;
  background: var(--tf-blue);
}

.tf-history-detail__body {
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 18px;
}

.tf-detail-rows {
  display: grid;
  gap: 8px;
  margin: 0;
}

.tf-detail-rows div,
.tf-detail-fees div {
  display: grid;
  grid-template-columns: minmax(94px, 0.42fr) 1fr;
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid var(--tf-border);
}

.tf-detail-rows dt {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
}

.tf-detail-rows dd {
  margin: 0;
  color: var(--tf-text);
  font-size: 13px;
  font-weight: 750;
  word-break: break-word;
}

.tf-detail-fees {
  display: grid;
  margin-top: 14px;
}

.tf-detail-fees span {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-detail-fees b {
  justify-self: end;
  color: var(--tf-blue);
}

.tf-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tf-detail-tags b,
.tf-detail-tags span {
  padding: 7px 10px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
  background: #f3f6fb;
  border-radius: 999px;
}

.tf-detail-pdfs {
  display: grid;
  gap: 10px;
}

.tf-detail-pdfs a {
  display: grid;
  gap: 3px;
  padding: 12px;
  color: var(--tf-text);
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
}

.tf-detail-pdfs small {
  color: var(--tf-muted);
  font-weight: 750;
}

.tf-dashboard-head {
  align-items: start;
}

.tf-dashboard-head button {
  min-height: 34px;
  padding: 0 14px;
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 999px;
}

.tf-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.tf-kpi-grid article,
.tf-chart-card {
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 15px;
  box-shadow: 0 9px 24px rgba(15, 23, 42, 0.05);
}

.tf-kpi-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
}

.tf-kpi-grid span,
.tf-kpi-grid small {
  color: var(--tf-muted);
  font-size: 10px;
  font-weight: 750;
}

.tf-kpi-grid strong {
  color: var(--tf-blue);
  font-size: 15px;
  font-weight: 900;
}

.tf-kpi-grid small {
  color: var(--tf-green);
}

.tf-sales-overview-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  margin-bottom: 12px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(11, 99, 255, 0.96), rgba(0, 87, 255, 0.86)),
    #0b63ff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(11, 99, 255, 0.22);
}

.tf-sales-overview-card__main {
  display: grid;
  gap: 5px;
}

.tf-sales-overview-card__main span,
.tf-sales-overview-card__main small,
.tf-sales-metric-strip span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 11px;
  font-weight: 850;
}

.tf-sales-overview-card__main strong {
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.05;
}

.tf-sales-metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tf-sales-metric-strip article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 12px;
}

.tf-sales-metric-strip b {
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-chart-card {
  margin-top: 12px;
  padding: 16px;
}

.tf-chart-card h2 {
  margin: 0 0 12px;
  font-size: 14px;
}

.tf-chart-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.tf-chart-card__head h2,
.tf-sales-ring-card h2 {
  margin: 0;
}

.tf-chart-card__head p {
  margin: 0;
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 800;
}

.tf-sales-ring-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tf-sales-ring-grid article {
  display: grid;
  gap: 8px;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.tf-sales-ring-grid strong {
  display: block;
  color: var(--tf-text);
  font-size: 12px;
  font-weight: 950;
}

.tf-sales-ring-grid small {
  display: block;
  margin-top: 2px;
  color: var(--tf-muted);
  font-size: 10px;
  font-weight: 800;
}

.tf-sales-ring {
  --ring-color: var(--tf-blue);
  --value: 0%;
  position: relative;
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  color: var(--tf-text);
  background: conic-gradient(var(--ring-color) var(--value), #e5e7eb 0);
  border-radius: 999px;
}

.tf-sales-ring::after {
  position: absolute;
  inset: 9px;
  content: "";
  background: #ffffff;
  border-radius: inherit;
}

.tf-sales-ring b {
  position: relative;
  z-index: 1;
  font-size: 14px;
  font-weight: 950;
}

.tf-sales-ring--paid {
  --ring-color: #16a34a;
}

.tf-sales-ring--unpaid {
  --ring-color: #ef4444;
}

.tf-sales-ring--unbilled {
  --ring-color: #f59e0b;
}

.tf-bar-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  align-items: end;
  height: 172px;
}

.tf-bar-chart div {
  display: grid;
  gap: 7px;
  align-items: end;
  height: 100%;
  text-align: center;
}

.tf-bar-chart i {
  display: block;
  width: 100%;
  min-height: 18px;
  background: linear-gradient(180deg, #72a7ff, var(--tf-blue));
  border-radius: 8px 8px 2px 2px;
}

.tf-bar-chart span {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 750;
}

.tf-donut-wrap {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  align-items: center;
}

.tf-donut {
  width: 112px;
  height: 112px;
  background: conic-gradient(var(--tf-blue) 0 62%, #83adff 62% 88%, #cbd5e1 88% 100%);
  border-radius: 999px;
}

.tf-donut::after {
  display: block;
  width: 58px;
  height: 58px;
  margin: 27px;
  content: "";
  background: #ffffff;
  border-radius: 999px;
}

.tf-donut-wrap ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-donut-wrap li {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 8px;
  align-items: center;
  color: #374151;
  font-size: 12px;
  font-weight: 750;
}

.tf-donut-wrap li i {
  width: 10px;
  height: 10px;
  background: var(--tf-blue);
  border-radius: 3px;
}

.tf-donut-wrap li:nth-child(2) i {
  background: #83adff;
}

.tf-donut-wrap li:nth-child(3) i {
  background: #cbd5e1;
}

.tf-donut-wrap b {
  font-weight: 850;
}

.tf-bar-chart small {
  color: var(--tf-muted);
  font-size: 10px;
  font-weight: 750;
}

.tf-bar-chart em,
.ca-sales-bars em {
  overflow: hidden;
  color: var(--tf-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-sales-empty,
.ca-sales-empty {
  margin: 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.tf-sales-empty {
  align-self: center;
  grid-column: 1 / -1;
}

.tf-sales-breakdown {
  display: grid;
  gap: 10px;
}

.tf-sales-breakdown article {
  position: relative;
  display: grid;
  gap: 7px;
  padding-bottom: 8px;
}

.tf-sales-breakdown div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.tf-sales-breakdown b,
.tf-sales-breakdown strong {
  font-size: 12px;
  font-weight: 900;
}

.tf-sales-breakdown span {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 800;
}

.tf-sales-breakdown i {
  display: block;
  height: 7px;
  background: linear-gradient(90deg, var(--tf-blue), #f59e0b);
  border-radius: 999px;
}

.ca-sales-dashboard {
  display: grid;
  gap: 16px;
}

.ca-sales-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--ca-border);
  border-radius: 12px;
}

.ca-sales-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ca-sales-toolbar span,
.ca-sales-table-card header p {
  color: var(--ca-muted);
  font-size: 12px;
  font-weight: 850;
}

.ca-sales-toolbar input,
.ca-sales-toolbar select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--ca-border);
  border-radius: 8px;
  background: #ffffff;
}

.ca-sales-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.ca-sales-summary-grid article {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--ca-border);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.ca-sales-summary-grid span {
  color: var(--ca-muted);
  font-size: 12px;
  font-weight: 850;
}

.ca-sales-summary-grid b {
  color: var(--ca-primary);
  font-size: 18px;
  font-weight: 950;
}

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

.ca-sales-table-card {
  min-width: 0;
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--ca-border);
  border-radius: 12px;
}

.ca-sales-table-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ca-sales-table-card h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 950;
}

.ca-sales-table-card header p {
  margin: 3px 0 0;
}

.ca-sales-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(28px, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 220px;
}

.ca-sales-bars div {
  display: grid;
  gap: 6px;
  align-items: end;
  height: 100%;
  min-width: 0;
  text-align: center;
}

.ca-sales-bars i {
  display: block;
  min-height: 8px;
  background: linear-gradient(180deg, #60a5fa, var(--ca-primary));
  border-radius: 8px 8px 2px 2px;
}

.ca-sales-bars span,
.ca-sales-bars small,
.ca-sales-bars em {
  overflow: hidden;
  color: var(--ca-muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-sales-empty button {
  margin-left: 8px;
  color: var(--ca-primary);
  font-weight: 900;
  background: transparent;
  border: 0;
}

@media (max-width: 1180px) {
  .ca-sales-toolbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .ca-sales-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .ca-sales-toolbar,
  .ca-sales-summary-grid {
    grid-template-columns: 1fr;
  }

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

  .tf-bar-chart {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 520px) {
  .tf-vehicle-capture-grid,
  .ca-photo-section__grid {
    grid-template-columns: 1fr;
  }
}

.tf-pdf-nav {
  position: sticky;
  top: calc(0px + env(safe-area-inset-top));
  z-index: 3;
  margin: calc(-18px - env(safe-area-inset-top)) -20px 14px;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px;
  background: #ffffff;
  border-bottom: 1px solid var(--tf-border);
}

.tf-pdf-nav button {
  color: var(--tf-blue);
  font-weight: 850;
  background: transparent;
  border: 0;
}

.tf-pdf-viewer {
  display: grid;
  gap: 18px;
  overflow: auto;
  padding: 4px 0 16px;
}

.tf-pdf-page {
  width: 100%;
  min-height: 620px;
  padding: 18px;
  color: #111827;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 9px;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.09);
}

.tf-pdf-page > header {
  display: grid;
  grid-template-columns: 1fr auto 54px;
  gap: 12px;
  align-items: start;
  padding-bottom: 12px;
  border-bottom: 2px solid #111827;
}

.tf-pdf-page p,
.tf-pdf-page h2 {
  margin: 0;
}

.tf-pdf-page h2 {
  margin-bottom: 8px;
  font-size: 11px;
}

.tf-pdf-page p,
.tf-pdf-page td,
.tf-pdf-page th,
.tf-pdf-page li {
  font-size: 10px;
}

.tf-pdf-logo {
  font-size: 22px;
}

.tf-pdf-meta {
  display: grid;
  grid-template-columns: auto auto;
  gap: 5px 8px;
  font-size: 10px;
  white-space: nowrap;
}

.tf-qr {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #111827;
  background: #ffffff;
  border: 1px solid #111827;
  outline: 3px solid #ffffff;
}

.tf-qr svg {
  width: 42px;
  height: 42px;
}

.tf-pdf-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.tf-pdf-info-grid--report {
  grid-template-columns: 1fr 1fr;
}

.tf-pdf-info-grid section,
.tf-pdf-work,
.tf-pdf-sign section {
  padding: 10px;
  border: 1px solid #d1d5db;
}

.tf-pdf-exterior-summary {
  display: grid;
  grid-template-columns: 1fr 122px;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #d1d5db;
}

.tf-pdf-exterior-summary p {
  margin-top: 3px;
  line-height: 1.45;
}

.tf-mini-vehicle-diagram {
  position: relative;
  min-height: 74px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.tf-mini-vehicle-diagram img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 74px;
  object-fit: contain;
  background: #ffffff;
}

.tf-mini-vehicle-diagram__car {
  position: absolute;
  top: 26px;
  left: 17px;
  width: 88px;
  height: 32px;
  border: 2px solid #111827;
  border-radius: 20px 22px 9px 9px;
}

.tf-mini-vehicle-diagram__car::before {
  position: absolute;
  top: -15px;
  left: 23px;
  width: 41px;
  height: 18px;
  content: "";
  border: 2px solid #111827;
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
}

.tf-mini-vehicle-diagram__car::after {
  position: absolute;
  right: 10px;
  bottom: -8px;
  left: 10px;
  height: 12px;
  content: "";
  background:
    radial-gradient(circle at 0 50%, #111827 0 5px, transparent 6px),
    radial-gradient(circle at 100% 50%, #111827 0 5px, transparent 6px);
}

.tf-mini-vehicle-diagram i,
.tf-damage-marker {
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: #ffffff;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  background: var(--tf-blue);
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 2px 7px rgba(11, 99, 255, 0.35);
  transform: translate(-50%, -50%);
}

.tf-pdf-work ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-pdf-work li::before {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 5px;
  content: "";
  vertical-align: -1px;
  background: var(--tf-blue);
  mask: url("../towflow/icons/svg/check-circle.svg") center / contain no-repeat;
  -webkit-mask: url("../towflow/icons/svg/check-circle.svg") center / contain no-repeat;
}

.tf-pdf-sign span::before {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 4px;
  content: "";
  vertical-align: -2px;
  background: currentColor;
  mask: url("../towflow/icons/svg/signature-pen.svg") center / contain no-repeat;
  -webkit-mask: url("../towflow/icons/svg/signature-pen.svg") center / contain no-repeat;
}

.tf-pdf-table {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
}

.tf-pdf-table th,
.tf-pdf-table td {
  padding: 6px;
  border: 1px solid #d1d5db;
  word-break: break-word;
}

.tf-pdf-table th {
  background: #f3f4f6;
}

.tf-pdf-table th:last-child,
.tf-pdf-table td:last-child {
  text-align: right;
}

.tf-pdf-total {
  display: grid;
  justify-content: end;
  margin-top: 10px;
}

.tf-pdf-total div {
  display: grid;
  grid-template-columns: 110px 110px;
  gap: 8px;
  padding: 3px 0;
  text-align: right;
}

.tf-pdf-total strong {
  font-size: 22px;
}

.tf-pdf-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.tf-pdf-sign section {
  min-height: 58px;
}

.tf-pdf-sign span {
  display: block;
  color: var(--tf-muted);
  font-size: 9px;
}

.tf-pdf-sign b {
  display: block;
  margin-top: 12px;
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
  font-weight: 500;
}

.tf-inspection-basic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0 10px;
}

.tf-inspection-basic section {
  padding: 9px 10px;
  border: 1px solid #d1d5db;
}

.tf-inspection-diagrams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.tf-vehicle-panel {
  overflow: hidden;
  border: 1px solid #111827;
  border-radius: 6px;
}

.tf-vehicle-panel h3 {
  margin: 0;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 9px;
  line-height: 1.1;
  background: #111827;
}

.tf-vehicle-figure {
  position: relative;
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.tf-vehicle-diagram__image {
  display: block;
  width: 92%;
  height: 96px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.tf-vehicle-figure--side .tf-vehicle-diagram__image {
  width: 98%;
}

.tf-vehicle-diagram__image.is-missing {
  opacity: 0.25;
}

.tf-vehicle-diagram__markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tf-vehicle-diagram__markers .tf-damage-marker {
  z-index: 2;
}

.tf-pdf-page--inspection .tf-pdf-table {
  margin-top: 9px;
  table-layout: fixed;
}

.tf-damage-table th,
.tf-damage-table td,
.tf-check-table th,
.tf-check-table td {
  padding: 4px 3px;
  font-size: 8px;
  line-height: 1.25;
}

.tf-damage-table th:first-child,
.tf-damage-table td:first-child {
  width: 22px;
  text-align: center;
}

.tf-check-table th:first-child,
.tf-check-table td:first-child {
  width: 62px;
}

.tf-confirmation-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 10px;
}

.tf-confirmation-grid div {
  min-height: 38px;
  padding: 6px;
  border: 1px solid #d1d5db;
}

.tf-confirmation-grid__wide {
  grid-column: span 2;
}

.tf-confirmation-grid span,
.tf-confirmation-grid b {
  display: block;
  font-size: 8px;
  line-height: 1.35;
}

.tf-confirmation-grid span {
  color: var(--tf-muted);
  font-weight: 750;
}

.tf-confirmation-grid b {
  margin-top: 2px;
  font-weight: 850;
}

.tf-pdf-sign--inspection {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 10px;
}

.tf-pdf-sign--inspection section {
  min-height: 50px;
}

.tf-pdf-sign--inspection b {
  font-size: 16px;
}

.tf-pdf-page footer {
  margin-top: 14px;
  padding-top: 8px;
  color: var(--tf-muted);
  font-size: 9px;
  border-top: 1px solid #d1d5db;
}

.tf-settings-list {
  margin-top: 16px;
}

.tf-fleet-manager .tf-textarea {
  grid-column: 1 / -1;
}

.tf-actions--split {
  grid-template-columns: 1fr 1fr;
}

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

.tf-fleet-list--admin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.tf-fleet-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.tf-fleet-card__main {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  color: var(--tf-text);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.tf-fleet-card__main span {
  width: fit-content;
  min-height: 22px;
  padding: 0 9px;
  color: #fff;
  background: var(--tf-blue);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 22px;
}

.tf-fleet-card--busy .tf-fleet-card__main span {
  background: #f59e0b;
}

.tf-fleet-card--maintenance .tf-fleet-card__main span,
.tf-fleet-card--inactive .tf-fleet-card__main span {
  background: #6b7280;
}

.tf-fleet-card__main b {
  overflow: hidden;
  font-size: 15px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-fleet-card__main small,
.tf-fleet-card__main em {
  overflow: hidden;
  color: var(--tf-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-fleet-card__delete {
  align-self: center;
  min-width: 58px;
  min-height: 36px;
  color: var(--tf-red);
  background: #fff;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

.tf-fleet-empty {
  margin: 0;
  padding: 16px;
  color: var(--tf-muted);
  text-align: center;
  background: var(--tf-soft);
  border: 1px dashed var(--tf-border);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
}

.tf-segmented,
.tf-theme-choice-grid,
.tf-setting-toggle-list,
.tf-setting-status-grid,
.tf-user-list {
  display: grid;
  gap: 10px;
}

.tf-segmented {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border: 1px solid var(--tf-border);
  border-radius: 15px;
  background: var(--tf-soft);
}

.tf-segmented button,
.tf-theme-choice-grid button,
.tf-setting-toggle-list button {
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  font-weight: 900;
}

.tf-segmented button.is-selected,
.tf-theme-choice-grid button.is-selected,
.tf-setting-toggle-list button.is-on {
  color: #fff;
  background: var(--tf-blue);
  box-shadow: 0 10px 20px rgba(11, 99, 255, 0.18);
}

.tf-pdf-diagnostics {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--tf-border);
  border-radius: 18px;
  background: var(--tf-soft);
}

.tf-pdf-diagnostics__head {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.tf-pdf-diagnostics__head h2 {
  margin: 0;
  color: var(--tf-text);
  font-size: 16px;
  font-weight: 900;
}

.tf-pdf-diagnostics__head p {
  margin: 4px 0 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.5;
}

.tf-pdf-diagnostics__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.tf-pdf-diagnostics__grid div {
  padding: 10px;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  background: var(--tf-surface);
}

.tf-pdf-diagnostics__grid dt {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 900;
}

.tf-pdf-diagnostics__grid dd {
  margin: 3px 0 0;
  color: var(--tf-text);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.tf-pdf-diagnostics__grid dd.is-ok {
  color: var(--tf-green);
}

.tf-pdf-diagnostics__grid dd.is-error {
  color: var(--tf-red);
}

.tf-pdf-diagnostics__unresolved {
  max-height: 180px;
  overflow: auto;
  padding: 10px;
  color: var(--tf-muted);
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid var(--tf-border);
  border-radius: 12px;
  background: var(--tf-surface);
}

.tf-pdf-diagnostics__unresolved div + div {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--tf-border);
}

.tf-pdf-diagnostics__unresolved b,
.tf-pdf-diagnostics__unresolved small {
  display: block;
}

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

.tf-theme-choice-grid button {
  display: grid;
  min-height: 108px;
  align-content: center;
  gap: 6px;
  padding: 14px;
  text-align: left;
  border-color: var(--tf-border);
  background: var(--tf-surface);
  box-shadow: var(--tf-shadow);
}

.tf-theme-choice-grid span,
.tf-user-list span,
.tf-setting-status-grid span {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 750;
}

.tf-setting-toggle-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-color: var(--tf-border);
  background: var(--tf-surface);
  text-align: left;
}

.tf-setting-toggle-list button::after {
  content: "OFF";
  min-width: 46px;
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--tf-muted);
  background: var(--tf-soft);
  font-size: 11px;
  text-align: center;
}

.tf-setting-toggle-list button.is-on::after {
  content: "ON";
  color: var(--tf-blue);
  background: #fff;
}

.tf-setting-status-grid {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.tf-setting-status-grid article,
.tf-user-list article {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  background: var(--tf-surface);
}

.tf-setting-status-grid b,
.tf-user-list b {
  font-size: 14px;
}

.tf-current-user-section {
  gap: 12px;
}

.tf-current-user-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  box-shadow: var(--tf-shadow);
}

.tf-current-user-card__avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  background: var(--tf-blue);
  color: #ffffff;
  font-size: 15px;
  font-weight: 950;
}

.tf-current-user-card__body {
  min-width: 0;
}

.tf-current-user-card__body span {
  display: block;
  color: var(--tf-blue);
  font-size: 11px;
  font-weight: 950;
}

.tf-current-user-card__body b {
  display: block;
  margin-top: 2px;
  color: var(--tf-text);
  font-size: 16px;
  font-weight: 950;
  overflow-wrap: anywhere;
}

.tf-current-user-card__body small {
  display: block;
  margin-top: 3px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.tf-current-user-card > strong {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--tf-blue);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.tf-current-user-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tf-current-user-meta div {
  padding: 11px;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  background: var(--tf-surface);
}

.tf-current-user-meta span {
  display: block;
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 850;
}

.tf-current-user-meta b {
  display: block;
  margin-top: 3px;
  color: var(--tf-text);
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

@media (max-width: 390px) {
  .tf-current-user-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tf-current-user-card > strong {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .tf-current-user-meta {
    grid-template-columns: 1fr;
  }
}

html[data-carrec-theme="dark"] .tf-current-user-card {
  border-color: rgba(24, 199, 245, 0.24);
  background: linear-gradient(135deg, rgba(0, 168, 216, 0.16), rgba(3, 15, 30, 0.92));
}

html[data-carrec-theme="dark"] .tf-current-user-card > strong {
  background: rgba(24, 199, 245, 0.16);
  color: #7dd3fc;
}

html[data-carrec-theme="dark"] .tf-current-user-meta div {
  border-color: rgba(24, 199, 245, 0.18);
  background: rgba(3, 15, 30, 0.86);
}

html[data-carrec-theme="dark"],
html[data-carrec-theme="dark"] body.carrec-app-shell,
html[data-carrec-theme="dark"] .tf-app,
html[data-carrec-theme="dark"] .tf-shell {
  color: var(--tf-text);
  background:
    radial-gradient(circle at 70% 8%, rgba(0, 87, 200, 0.34), transparent 32%),
    linear-gradient(180deg, #000d1c 0%, #001022 46%, #000d1c 100%);
}

html[data-carrec-theme="dark"] .tf-screen,
html[data-carrec-theme="dark"] .tf-screen-body,
html[data-carrec-theme="dark"] .ca-admin-shell,
html[data-carrec-theme="dark"] .ca-main,
html[data-carrec-theme="dark"] .ca-content {
  background:
    radial-gradient(circle at top right, rgba(0, 168, 216, 0.14), transparent 34%),
    var(--tf-bg);
}

html[data-carrec-theme="dark"] .tf-logo,
html[data-carrec-theme="dark"] .tf-pdf-logo {
  color: #fff;
}

html[data-carrec-theme="dark"] .tf-menu-card,
html[data-carrec-theme="dark"] .tf-settings-list button,
html[data-carrec-theme="dark"] .tf-form-section,
html[data-carrec-theme="dark"] .tf-card,
html[data-carrec-theme="dark"] .tf-field,
html[data-carrec-theme="dark"] .tf-select-card,
html[data-carrec-theme="dark"] .tf-option-row,
html[data-carrec-theme="dark"] .tf-kpi-grid article,
html[data-carrec-theme="dark"] .tf-total-card,
html[data-carrec-theme="dark"] .tf-chart-card,
html[data-carrec-theme="dark"] .ca-sales-toolbar,
html[data-carrec-theme="dark"] .ca-sales-summary-grid article,
html[data-carrec-theme="dark"] .ca-sales-table-card,
html[data-carrec-theme="dark"] .tf-history-card,
html[data-carrec-theme="dark"] .tf-dispatch-card,
html[data-carrec-theme="dark"] .tf-action-card,
html[data-carrec-theme="dark"] .tf-stepper,
html[data-carrec-theme="dark"] .tf-pricing-preview,
html[data-carrec-theme="dark"] .tf-setting-status-grid article,
html[data-carrec-theme="dark"] .tf-user-list article,
html[data-carrec-theme="dark"] .tf-theme-choice-grid button,
html[data-carrec-theme="dark"] .tf-setting-toggle-list button,
html[data-carrec-theme="dark"] .tf-history-delete-modal__panel {
  color: var(--tf-text);
  border-color: rgba(24, 199, 245, 0.18);
  background: linear-gradient(180deg, rgba(8, 33, 60, 0.96), rgba(6, 23, 42, 0.98));
  box-shadow: var(--tf-shadow);
}

html[data-carrec-theme="dark"] .tf-history-swipe {
  background: var(--tf-surface);
}

html[data-carrec-theme="dark"] .tf-history-delete-modal__panel h2 {
  color: var(--tf-text);
}

html[data-carrec-theme="dark"] .tf-sales-ring {
  background: conic-gradient(var(--ring-color) var(--value), #2f3542 0);
}

html[data-carrec-theme="dark"] .tf-sales-ring::after {
  background: var(--tf-surface);
}

html[data-carrec-theme="dark"] .tf-address-company-button {
  color: var(--tf-blue);
  background: rgba(0, 168, 216, 0.12);
  border-color: var(--tf-border);
}

html[data-carrec-theme="dark"] .tf-offline-status {
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

html[data-carrec-theme="dark"] .tf-offline-status button {
  color: #050505;
  background: #f59e0b;
}

html[data-carrec-theme="dark"] .tf-settings-logout {
  color: #fecaca;
}

html[data-carrec-theme="dark"] .tf-settings-logout .tf-menu-card__icon {
  color: #fca5a5;
  background: rgba(220, 38, 38, 0.18);
}

html[data-carrec-theme="dark"] .tf-settings-logout .tf-menu-card__chevron {
  color: #fca5a5;
}

html[data-carrec-theme="dark"] .tf-input input,
html[data-carrec-theme="dark"] .tf-input select,
html[data-carrec-theme="dark"] .tf-textarea textarea,
html[data-carrec-theme="dark"] .tf-location-input input,
html[data-carrec-theme="dark"] .tf-distance-input,
html[data-carrec-theme="dark"] .ca-dispatch-form input,
html[data-carrec-theme="dark"] .ca-dispatch-form textarea,
html[data-carrec-theme="dark"] .ca-admin-form-grid input,
html[data-carrec-theme="dark"] .ca-admin-form-grid select,
html[data-carrec-theme="dark"] .ca-admin-form-grid textarea,
html[data-carrec-theme="dark"] .ca-filter-grid input,
html[data-carrec-theme="dark"] .ca-filter-grid select,
html[data-carrec-theme="dark"] .ca-sales-toolbar input,
html[data-carrec-theme="dark"] .ca-sales-toolbar select {
  color: var(--tf-text);
  border-color: rgba(24, 199, 245, 0.22);
  background: rgba(0, 16, 34, 0.92);
}

html[data-carrec-theme="dark"] .tf-input input::placeholder,
html[data-carrec-theme="dark"] .tf-textarea textarea::placeholder,
html[data-carrec-theme="dark"] .ca-admin-form-grid input::placeholder,
html[data-carrec-theme="dark"] .ca-admin-form-grid textarea::placeholder {
  color: #7f9ab4;
}

html[data-carrec-theme="dark"] .tf-field input.is-disabled-by-permission {
  color: #64748b;
  background: #111827;
  -webkit-text-fill-color: #64748b;
}

html[data-carrec-theme="dark"] .tf-notification,
html[data-carrec-theme="dark"] .tf-bottom-nav,
html[data-carrec-theme="dark"] .tf-map-modal__panel {
  color: var(--tf-text);
  border-color: var(--tf-border);
  background: rgba(6, 23, 42, 0.94);
}

html[data-carrec-theme="dark"] .tf-hero {
  background:
    linear-gradient(90deg, #000d1c 0%, rgba(0, 16, 34, 0.94) 45%, rgba(0, 168, 216, 0.22) 100%),
    url("../towflow/backgrounds/top_hero_background_truck.png") right center / auto 100% no-repeat,
    linear-gradient(135deg, #000d1c 0%, #001a35 62%, #0057c8 100%);
  box-shadow: 0 18px 38px rgba(0, 168, 216, 0.22);
}

html[data-carrec-theme="dark"] .tf-location-card {
  border-color: rgba(24, 199, 245, 0.22);
  background: linear-gradient(180deg, rgba(8, 33, 60, 0.98), rgba(6, 23, 42, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html[data-carrec-theme="dark"] .tf-location-card__status {
  color: #bfd4e8;
}

html[data-carrec-theme="dark"] .tf-location-map-frame,
html[data-carrec-theme="dark"] .tf-location-chips span,
html[data-carrec-theme="dark"] .tf-location-meta div,
html[data-carrec-theme="dark"] .tf-location-status select {
  color: var(--tf-text);
  border-color: rgba(24, 199, 245, 0.18);
  background: rgba(3, 15, 30, 0.86);
}

html[data-carrec-theme="dark"] .tf-location-map-fallback {
  color: #9fb8d1;
  background:
    linear-gradient(90deg, rgba(24, 199, 245, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(24, 199, 245, 0.12) 1px, transparent 1px),
    #06172a;
  background-size: 28px 28px;
}

html[data-carrec-theme="dark"] .tf-location-map-control {
  color: #dff7ff;
  border-color: rgba(24, 199, 245, 0.28);
  background: rgba(8, 33, 60, 0.92);
}

html[data-carrec-theme="dark"] .tf-primary-button,
html[data-carrec-theme="dark"] .tf-distance-calc-button,
html[data-carrec-theme="dark"] .tf-photo-add-button,
html[data-carrec-theme="dark"] .ca-button--primary {
  color: #001022;
  border-color: transparent;
  background: linear-gradient(180deg, #18c7f5 0%, #00a8d8 48%, #0057c8 100%);
  box-shadow: 0 14px 28px rgba(0, 168, 216, 0.28);
}

html[data-carrec-theme="dark"] .tf-primary-button:hover,
html[data-carrec-theme="dark"] .tf-distance-calc-button:hover,
html[data-carrec-theme="dark"] .tf-photo-add-button:hover,
html[data-carrec-theme="dark"] .ca-button--primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 16px 34px rgba(24, 199, 245, 0.34);
}

html[data-carrec-theme="dark"] .tf-history-delete-modal__confirm {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

html[data-carrec-theme="dark"] .tf-secondary-button,
html[data-carrec-theme="dark"] .ca-button,
html[data-carrec-theme="dark"] .ca-detail-button {
  color: var(--tf-text);
  border-color: rgba(24, 199, 245, 0.24);
  background: rgba(8, 33, 60, 0.92);
}

html[data-carrec-theme="dark"] .tf-select-card.is-selected,
html[data-carrec-theme="dark"] .tf-tabs .is-selected,
html[data-carrec-theme="dark"] .tf-color-choice.is-selected,
html[data-carrec-theme="dark"] .ca-dispatch-card.is-selected {
  color: var(--tf-blue);
  border-color: var(--tf-blue);
  background: linear-gradient(180deg, rgba(0, 168, 216, 0.16), rgba(6, 23, 42, 0.98));
  box-shadow: 0 0 0 3px rgba(24, 199, 245, 0.18);
}

html[data-carrec-theme="dark"] .tf-action-icon,
html[data-carrec-theme="dark"] .tf-menu-card__icon {
  color: #18c7f5;
  background: radial-gradient(circle at 30% 20%, rgba(24, 199, 245, 0.34), rgba(0, 168, 216, 0.12));
  border: 1px solid rgba(24, 199, 245, 0.18);
}

html[data-carrec-theme="dark"] .tf-menu-card__chevron {
  color: #18c7f5;
}

html[data-carrec-theme="dark"] .tf-signature-card {
  color: var(--tf-text);
  border-color: var(--tf-border);
  background: var(--tf-surface);
  box-shadow: var(--tf-shadow);
}

html[data-carrec-theme="dark"] .tf-signature-status {
  color: var(--tf-muted);
  background: #17191f;
}

html[data-carrec-theme="dark"] .tf-signature-status.is-signed {
  color: #ffffff;
  background: var(--tf-green);
}

html[data-carrec-theme="dark"] .tf-signature-preview {
  border-color: var(--tf-border);
  background:
    linear-gradient(#2f3542 1px, transparent 1px) left 74% / 100% 1px no-repeat,
    #ffffff;
}

html[data-carrec-theme="dark"] .ca-admin-shell,
html[data-carrec-theme="dark"] .ca-main,
html[data-carrec-theme="dark"] .ca-content {
  color: var(--ca-text);
  background:
    radial-gradient(circle at top right, rgba(0, 168, 216, 0.14), transparent 34%),
    var(--ca-bg);
}

html[data-carrec-theme="dark"] .ca-sidebar {
  background:
    radial-gradient(circle at 20% 20%, rgba(24, 199, 245, 0.22), transparent 26%),
    linear-gradient(180deg, var(--ca-sidebar-start), var(--ca-sidebar-end));
  border-right: 1px solid rgba(24, 199, 245, 0.22);
}

html[data-carrec-theme="dark"] .ca-sidebar__brand small {
  color: #18c7f5;
}

html[data-carrec-theme="dark"] .ca-sidebar__item:hover,
html[data-carrec-theme="dark"] .ca-sidebar__item.is-active {
  color: #f7fbff;
  background: linear-gradient(90deg, rgba(0, 168, 216, 0.26), rgba(0, 87, 200, 0.16));
  border-color: rgba(24, 199, 245, 0.24);
}

html[data-carrec-theme="dark"] .ca-topbar,
html[data-carrec-theme="dark"] .ca-kpi-card,
html[data-carrec-theme="dark"] .ca-panel,
html[data-carrec-theme="dark"] .ca-schedule-side-card,
html[data-carrec-theme="dark"] .ca-filter-panel,
html[data-carrec-theme="dark"] .ca-setting-card,
html[data-carrec-theme="dark"] .ca-photo-card,
html[data-carrec-theme="dark"] .ca-detail-summary,
html[data-carrec-theme="dark"] .ca-detail-panel,
html[data-carrec-theme="dark"] .ca-table-wrap,
html[data-carrec-theme="dark"] .ca-table th,
html[data-carrec-theme="dark"] .ca-table td,
html[data-carrec-theme="dark"] .ca-dispatch-card,
html[data-carrec-theme="dark"] .ca-job-card {
  color: var(--ca-text);
  border-color: rgba(24, 199, 245, 0.18);
  background: linear-gradient(180deg, rgba(8, 33, 60, 0.96), rgba(6, 23, 42, 0.98));
}

html[data-carrec-theme="dark"] .ca-topbar,
html[data-carrec-theme="dark"] .ca-kpi-card,
html[data-carrec-theme="dark"] .ca-panel,
html[data-carrec-theme="dark"] .ca-schedule-side-card,
html[data-carrec-theme="dark"] .ca-filter-panel,
html[data-carrec-theme="dark"] .ca-setting-card,
html[data-carrec-theme="dark"] .ca-photo-card,
html[data-carrec-theme="dark"] .ca-detail-summary,
html[data-carrec-theme="dark"] .ca-detail-panel,
html[data-carrec-theme="dark"] .ca-table-wrap,
html[data-carrec-theme="dark"] .ca-dispatch-card,
html[data-carrec-theme="dark"] .ca-job-card {
  box-shadow: var(--tf-shadow);
}

html[data-carrec-theme="dark"] .tf-field-action-step-note {
  background: rgba(14, 165, 233, 0.12);
  color: #bfdbfe;
}

html[data-carrec-theme="dark"] .tf-vehicle-check-summary__grid div,
html[data-carrec-theme="dark"] .tf-vehicle-capture-slot {
  color: var(--tf-text);
  border-color: rgba(24, 199, 245, 0.18);
  background: rgba(3, 15, 30, 0.86);
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-slot.is-captured {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(20, 83, 45, 0.28);
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-slot.is-pending,
html[data-carrec-theme="dark"] .tf-vehicle-capture-slot.is-uploading {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(120, 53, 15, 0.28);
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-slot.is-failed {
  border-color: rgba(248, 113, 113, 0.46);
  background: rgba(127, 29, 29, 0.26);
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-progress {
  background: rgba(148, 163, 184, 0.24);
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-sync {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(120, 53, 15, 0.24);
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-sync span {
  color: #fde68a;
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-slot__thumb {
  border-color: rgba(24, 199, 245, 0.22);
  background: rgba(0, 168, 216, 0.1);
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-slot__guide {
  filter: invert(1);
  opacity: 0.22;
}

html[data-carrec-theme="dark"] .tf-vehicle-capture-slot__thumb b,
html[data-carrec-theme="dark"] .ca-photo-card--vehicle.is-missing .ca-photo-card__thumb span {
  background: rgba(3, 15, 30, 0.82);
  color: #7dd3fc;
}

html[data-carrec-theme="dark"] .ca-photo-section__head h3 {
  color: var(--ca-text);
}

html[data-carrec-theme="dark"] .ca-completion-modal__panel {
  background: #0f172a;
  border-color: rgba(14, 165, 233, 0.22);
}

html[data-carrec-theme="dark"] .ca-completion-modal__panel h2,
html[data-carrec-theme="dark"] .ca-completion-modal__summary dd {
  color: #f8fafc;
}

html[data-carrec-theme="dark"] .ca-completion-modal__summary div {
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

html[data-carrec-theme="dark"] .ca-settings-nav,
html[data-carrec-theme="dark"] .ca-notification-settings-grid section,
html[data-carrec-theme="dark"] .tf-fleet-card,
html[data-carrec-theme="dark"] .tf-fleet-card__delete {
  color: var(--ca-text);
  border-color: rgba(24, 199, 245, 0.18);
  background: linear-gradient(180deg, rgba(8, 33, 60, 0.96), rgba(6, 23, 42, 0.98));
}

html[data-carrec-theme="dark"] .ca-table tbody tr:nth-child(odd),
html[data-carrec-theme="dark"] .ca-alert-list article,
html[data-carrec-theme="dark"] .ca-detail-cards article,
html[data-carrec-theme="dark"] .ca-schedule-day,
html[data-carrec-theme="dark"] .ca-schedule-event,
html[data-carrec-theme="dark"] .ca-schedule-mini-day,
html[data-carrec-theme="dark"] .ca-schedule-timeline,
html[data-carrec-theme="dark"] .ca-schedule-timeline__column,
html[data-carrec-theme="dark"] .ca-schedule-filter-list button,
html[data-carrec-theme="dark"] .ca-job-card__grid div,
html[data-carrec-theme="dark"] .ca-schedule-type-filter button,
html[data-carrec-theme="dark"] .ca-schedule-summary article {
  background: rgba(8, 33, 60, 0.82);
}

html[data-carrec-theme="dark"] .ca-schedule-timeline__head,
html[data-carrec-theme="dark"] .ca-schedule-timeline__corner,
html[data-carrec-theme="dark"] .ca-schedule-timeline__hour,
html[data-carrec-theme="dark"] .ca-schedule-timeline__hours {
  background: rgba(0, 16, 34, 0.96);
  border-color: rgba(24, 199, 245, 0.18);
}

html[data-carrec-theme="dark"] .ca-schedule-timeline__day-head b {
  color: var(--tf-muted);
  background: rgba(8, 33, 60, 0.82);
  border-color: var(--tf-border);
}

html[data-carrec-theme="dark"] .ca-schedule-timeline__slot {
  border-bottom-color: var(--tf-border);
}

html[data-carrec-theme="dark"] .ca-schedule-timeline__column.is-selected {
  background:
    linear-gradient(180deg, rgba(0, 168, 216, 0.10), transparent 38%),
    rgba(8, 33, 60, 0.82);
}

html[data-carrec-theme="dark"] .ca-device-toggle {
  border-color: var(--ca-border);
  background: rgba(0, 16, 34, 0.92);
}

html[data-carrec-theme="dark"] .ca-device-toggle button {
  color: var(--ca-muted);
}

html[data-carrec-theme="dark"] .ca-device-toggle button:hover,
html[data-carrec-theme="dark"] .ca-device-toggle button.is-active {
  color: #001022;
  background: linear-gradient(180deg, #18c7f5 0%, #00a8d8 48%, #0057c8 100%);
}

html[data-carrec-theme="dark"] .ca-preview-toolbar {
  border-color: var(--ca-border);
  background: rgba(6, 23, 42, 0.94);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

html[data-carrec-theme="dark"] .ca-preview-toolbar button {
  color: var(--ca-muted);
}

html[data-carrec-theme="dark"] .ca-preview-toolbar button:hover,
html[data-carrec-theme="dark"] .ca-preview-toolbar button.is-active {
  color: #001022;
  background: linear-gradient(180deg, #18c7f5 0%, #00a8d8 48%, #0057c8 100%);
}

html[data-carrec-theme="dark"] .ca-admin-map,
html[data-carrec-theme="dark"] .tf-map-canvas {
  color: #18c7f5;
  border-color: rgba(24, 199, 245, 0.24);
  background:
    linear-gradient(90deg, rgba(0, 168, 216, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(0, 168, 216, 0.09) 1px, transparent 1px),
    #06172a;
}

html[data-carrec-theme="dark"] .ca-map-card,
html[data-carrec-theme="dark"] .ca-map-stats div,
html[data-carrec-theme="dark"] .ca-worker-location-card {
  color: var(--ca-text);
  border-color: rgba(24, 199, 245, 0.2);
  background: linear-gradient(180deg, rgba(8, 33, 60, 0.96), rgba(6, 23, 42, 0.98));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

html[data-carrec-theme="dark"] .ca-map-headline [data-admin-map-status],
html[data-carrec-theme="dark"] .ca-map-stats span,
html[data-carrec-theme="dark"] .ca-worker-location-card small {
  color: #9fb8d1;
}

html[data-carrec-theme="dark"] .ca-map-mode-bar button {
  color: #bfd4e8;
  border-color: rgba(24, 199, 245, 0.22);
  background: rgba(8, 33, 60, 0.92);
}

html[data-carrec-theme="dark"] .ca-map-mode-bar button:hover,
html[data-carrec-theme="dark"] .ca-map-mode-bar button.is-active {
  color: #001022;
  border-color: transparent;
  background: linear-gradient(180deg, #18c7f5 0%, #00a8d8 48%, #0057c8 100%);
}

html[data-carrec-theme="dark"] .ca-map-trail-controls {
  color: var(--ca-text);
  border-color: rgba(24, 199, 245, 0.18);
  background: rgba(8, 33, 60, 0.82);
}

html[data-carrec-theme="dark"] .ca-map-trail-controls button,
html[data-carrec-theme="dark"] .ca-map-trail-controls select {
  color: #bfd4e8;
  border-color: rgba(24, 199, 245, 0.22);
  background: rgba(6, 23, 42, 0.96);
}

html[data-carrec-theme="dark"] .ca-map-trail-controls button:hover,
html[data-carrec-theme="dark"] .ca-map-trail-controls button.is-active {
  color: #001022;
  border-color: transparent;
  background: linear-gradient(180deg, #18c7f5 0%, #00a8d8 48%, #0057c8 100%);
}

html[data-carrec-theme="dark"] .ca-map-trail-controls label {
  color: #9fb8d1;
}

html[data-carrec-theme="dark"] .ca-map-trail-controls [data-trail-status] {
  color: #c7ddf4;
  background: rgba(0, 168, 216, 0.12);
}

html[data-carrec-theme="dark"] .ca-admin-map-shell {
  border-color: rgba(24, 199, 245, 0.18);
  background: #06172a;
}

html[data-carrec-theme="dark"] .ca-map-legend {
  color: var(--ca-text);
  border-color: rgba(24, 199, 245, 0.18);
  background: rgba(6, 23, 42, 0.88);
}

html[data-carrec-theme="dark"] .ca-map-legend span,
html[data-carrec-theme="dark"] .ca-worker-location-card em {
  color: #18c7f5;
}

html[data-carrec-theme="dark"] .tf-segmented,
html[data-carrec-theme="dark"] .tf-theme-choice-grid,
html[data-carrec-theme="dark"] .tf-setting-toggle-list {
  background: rgba(0, 16, 34, 0.92);
  border-color: rgba(24, 199, 245, 0.22);
  box-shadow: inset 0 0 0 1px rgba(0, 168, 216, 0.08);
}

html[data-carrec-theme="dark"] .tf-segmented button,
html[data-carrec-theme="dark"] .tf-theme-choice-grid button,
html[data-carrec-theme="dark"] .tf-setting-toggle-list button {
  color: #a9bdd0;
}

html[data-carrec-theme="dark"] .tf-segmented button:hover,
html[data-carrec-theme="dark"] .tf-theme-choice-grid button:hover,
html[data-carrec-theme="dark"] .tf-setting-toggle-list button:hover {
  color: #f7fbff;
  background: rgba(0, 168, 216, 0.10);
}

html[data-carrec-theme="dark"] .tf-segmented button.is-selected,
html[data-carrec-theme="dark"] .tf-theme-choice-grid button.is-selected,
html[data-carrec-theme="dark"] .tf-setting-toggle-list button.is-on {
  color: #001022;
  background: linear-gradient(180deg, #18c7f5 0%, #00a8d8 48%, #0057c8 100%);
  box-shadow:
    0 10px 24px rgba(0, 168, 216, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.22) inset;
}

.tf-calendar-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.tf-calendar-arrow,
.tf-calendar-title-button {
  min-height: 44px;
  color: var(--tf-text);
  background: transparent;
  border: 0;
}

.tf-calendar-arrow {
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.tf-calendar-arrow:active {
  background: var(--tf-blue-soft);
}

.tf-calendar-arrow svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.8;
}

.tf-calendar-title-button {
  display: grid;
  justify-items: center;
  line-height: 1.2;
}

.tf-calendar-title-button strong {
  font-size: 26px;
  font-weight: 950;
}

.tf-calendar-title-button span {
  margin-top: 3px;
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 800;
}

.tf-calendar-panel {
  margin: 0 -20px;
  background: var(--tf-bg);
  border-block: 1px solid var(--tf-border);
}

.tf-calendar-swipe-hint {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: -8px 0 12px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
}

.tf-calendar-swipe-hint span {
  color: var(--tf-blue);
  font-size: 20px;
  line-height: 1;
}

.tf-calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  color: var(--tf-muted);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  border-bottom: 1px solid var(--tf-border);
}

.tf-calendar-weekdays span {
  padding: 12px 0 11px;
}

.tf-calendar-weekdays .is-sunday {
  color: #dc2626;
}

.tf-calendar-weekdays .is-saturday {
  color: #2563eb;
}

.tf-calendar-viewport {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}

.tf-calendar-track {
  display: grid;
  grid-template-columns: 100% 100% 100%;
  transform: translateX(-100%);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: transform;
}

.tf-calendar-track.is-dragging {
  transition: none;
}

.tf-calendar-month-panel,
.tf-calendar-grid {
  display: grid;
}

.tf-calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: var(--tf-border);
  gap: 1px;
}

.tf-calendar-edge-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 34px;
  height: 46px;
  place-items: center;
  color: var(--tf-blue);
  background: rgba(255, 255, 255, 0.84);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
  transform: translateY(-50%);
}

.tf-calendar-edge-arrow--prev {
  left: 6px;
}

.tf-calendar-edge-arrow--next {
  right: 6px;
}

.tf-calendar-day {
  position: relative;
  min-height: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  color: var(--tf-text);
  background: var(--tf-bg);
  border: 0;
  text-align: left;
}

.tf-calendar-day.is-outside {
  color: #c2c8d0;
  background: #fafafa;
}

.tf-calendar-day.is-today .tf-calendar-day__number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: #111827;
  border-radius: 999px;
}

.tf-calendar-day.has-events {
  background:
    linear-gradient(180deg, rgba(11, 99, 255, 0.04), transparent 42%),
    var(--tf-bg);
}

.tf-calendar-day__number {
  position: absolute;
  z-index: 1;
  top: 6px;
  left: 8px;
  font-size: 14px;
  font-weight: 900;
}

.tf-calendar-day__events {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}

.tf-calendar-day__first-event {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  max-height: 18px;
  overflow: hidden;
  padding: 3px 6px;
  color: #1e293b;
  background: rgba(248, 250, 252, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}

.tf-calendar-day__first-event-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-calendar-event-dot {
  display: block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #475569;
}

.tf-calendar-mini {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  border-radius: 8px;
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
}

.tf-calendar-mini--work {
  background: #0b63ff;
}

.tf-calendar-mini--dispatch {
  background: #16a34a;
}

.tf-calendar-mini--report {
  background: #7c3aed;
}

.tf-calendar-mini--pending {
  background: #f59e0b;
}

.tf-calendar-mini--leave {
  background: #64748b;
}

.tf-calendar-mini--job {
  background: #0ea5e9;
}

.tf-calendar-mini--night {
  background: #111827;
}

.tf-calendar-mini--manual {
  background: #475569;
}

.tf-calendar-event-dot--work {
  background: #0b63ff;
}

.tf-calendar-event-dot--dispatch {
  background: #16a34a;
}

.tf-calendar-event-dot--report {
  background: #7c3aed;
}

.tf-calendar-event-dot--pending {
  background: #f59e0b;
}

.tf-calendar-event-dot--leave {
  background: #64748b;
}

.tf-calendar-event-dot--job {
  background: #0ea5e9;
}

.tf-calendar-event-dot--night {
  background: #111827;
}

.tf-calendar-event-dot--manual {
  background: #475569;
}

.ca-schedule-chip--attendance,
.ca-schedule-chip--work {
  background: #0b63ff;
}

.ca-schedule-chip--dispatch {
  background: #16a34a;
}

.ca-schedule-chip--job {
  background: #0ea5e9;
}

.ca-schedule-chip--report {
  background: #7c3aed;
}

.ca-schedule-chip--pending {
  background: #f59e0b;
}

.ca-schedule-chip--leave {
  background: #64748b;
}

.ca-schedule-chip--night {
  background: #111827;
}

.ca-schedule-chip--manual {
  background: #475569;
}

.tf-calendar-more {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 900;
}

.tf-calendar-summary,
.tf-calendar-events {
  margin-top: 18px;
  padding: 18px;
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: 24px;
  box-shadow: var(--tf-shadow);
}

.tf-calendar-summary header,
.tf-calendar-events header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tf-calendar-summary header span,
.tf-calendar-events header p {
  color: var(--tf-muted);
  font-size: 13px;
  font-weight: 800;
}

.tf-calendar-summary h1,
.tf-calendar-events h2 {
  margin: 4px 0 0;
  color: var(--tf-text);
  font-size: 20px;
  font-weight: 950;
}

.tf-calendar-summary header b {
  white-space: nowrap;
  color: var(--tf-blue);
  font-size: 15px;
  font-weight: 950;
}

.tf-calendar-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tf-calendar-kpis article {
  padding: 12px;
  background: var(--tf-blue-soft);
  border-radius: 16px;
}

.tf-calendar-kpis span {
  display: block;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-calendar-kpis strong {
  display: block;
  margin-top: 5px;
  color: var(--tf-text);
  font-size: 20px;
  font-weight: 950;
}

.tf-calendar-event-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--tf-border);
  border-radius: 18px;
}

.tf-calendar-event {
  display: grid;
  grid-template-columns: 44px 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px 12px;
  color: var(--tf-text);
  background: var(--tf-surface);
  border: 0;
  border-bottom: 1px solid var(--tf-border);
  text-align: left;
}

.tf-calendar-event:last-child {
  border-bottom: 0;
}

.tf-calendar-event__date {
  color: var(--tf-muted);
  font-size: 15px;
  font-weight: 900;
}

.tf-calendar-event__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  border-radius: 12px;
}

.tf-calendar-event__body {
  min-width: 0;
}

.tf-calendar-event__body b,
.tf-calendar-event__body small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-calendar-event__body b {
  font-size: 15px;
  font-weight: 950;
}

.tf-calendar-event__body small {
  margin-top: 3px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-calendar-event__meta {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 900;
}

.tf-calendar-day-modal,
.tf-calendar-event-modal {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  align-items: end;
  padding: 18px;
  background: rgba(15, 23, 42, 0.34);
}

.tf-calendar-day-modal[hidden],
.tf-calendar-event-modal[hidden] {
  display: none;
}

.tf-calendar-day-modal__panel,
.tf-calendar-event-modal__panel {
  display: grid;
  gap: 14px;
  max-height: min(88svh, 720px);
  margin: 0 auto;
  overflow: auto;
  padding: 18px;
  color: var(--tf-text);
  background: var(--tf-bg);
  border-radius: 24px 24px 18px 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.tf-calendar-day-modal__panel {
  width: min(100%, 430px);
}

.tf-calendar-event-modal__panel {
  width: min(100%, 720px);
}

@media (min-width: 768px) {
  .tf-calendar-event-modal {
    align-items: center;
  }

  .tf-calendar-event-modal__panel {
    border-radius: 12px;
  }
}

.tf-calendar-day-modal__panel header,
.tf-calendar-event-modal__panel header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.tf-calendar-day-modal__panel h2,
.tf-calendar-event-modal__panel h2 {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 950;
}

.tf-calendar-day-modal__panel small,
.tf-calendar-event-modal__panel small {
  color: var(--tf-muted);
  font-weight: 850;
}

.tf-calendar-day-modal__panel header button,
.tf-calendar-event-modal__panel header button {
  color: var(--tf-blue);
  font-weight: 900;
  background: transparent;
  border: 0;
}

.tf-calendar-day-modal__list {
  display: grid;
  gap: 10px;
  max-height: min(58svh, 480px);
  overflow: auto;
  padding-right: 2px;
}

html[data-carrec-theme="dark"] .tf-calendar-panel,
html[data-carrec-theme="dark"] .tf-calendar-day,
html[data-carrec-theme="dark"] .tf-calendar-event,
html[data-carrec-theme="dark"] .tf-calendar-day-modal__panel,
html[data-carrec-theme="dark"] .tf-calendar-event-modal__panel {
  background: var(--tf-surface);
}

html[data-carrec-theme="dark"] .tf-calendar-day__first-event {
  color: var(--tf-text);
  background: rgba(16, 17, 20, 0.92);
  border-color: var(--tf-border);
}

html[data-carrec-theme="dark"] .tf-calendar-day.is-outside {
  color: #596170;
  background: #0b0c10;
}

html[data-carrec-theme="dark"] .tf-calendar-day.is-today .tf-calendar-day__number {
  color: #050505;
  background: var(--tf-blue);
}

.tf-bottom-nav {
  position: fixed;
  z-index: 20;
  bottom: 0;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  width: min(100%, var(--tf-shell-width));
  min-height: calc(74px + env(safe-area-inset-bottom, 0px));
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 28px rgba(2, 6, 23, 0.10);
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
}

.tf-bottom-nav::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: calc(env(safe-area-inset-bottom, 0px) + 10px);
  content: "";
  background: inherit;
  pointer-events: none;
}

.tf-app[data-current-screen="pdf-preview"] .tf-bottom-nav {
  display: none;
}

.tf-bottom-nav button {
  display: grid;
  gap: 4px;
  place-items: center;
  color: #6b7280;
  background: transparent;
  border: 0;
  border-radius: 12px;
}

.tf-bottom-nav button.is-active {
  color: var(--tf-blue);
}

.tf-bottom-nav svg {
  width: 26px;
  height: 26px;
}

.tf-bottom-nav b {
  font-size: 11px;
  font-weight: 850;
}

.tf-pdf-progress {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 12px 14px;
  color: var(--tf-text);
  background: var(--tf-blue-soft);
  border: 1px solid rgba(11, 99, 255, 0.16);
  border-radius: 18px;
}

.tf-pdf-progress[hidden] {
  display: none;
}

.tf-pdf-progress__label {
  font-size: 13px;
  font-weight: 850;
}

.tf-pdf-progress__bar {
  width: 100%;
  height: 8px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
}

.tf-pdf-progress__bar::-webkit-progress-bar {
  background: #dbeafe;
  border-radius: 999px;
}

.tf-pdf-progress__bar::-webkit-progress-value {
  background: var(--tf-blue);
  border-radius: 999px;
}

.tf-pdf-progress__bar::-moz-progress-bar {
  background: var(--tf-blue);
  border-radius: 999px;
}

.tf-pdf-result {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 99980;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.38);
  backdrop-filter: blur(10px);
}

.tf-pdf-result__card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: min(100%, 380px);
  padding: 18px 16px 16px;
  color: var(--tf-text);
  background: var(--tf-card);
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.tf-pdf-result[hidden] {
  display: none;
}

.tf-pdf-result__card > strong {
  grid-column: 1 / -1;
  color: #15803d;
  font-size: 14px;
  font-weight: 900;
}

.tf-pdf-result__card > span {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--tf-muted);
  font-size: 12px;
}

.tf-pdf-result b {
  color: var(--tf-text);
  font-weight: 850;
  text-align: right;
  word-break: break-all;
}

.tf-pdf-result .tf-secondary-button {
  min-height: 38px;
  padding: 0 16px;
}

.tf-pdf-result__card > .tf-secondary-button {
  justify-self: start;
}

.tf-pdf-result__card > button.tf-secondary-button {
  justify-self: end;
}

.tf-toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 24px;
  width: min(calc(100% - 48px), 360px);
  margin: 0 auto;
  padding: 13px 16px;
  color: #ffffff;
  font-weight: 850;
  text-align: center;
  background: #111827;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.2);
}

.cr-notification-center,
.cr-notification-center * {
  box-sizing: border-box;
}

.cr-notification-center[hidden] {
  display: none;
}

.cr-notification-center {
  position: fixed;
  inset: 0;
  z-index: 99960;
  color: var(--ca-text);
  pointer-events: none;
}

.cr-notification-center__scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.16);
  cursor: pointer;
  pointer-events: auto;
}

.cr-notification-center__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(420px, calc(100vw - 28px));
  height: 100svh;
  flex-direction: column;
  overflow: hidden;
  background: var(--ca-surface);
  border-left: 1px solid var(--ca-border);
  box-shadow: -20px 0 42px rgba(15, 23, 42, 0.18);
  outline: none;
  pointer-events: auto;
}

.cr-notification-center__head {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: calc(20px + env(safe-area-inset-top)) 20px 16px;
  border-bottom: 1px solid var(--ca-border);
}

.cr-notification-center__head p,
.cr-notification-center__head h2,
.cr-notification-center__summary b,
.cr-notification-center__summary span {
  margin: 0;
}

.cr-notification-center__head p {
  color: var(--ca-primary);
  font-size: 12px;
  font-weight: 950;
}

.cr-notification-center__head h2 {
  margin-top: 3px;
  color: var(--ca-text);
  font-size: 20px;
  font-weight: 950;
  line-height: 1.25;
}

.cr-notification-center__close {
  min-width: 64px;
  min-height: 36px;
  padding: 0 12px;
  color: var(--ca-muted);
  background: #fff;
  border: 1px solid var(--ca-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.cr-notification-center__summary {
  display: grid;
  gap: 4px;
  margin: 14px 16px 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--ca-border);
  border-radius: 12px;
}

.cr-notification-center__summary b {
  color: var(--ca-text);
  font-size: 15px;
  font-weight: 950;
}

.cr-notification-center__summary span {
  color: var(--ca-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.55;
}

.cr-notification-tabs {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}

.cr-notification-tabs::-webkit-scrollbar {
  display: none;
}

.cr-notification-tabs button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 12px;
  color: var(--ca-muted);
  background: #fff;
  border: 1px solid var(--ca-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.cr-notification-tabs button.is-active {
  color: #fff;
  background: var(--ca-primary);
  border-color: var(--ca-primary);
}

.cr-notification-list {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 0 16px 16px;
  overflow-y: auto;
}

.cr-notification-empty {
  margin: 20px 0 0;
  padding: 18px;
  color: var(--ca-muted);
  text-align: center;
  background: #f8fafc;
  border: 1px dashed var(--ca-border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
}

.cr-notification-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  padding: 14px;
  color: var(--ca-text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--ca-border);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  cursor: pointer;
}

.cr-notification-item:hover {
  border-color: rgba(11, 99, 255, 0.35);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.cr-notification-item.is-read {
  opacity: 0.66;
}

.cr-notification-item__status {
  width: 10px;
  min-height: 100%;
  background: var(--ca-primary);
  border-radius: 999px;
}

.cr-notification-item--urgent .cr-notification-item__status {
  background: var(--ca-danger);
}

.cr-notification-item--warning .cr-notification-item__status {
  background: var(--ca-warning);
}

.cr-notification-item__body {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.cr-notification-item__meta,
.cr-notification-item__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cr-notification-item__meta {
  justify-content: space-between;
}

.cr-notification-item__meta b,
.cr-notification-item__foot small,
.cr-notification-item__foot i {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 999px;
  font-style: normal;
  line-height: 1;
  white-space: nowrap;
}

.cr-notification-item__meta b {
  padding: 0 8px;
  color: var(--ca-primary);
  background: #eef5ff;
  font-size: 11px;
  font-weight: 950;
}

.cr-notification-item__meta em {
  color: var(--ca-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.cr-notification-item strong {
  min-width: 0;
  color: var(--ca-text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.4;
}

.cr-notification-item__body > span:not(.cr-notification-item__meta):not(.cr-notification-item__foot) {
  color: var(--ca-muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

.cr-notification-item__foot {
  flex-wrap: wrap;
  padding-top: 2px;
}

.cr-notification-item__foot small {
  padding: 0 8px;
  color: var(--ca-muted);
  background: #f3f4f6;
  font-size: 11px;
  font-weight: 900;
}

.cr-notification-item__foot i {
  margin-left: auto;
  color: var(--ca-primary);
  font-size: 12px;
  font-weight: 950;
}

.cr-notification-center__foot {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--ca-surface);
  border-top: 1px solid var(--ca-border);
}

.cr-notification-center__foot button {
  min-height: 42px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 950;
  cursor: pointer;
}

.cr-notification-read-all {
  color: #fff;
  background: var(--ca-primary);
  border: 1px solid var(--ca-primary);
}

.cr-notification-settings {
  color: var(--ca-text);
  background: #fff;
  border: 1px solid var(--ca-border);
}

body.cr-notification-open {
  overflow: hidden;
}

.tf-notification.has-unread {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.tf-notification__dot[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .cr-notification-center__scrim {
    background: rgba(15, 23, 42, 0.34);
  }

  .cr-notification-center__panel {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: min(82svh, 720px);
    border-top: 1px solid var(--ca-border);
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.22);
  }

  .cr-notification-center__head {
    padding-top: 16px;
  }

  .cr-notification-center__head h2 {
    font-size: 18px;
  }

  .cr-notification-item {
    min-height: 92px;
    padding: 14px 12px;
  }
}

@media (max-width: 520px) {
  .tf-fleet-card {
    grid-template-columns: 1fr;
  }

  .tf-fleet-card__delete {
    width: 100%;
  }

  .tf-actions--split {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .tf-app[data-display-mode="tablet"] .cr-notification-center__panel,
  .tf-app[data-display-mode="mobile-preview"] .cr-notification-center__panel {
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    width: min(var(--tf-shell-width), calc(100vw - 48px));
    height: min(82svh, 720px);
    border-top: 1px solid var(--ca-border);
    border-left: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 42px rgba(15, 23, 42, 0.22);
    transform: translateX(-50%);
  }
}

html[data-carrec-theme="dark"] .cr-notification-center__scrim {
  background: rgba(0, 0, 0, 0.38);
}

html[data-carrec-theme="dark"] .cr-notification-center__panel,
html[data-carrec-theme="dark"] .cr-notification-center__foot {
  color: var(--ca-text);
  background: linear-gradient(180deg, rgba(8, 33, 60, 0.98), rgba(6, 23, 42, 0.98));
  border-color: var(--ca-border);
}

html[data-carrec-theme="dark"] .cr-notification-center__close,
html[data-carrec-theme="dark"] .cr-notification-tabs button,
html[data-carrec-theme="dark"] .cr-notification-item,
html[data-carrec-theme="dark"] .cr-notification-settings {
  color: var(--ca-text);
  background: rgba(8, 33, 60, 0.82);
  border-color: var(--ca-border);
}

html[data-carrec-theme="dark"] .cr-notification-center__summary,
html[data-carrec-theme="dark"] .cr-notification-empty,
html[data-carrec-theme="dark"] .cr-notification-item__foot small {
  background: rgba(0, 16, 34, 0.96);
  border-color: rgba(24, 199, 245, 0.18);
}

html[data-carrec-theme="dark"] .cr-notification-item__meta b {
  color: var(--ca-primary);
  background: rgba(0, 168, 216, 0.12);
}

html[data-carrec-theme="dark"] .ca-notification-count {
  border-color: var(--ca-surface);
}


.cr-login {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  color: var(--tf-text);
  background: #f3f4f6;
}

.cr-login__panel {
  width: min(100%, 430px);
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 22px;
  box-shadow: var(--tf-shadow);
}

.cr-login h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.cr-login p {
  margin: 0 0 18px;
  color: var(--tf-muted);
}

.cr-login-form {
  display: grid;
  gap: 14px;
}

.cr-login-error {
  margin: 0 0 14px;
  padding: 12px 14px;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.cr-login-form label {
  display: grid;
  gap: 7px;
}

.cr-login-form span {
  font-size: 13px;
  font-weight: 850;
}

.cr-login-form .cr-login-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--tf-muted);
}

.cr-login-form .cr-login-remember input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
}

.cr-login-form .cr-login-remember span {
  font-weight: 750;
}

.cr-login-form input {
  min-height: 48px;
  padding: 0 14px;
  color: var(--tf-text);
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 11px;
}

.ca-schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.ca-panel.ca-schedule-layout {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ca-schedule-main {
  min-width: 0;
}

.ca-schedule-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ca-schedule-toolbar__nav,
.ca-schedule-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ca-schedule-toolbar__actions {
  flex-wrap: wrap;
}

.ca-schedule-month {
  display: grid;
  gap: 2px;
  min-width: 190px;
  min-height: 42px;
  padding: 7px 14px;
  color: var(--tf-text);
  background: var(--tf-blue-soft);
  border: 1px solid rgba(11, 99, 255, 0.16);
  border-radius: 8px;
}

.ca-schedule-month strong {
  font-size: 20px;
  font-weight: 950;
}

.ca-schedule-month span {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 850;
}

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

.ca-schedule-summary article {
  padding: 11px;
  background: var(--tf-blue-soft);
  border: 1px solid rgba(11, 99, 255, 0.12);
  border-radius: 8px;
}

.ca-schedule-summary span,
.ca-schedule-day__date,
.ca-schedule-side-card header span {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
}

.ca-schedule-summary b {
  display: block;
  margin-top: 4px;
  color: var(--tf-text);
  font-size: 22px;
  font-weight: 950;
}

.ca-schedule-weekdays,
.ca-schedule-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ca-schedule-weekdays {
  overflow: hidden;
  color: var(--tf-muted);
  background: #f8fafc;
  border: 1px solid var(--tf-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

.ca-schedule-weekdays span {
  padding: 10px;
  font-weight: 900;
}

.ca-schedule-weekdays .is-sunday {
  color: #dc2626;
}

.ca-schedule-weekdays .is-saturday {
  color: #2563eb;
}

.ca-schedule-grid {
  overflow: hidden;
  background: var(--tf-border);
  border: 1px solid var(--tf-border);
  border-radius: 0 0 8px 8px;
  gap: 1px;
}

.ca-schedule-day {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 132px;
  padding: 8px;
  color: var(--tf-text);
  background: var(--tf-bg);
  border: 0;
  cursor: pointer;
  text-align: left;
}

.ca-schedule-day.is-outside {
  color: #aeb6c2;
  background: #f8fafc;
}

.ca-schedule-day.is-selected {
  outline: 2px solid var(--tf-blue);
  outline-offset: -2px;
}

.ca-schedule-day.is-today .ca-schedule-day__date {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #fff;
  background: #111827;
  border-radius: 999px;
}

.ca-schedule-chips {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

.ca-schedule-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 24px;
  overflow: hidden;
  padding: 4px 6px;
  color: #fff;
  border: 0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 850;
  text-align: left;
}

.ca-schedule-chip span {
  opacity: 0.88;
  white-space: nowrap;
}

.ca-schedule-chip b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-schedule-more {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 900;
}

.ca-schedule-timeline {
  overflow: hidden;
  color: var(--tf-text);
  background: var(--tf-bg);
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.ca-schedule-timeline__head {
  display: grid;
  grid-template-columns: 68px repeat(var(--ca-timeline-days), minmax(150px, 1fr));
  min-width: calc(68px + (150px * var(--ca-timeline-days)));
  background: #f8fafc;
  border-bottom: 1px solid var(--tf-border);
}

.ca-schedule-timeline__corner {
  display: grid;
  min-height: 58px;
  place-items: center;
  color: var(--tf-muted);
  border-right: 1px solid var(--tf-border);
  font-size: 12px;
  font-weight: 900;
}

.ca-schedule-timeline__day-head {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 58px;
  padding: 8px 10px;
  color: var(--tf-text);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--tf-border);
  text-align: left;
}

.ca-schedule-timeline__day-head span {
  font-size: 14px;
  font-weight: 950;
}

.ca-schedule-timeline__day-head b {
  width: fit-content;
  padding: 2px 7px;
  color: var(--tf-muted);
  background: #ffffff;
  border: 1px solid var(--tf-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.ca-schedule-timeline__day-head.is-today span,
.ca-schedule-timeline__day-head.is-selected span {
  color: var(--tf-blue);
}

.ca-schedule-timeline__day-head.is-selected {
  background: var(--tf-blue-soft);
}

.ca-schedule-timeline__scroll {
  display: grid;
  grid-template-columns: 68px minmax(calc(150px * var(--ca-timeline-days)), 1fr);
  max-height: min(72svh, 760px);
  overflow: auto;
  background: var(--tf-bg);
}

.ca-schedule-timeline__hours {
  position: sticky;
  left: 0;
  z-index: 4;
  display: grid;
  align-content: start;
  background: #f8fafc;
  border-right: 1px solid var(--tf-border);
}

.ca-schedule-timeline__hours span {
  display: block;
  height: var(--ca-hour-height);
  padding: 8px 8px 0 0;
  color: var(--tf-muted);
  border-bottom: 1px solid var(--tf-border);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.ca-schedule-timeline__columns {
  display: grid;
  grid-template-columns: repeat(var(--ca-timeline-days), minmax(150px, 1fr));
  min-width: calc(150px * var(--ca-timeline-days));
}

.ca-schedule-timeline__column {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid var(--tf-border);
}

.ca-schedule-timeline__column.is-selected {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.045), transparent 38%), #ffffff;
}

.ca-schedule-timeline__column.is-today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.22);
}

.ca-schedule-timeline__slot {
  position: relative;
  display: block;
  width: 100%;
  height: var(--ca-hour-height);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
}

.ca-schedule-timeline__slot:hover {
  background: rgba(37, 99, 235, 0.06);
}

.ca-schedule-timeline__slot::after {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--tf-blue);
  content: "+";
  font-size: 16px;
  font-weight: 950;
  opacity: 0;
  transition: opacity 140ms ease;
}

.ca-schedule-timeline__slot:hover::after,
.ca-schedule-timeline__slot:focus-visible::after {
  opacity: 1;
}

.ca-schedule-timeline__event,
.ca-schedule-timeline__allday {
  position: absolute;
  z-index: 3;
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: hidden;
  padding: 7px 8px;
  color: #334155;
  background: #e8f1ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #2563eb;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.10);
  text-align: left;
}

.ca-schedule-timeline__allday {
  right: 6px;
  left: 6px;
  min-height: 24px;
  padding: 4px 7px;
  font-size: 11px;
  font-weight: 900;
}

.ca-schedule-timeline__event strong,
.ca-schedule-timeline__event span,
.ca-schedule-timeline__event small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ca-schedule-timeline__event strong {
  font-size: 13px;
  font-weight: 950;
}

.ca-schedule-timeline__event span,
.ca-schedule-timeline__event small {
  color: #475569;
  font-size: 11px;
  font-weight: 850;
}

.ca-schedule-timeline__event--work {
  background: #e8f1ff;
  border-color: #bfdbfe;
  border-left-color: #2563eb;
}

.ca-schedule-timeline__event--dispatch {
  background: #e8f8ee;
  border-color: #bbf7d0;
  border-left-color: #16a34a;
}

.ca-schedule-timeline__event--job {
  background: #e7f7ff;
  border-color: #bae6fd;
  border-left-color: #0ea5e9;
}

.ca-schedule-timeline__event--report {
  background: #f3e8ff;
  border-color: #ddd6fe;
  border-left-color: #7c3aed;
}

.ca-schedule-timeline__event--pending {
  background: #fff7ed;
  border-color: #fed7aa;
  border-left-color: #f59e0b;
}

.ca-schedule-timeline__event--leave {
  background: #f1f5f9;
  border-color: #cbd5e1;
  border-left-color: #64748b;
}

.ca-schedule-timeline__event--night {
  background: #e2e8f0;
  border-color: #94a3b8;
  border-left-color: #111827;
}

.ca-schedule-timeline__event--manual {
  background: #f1f5f9;
  border-color: #cbd5e1;
  border-left-color: #475569;
}

.ca-schedule-side {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.ca-schedule-side-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--tf-bg);
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.ca-schedule-side-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ca-schedule-side h3 {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 950;
}

.ca-schedule-mini-card__nav {
  display: flex;
  gap: 6px;
}

.ca-schedule-mini-weekdays,
.ca-schedule-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.ca-schedule-mini-weekdays {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.ca-schedule-mini-weekdays span {
  padding: 2px 0;
}

.ca-schedule-mini-grid {
  gap: 4px;
}

.ca-schedule-mini-day {
  position: relative;
  min-height: 32px;
  color: var(--tf-text);
  background: var(--tf-surface);
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
}

.ca-schedule-mini-day.is-outside {
  color: #b8c0cc;
  background: transparent;
}

.ca-schedule-mini-day.is-today {
  color: #fff;
  background: #111827;
}

.ca-schedule-mini-day.is-selected {
  border-color: var(--tf-blue);
  box-shadow: inset 0 0 0 1px var(--tf-blue);
}

.ca-schedule-mini-day.has-events::after {
  position: absolute;
  right: 5px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  content: "";
  background: #f59e0b;
  border-radius: 999px;
}

.ca-schedule-filter-list {
  display: grid;
  gap: 8px;
}

.ca-schedule-filter-list button,
.ca-schedule-type-filter button {
  color: var(--tf-text);
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-radius: 8px;
  font-weight: 850;
}

.ca-schedule-filter-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 10px;
}

.ca-schedule-filter-list button b {
  color: var(--tf-muted);
  font-size: 11px;
}

.ca-schedule-filter-list button.is-active,
.ca-schedule-type-filter button.is-active {
  color: var(--tf-blue);
  background: var(--tf-blue-soft);
  border-color: rgba(37, 99, 235, 0.34);
}

.ca-schedule-type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ca-schedule-type-filter button {
  min-height: 34px;
  padding: 0 10px;
}

.ca-schedule-event-list {
  display: grid;
  gap: 10px;
}

.ca-schedule-event {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  color: var(--tf-text);
  background: var(--tf-surface);
  border: 1px solid var(--tf-border);
  border-left-width: 4px;
  border-radius: 8px;
  text-align: left;
}

.ca-schedule-event b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.ca-schedule-event span,
.ca-schedule-event small,
.ca-schedule-event em {
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 850;
  font-style: normal;
}

.ca-schedule-event--work {
  border-left-color: #0b63ff;
}

.ca-schedule-event--dispatch {
  border-left-color: #16a34a;
}

.ca-schedule-event--job {
  border-left-color: #0ea5e9;
}

.ca-schedule-event--report {
  border-left-color: #7c3aed;
}

.ca-schedule-event--pending {
  border-left-color: #f59e0b;
}

.ca-schedule-event--leave {
  border-left-color: #64748b;
}

.ca-schedule-event--night {
  border-left-color: #111827;
}

.ca-schedule-event--manual {
  border-left-color: #475569;
}

@media (max-width: 1180px) {
  .ca-schedule-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .ca-schedule-day {
    min-height: 116px;
  }

  .ca-schedule-chip {
    grid-template-columns: minmax(0, 1fr);
  }

  .ca-schedule-chip span {
    display: none;
  }
}

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

  .ca-schedule-side {
    position: static;
  }

  .tf-work-report-time-grid {
    grid-template-columns: 1fr;
  }
}

.cr-login .cr-primary {
  min-height: 52px;
  color: #ffffff;
  font-weight: 850;
  background: var(--tf-blue);
  border: 0;
  border-radius: 11px;
}

.cr-pdf-preview {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  background: #f3f4f6;
}

.cr-pdf-preview.tf-pdf-viewer {
  justify-items: center;
  align-items: start;
  gap: 24px;
  overflow: visible;
}

.cr-pdf-preview .tf-pdf-page {
  width: min(100%, 760px);
}

.cr-pdf-page {
  width: min(100%, 760px);
  min-height: 980px;
  padding: 28px;
  color: #111827;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.14);
}

@media (min-width: 768px) {
  :root {
    --tf-shell-width: 480px;
  }

  body.carrec-app-shell {
    background: #f3f4f6;
  }

  .tf-shell {
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
  }

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

  .tf-form-grid__wide,
  .tf-textarea {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767px) {
  .tf-shell {
    width: 100%;
    max-width: none;
    box-shadow: none;
  }

  .tf-app[data-current-screen="signature"] .tf-shell {
    padding: calc(12px + env(safe-area-inset-top)) 12px calc(18px + env(safe-area-inset-bottom));
  }

  .tf-app[data-current-screen="signature"] .tf-bottom-nav {
    display: none;
  }

  .tf-app[data-current-screen="signature"] .tf-header {
    margin-bottom: 12px;
  }

  .tf-app[data-current-screen="signature"] .tf-title {
    margin-bottom: 6px;
    font-size: 20px;
  }

  .tf-app[data-current-screen="signature"] .tf-lead {
    margin-bottom: 10px;
  }

  .tf-app[data-current-screen="signature"] .tf-signature-consent {
    padding: 12px;
  }

  .tf-app[data-current-screen="signature"] .tf-signature-pad {
    width: calc(100vw - 24px);
    min-height: min(54svh, 340px);
    margin-right: calc(50% - 50vw + 12px);
    margin-left: calc(50% - 50vw + 12px);
    border-color: #111827;
    border-radius: 14px;
  }

  .tf-app[data-current-screen="signature"] .tf-signature-pad canvas {
    height: min(54svh, 340px);
  }

  .tf-app[data-current-screen="signature"] .tf-signature-actions,
  .tf-app[data-current-screen="signature"] .tf-actions {
    gap: 8px;
    margin-top: 10px;
  }

  .tf-bottom-nav {
    right: auto;
    bottom: 0;
    left: 50%;
    width: 100%;
    border-radius: 18px 18px 0 0;
    transform: translateX(-50%);
  }
}

html.is-pwa-standalone .tf-shell {
  padding-bottom: calc(122px + env(safe-area-inset-bottom, 0px));
}

html.is-pwa-standalone .tf-bottom-nav {
  min-height: calc(80px + env(safe-area-inset-bottom, 0px));
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

@media (hover: none) and (pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  :root {
    --tf-shell-width: 430px;
  }

  html,
  body.carrec-app-shell {
    min-height: 100%;
    background: var(--tf-bg);
  }

  body.carrec-app-shell {
    overflow-x: hidden;
  }

  .tf-app,
  .tf-app[data-display-mode="admin"],
  .tf-app[data-display-mode="tablet"],
  .tf-app[data-display-mode="mobile-preview"] {
    display: block;
    width: 100%;
    min-height: 100svh;
    padding: 0;
    background: var(--tf-bg);
  }

  .ca-admin-shell,
  .ca-preview-toolbar {
    display: none !important;
  }

  .tf-mobile-shell,
  .tf-app[data-display-mode="tablet"] .tf-mobile-shell,
  .tf-app[data-display-mode="mobile-preview"] .tf-mobile-shell {
    display: block !important;
    width: min(100%, var(--tf-shell-width));
    max-width: var(--tf-shell-width);
    min-height: 100svh;
    margin: 0 auto;
    padding: calc(18px + env(safe-area-inset-top)) 20px calc(126px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .tf-bottom-nav,
  .tf-app[data-display-mode="tablet"] .tf-bottom-nav,
  .tf-app[data-display-mode="mobile-preview"] .tf-bottom-nav {
    display: grid !important;
    right: auto;
    bottom: 0;
    left: 50%;
    width: min(100%, var(--tf-shell-width));
    border-radius: 18px 18px 0 0;
    transform: translateX(-50%);
  }

  .tf-app[data-current-screen="signature"] .tf-shell {
    padding: calc(18px + env(safe-area-inset-top)) 20px calc(126px + env(safe-area-inset-bottom));
  }

  .tf-app[data-current-screen="signature"] .tf-header {
    display: flex;
    margin-bottom: 20px;
  }

  .tf-app[data-current-screen="signature"] .tf-lead {
    display: block;
    margin-bottom: 18px;
  }

  .tf-app[data-current-screen="signature"] .tf-title {
    margin-bottom: 8px;
    font-size: 24px;
  }

  .tf-app[data-current-screen="signature"] .tf-signature-consent {
    max-height: none;
    padding: 16px;
    overflow: visible;
  }

  .tf-app[data-current-screen="signature"] .tf-signature-consent h2 {
    display: block;
  }

  .tf-app[data-current-screen="signature"] .tf-signature-consent p {
    font-size: 13px;
    line-height: 1.65;
  }

  .tf-signature-fullscreen {
    inset: 0;
    width: auto;
    transform: none;
  }

  .tf-signature-fullscreen__stage canvas {
    min-height: 220px;
  }
}

@media (max-width: 380px) {
  .tf-shell {
    padding-right: 14px;
    padding-left: 14px;
  }

  .tf-address-input-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }

  .tf-address-company-button {
    grid-column: 1 / -1;
    min-height: 38px;
    border-top: 1px solid var(--tf-border);
    border-left: 0;
  }

  .tf-vehicle-grid {
    gap: 7px;
  }

  .tf-select-card {
    min-height: 88px;
  }

  .tf-option-row {
    grid-template-columns: 32px minmax(0, 1fr) auto 38px;
    gap: 7px;
  }

  .tf-kpi-grid {
    grid-template-columns: 1fr;
  }

  .tf-donut-wrap {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .tf-pdf-diagnostics__head {
    align-items: stretch;
    flex-direction: column;
  }

  .tf-pdf-diagnostics__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .tf-vehicle-grid,
  .tf-time-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tf-action-grid {
    grid-template-columns: 1fr;
  }

  .tf-stepper {
    grid-template-columns: 1fr auto auto auto;
  }

  .tf-stepper span {
    grid-column: 1 / -1;
  }
}

.tf-menu-card--dispatch {
  border-color: rgba(11, 99, 255, 0.28);
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}

.tf-dispatch-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.tf-dispatch-head span {
  color: var(--tf-blue);
  font-size: 12px;
  font-weight: 900;
}

.tf-field-status,
.ca-workflow-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--tf-blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.tf-field-status[data-workflow-status="rejected"],
.ca-workflow-badge[data-workflow-status="rejected"] {
  background: var(--tf-red);
}

.tf-field-status[data-workflow-status="completed"],
.ca-workflow-badge[data-workflow-status="completed"] {
  background: var(--tf-green);
}

.tf-dispatch-card {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--tf-border);
  border-radius: 22px;
  background: var(--tf-surface);
  box-shadow: var(--tf-shadow);
}

.tf-dispatch-card--primary {
  border-color: rgba(11, 99, 255, 0.2);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
}

.tf-dispatch-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tf-dispatch-card h2 {
  margin: 0;
  color: var(--tf-text);
  font-size: 17px;
}

.tf-dispatch-card header span,
.tf-dispatch-card header small,
.tf-dispatch-card header p {
  margin: 0;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 800;
}

.tf-job-summary,
.ca-dispatch-summary {
  display: grid;
  gap: 9px;
  margin: 0;
}

.tf-job-summary div,
.ca-dispatch-summary div {
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--tf-border);
}

.tf-job-summary div:last-child,
.ca-dispatch-summary div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.tf-job-summary dt,
.ca-dispatch-summary dt {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 900;
}

.tf-job-summary dd,
.ca-dispatch-summary dd {
  margin: 0;
  color: var(--tf-text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.tf-field-timeline,
.ca-workflow-timeline {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tf-field-timeline li,
.ca-workflow-timeline li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--tf-muted);
  font-size: 12px;
  font-weight: 900;
}

.tf-field-timeline i,
.ca-workflow-timeline i {
  width: 13px;
  height: 13px;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
}

.tf-field-timeline li.is-done,
.ca-workflow-timeline li.is-done {
  color: var(--tf-blue);
}

.tf-field-timeline li.is-done i,
.ca-workflow-timeline li.is-done i {
  border-color: var(--tf-blue);
  background: var(--tf-blue);
  box-shadow: 0 0 0 4px rgba(11, 99, 255, 0.12);
}

.tf-field-timeline li.is-muted,
.ca-workflow-timeline li.is-muted {
  color: var(--tf-muted);
}

.tf-field-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tf-field-action-step-note {
  margin: -2px 0 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: #eff6ff;
  color: #0f3f8f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.6;
}

.tf-field-action-grid button:disabled,
.ca-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.ca-completion-modal {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: grid;
  place-items: center;
  padding: calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(12px);
}

.ca-completion-modal-open {
  overflow: hidden;
}

.ca-completion-modal__panel {
  width: min(100%, 430px);
  padding: 22px;
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 26px 80px rgba(15, 23, 42, 0.24);
}

.ca-completion-modal__icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  color: #ffffff;
  font-size: 34px;
  font-weight: 950;
  box-shadow: 0 14px 36px rgba(14, 165, 233, 0.24);
}

.ca-completion-modal__eyebrow {
  margin: 0 0 4px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
  text-align: center;
}

.ca-completion-modal__panel h2 {
  margin: 0;
  color: var(--ca-text);
  font-size: 20px;
  line-height: 1.35;
  text-align: center;
}

.ca-completion-modal__summary {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
}

.ca-completion-modal__summary div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
}

.ca-completion-modal__summary dt {
  color: var(--ca-muted);
  font-size: 12px;
  font-weight: 900;
}

.ca-completion-modal__summary dd {
  margin: 0;
  color: var(--ca-text);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.ca-completion-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.tf-photo-add-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--tf-blue);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.tf-photo-add-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.tf-field-photo-grid {
  display: grid;
  min-height: 96px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tf-field-photo-grid > span {
  display: grid;
  grid-column: 1 / -1;
  min-height: 92px;
  place-items: center;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  color: var(--tf-muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 850;
}

.tf-field-photo {
  display: grid;
  gap: 5px;
  margin: 0;
}

.tf-field-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
}

.tf-field-photo figcaption {
  overflow: hidden;
  color: var(--tf-muted);
  font-size: 10px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-vehicle-check-summary__button {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

.tf-vehicle-check-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tf-vehicle-check-summary__grid div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--tf-border);
  border-radius: 14px;
  background: #f8fafc;
}

.tf-vehicle-check-summary__grid span {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 900;
}

.tf-vehicle-check-summary__grid strong {
  color: var(--tf-text);
  font-size: 17px;
  font-weight: 950;
}

.tf-vehicle-capture-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.tf-vehicle-capture-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #22c55e);
  transition: width 180ms ease;
}

.tf-vehicle-capture-sync {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 14px;
  background: #fffbeb;
}

.tf-vehicle-capture-sync[hidden] {
  display: none;
}

.tf-vehicle-capture-sync span {
  color: #92400e;
  font-size: 12px;
  font-weight: 900;
}

.tf-vehicle-capture-sync .tf-secondary-button {
  width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.tf-vehicle-capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tf-vehicle-capture-slot {
  display: grid;
  gap: 8px;
  min-height: 170px;
  padding: 10px;
  border: 1px solid var(--tf-border);
  border-radius: 18px;
  background: #ffffff;
  color: var(--tf-text);
  text-align: left;
  cursor: pointer;
}

.tf-vehicle-capture-slot.is-captured {
  border-color: rgba(34, 197, 94, 0.42);
  background: #f0fdf4;
}

.tf-vehicle-capture-slot.is-pending,
.tf-vehicle-capture-slot.is-uploading {
  border-color: rgba(245, 158, 11, 0.42);
  background: #fffbeb;
}

.tf-vehicle-capture-slot.is-failed {
  border-color: rgba(239, 68, 68, 0.5);
  background: #fef2f2;
}

.tf-vehicle-capture-slot__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--tf-text);
  font-size: 13px;
  font-weight: 950;
}

.tf-vehicle-capture-slot__label small {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--tf-blue);
  font-size: 10px;
  font-weight: 950;
}

.tf-vehicle-capture-slot__thumb {
  position: relative;
  display: grid;
  min-height: 104px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.tf-vehicle-capture-slot__guide {
  position: absolute;
  inset: 10px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.28;
  pointer-events: none;
}

.tf-vehicle-capture-slot__thumb img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: cover;
}

.tf-vehicle-capture-slot__thumb em {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.tf-vehicle-capture-slot__thumb b {
  position: relative;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--tf-blue);
  font-size: 13px;
  font-weight: 950;
}

.tf-vehicle-capture-slot strong {
  color: var(--tf-muted);
  font-size: 11px;
  font-weight: 900;
}

.tf-vehicle-capture-slot.is-captured strong {
  color: #16a34a;
}

.tf-vehicle-capture-slot.is-pending strong,
.tf-vehicle-capture-slot.is-uploading strong {
  color: #d97706;
}

.tf-vehicle-capture-slot.is-failed strong {
  color: #dc2626;
}

.tf-vehicle-signature-panel .tf-signature-status {
  align-self: start;
}

.ca-photo-section {
  display: grid;
  grid-column: 1 / -1;
  gap: 12px;
}

.ca-photo-section + .ca-photo-section {
  margin-top: 8px;
}

.ca-photo-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ca-photo-section__head h3 {
  margin: 0;
  color: var(--ca-text);
  font-size: 16px;
}

.ca-photo-section__head span {
  color: var(--ca-muted);
  font-size: 12px;
  font-weight: 900;
}

.ca-photo-section__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ca-photo-card--vehicle .ca-photo-card__thumb {
  position: relative;
  overflow: hidden;
  background: #eff6ff;
}

.ca-photo-card--vehicle.is-missing .ca-photo-card__thumb span {
  position: relative;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ca-primary);
  font-size: 12px;
  font-weight: 950;
}

@media (min-width: 768px) {
  .ca-dispatch-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
    gap: 16px;
    align-items: start;
  }

  .ca-dispatch-command {
    grid-column: 1 / -1;
  }

  .ca-dispatch-summary div {
    border-color: var(--ca-border);
  }

  .ca-dispatch-cards {
    display: grid;
    gap: 10px;
  }

  .ca-dispatch-card {
    display: grid;
    gap: 5px;
    width: 100%;
    min-height: 82px;
    padding: 12px;
    border: 1px solid var(--ca-border);
    border-radius: 11px;
    color: var(--ca-text);
    background: #fff;
    text-align: left;
    cursor: pointer;
  }

  .ca-dispatch-card.is-selected {
    border-color: var(--ca-primary);
    background: #eef5ff;
    box-shadow: 0 0 0 3px rgba(11, 99, 255, 0.11);
  }

  .ca-dispatch-card b {
    font-size: 14px;
  }

  .ca-dispatch-card span,
  .ca-dispatch-card small {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 750;
  }

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

  .ca-dispatch-form label {
    display: grid;
    gap: 6px;
  }

  .ca-dispatch-form__wide {
    grid-column: 1 / -1;
  }

  .ca-dispatch-form span {
    color: var(--ca-muted);
    font-size: 12px;
    font-weight: 850;
  }

  .ca-dispatch-form input,
  .ca-dispatch-form textarea {
    width: 100%;
    border: 1px solid var(--ca-border);
    border-radius: 9px;
    padding: 10px 12px;
    background: #fff;
    font: inherit;
  }

  .ca-workflow-timeline {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .ca-dispatch-layout {
    grid-template-columns: 1fr;
  }

  .ca-dispatch-command {
    grid-column: auto;
  }

  .ca-workflow-timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .tf-field-action-grid {
    grid-template-columns: 1fr;
  }
}

.tf-pdf-file-open,
.tf-pdf-result-open {
  overflow: hidden;
}

.tf-pdf-file-modal[hidden] {
  display: none !important;
}

.tf-pdf-file-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  color: #050505;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.tf-pdf-file-modal__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 10px 14px;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.tf-pdf-file-modal__bar strong {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tf-pdf-file-modal__bar .tf-secondary-button {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.tf-pdf-file-modal__frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #fff;
}

.tf-help-button,
.ca-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 1px solid rgba(37, 99, 235, 0.22);
  border-radius: 999px;
  background: #fff;
  color: #2563eb;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
  cursor: pointer;
}

.tf-help-button {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 18px;
}

.ca-help-button {
  padding: 0 14px;
}

.tf-help-button:hover,
.ca-help-button:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: #eff6ff;
}

.tf-help-button--floating {
  position: fixed;
  right: 18px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 1200;
}

html[data-carrec-display-mode="admin"] .tf-help-button--floating {
  display: none;
}

.cr-tutorial[hidden] {
  display: none !important;
}

.cr-tutorial {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: auto;
}

.cr-tutorial__spotlight {
  position: fixed;
  z-index: 100000;
  border-radius: 16px;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, 0.28),
    0 0 0 9999px rgba(15, 23, 42, 0.56);
  transition:
    top 0.2s ease,
    left 0.2s ease,
    width 0.2s ease,
    height 0.2s ease;
  pointer-events: none;
}

.cr-tutorial__popover {
  position: fixed;
  z-index: 100001;
  max-width: min(340px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  pointer-events: auto;
  outline: none;
}

.cr-tutorial__count {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

.cr-tutorial__popover h2 {
  margin: 0 0 6px;
  color: inherit;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.cr-tutorial__popover p[data-tutorial-body] {
  margin: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.65;
}

.cr-tutorial__dots {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.cr-tutorial__dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #cbd5e1;
}

.cr-tutorial__dots i.is-active {
  width: 22px;
  background: #2563eb;
}

.cr-tutorial__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.cr-tutorial__actions div {
  display: flex;
  gap: 8px;
}

.cr-tutorial__actions button {
  min-width: 72px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.cr-tutorial__actions button[data-tutorial-next] {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
}

.cr-tutorial__actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

html[data-carrec-theme="dark"] .tf-help-button,
html[data-carrec-theme="dark"] .ca-help-button {
  border-color: rgba(56, 189, 248, 0.3);
  background: #0f172a;
  color: #38bdf8;
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.35);
}

html[data-carrec-theme="dark"] .tf-help-button:hover,
html[data-carrec-theme="dark"] .ca-help-button:hover {
  background: #082f49;
}

html[data-carrec-theme="dark"] .cr-tutorial__popover {
  border-color: rgba(56, 189, 248, 0.18);
  background: #0f172a;
  color: #f8fafc;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.55);
}

html[data-carrec-theme="dark"] .cr-tutorial__count {
  color: #38bdf8;
}

html[data-carrec-theme="dark"] .cr-tutorial__popover p[data-tutorial-body] {
  color: #cbd5e1;
}

html[data-carrec-theme="dark"] .cr-tutorial__actions button {
  border-color: rgba(148, 163, 184, 0.28);
  background: #111827;
  color: #e2e8f0;
}

html[data-carrec-theme="dark"] .cr-tutorial__actions button[data-tutorial-next] {
  border-color: #0ea5e9;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  .cr-tutorial__spotlight {
    transition: none;
  }
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  html,
  body {
    width: 210mm;
    min-height: 297mm;
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .tf-screen--pdf,
  .tf-screen--pdf *,
  .tf-pdf-viewer,
  .tf-pdf-viewer * {
    visibility: visible !important;
  }

  .tf-mobile-shell,
  .tf-shell {
    width: 210mm !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .tf-pdf-nav,
  .tf-pdf-actions,
  .tf-bottom-nav,
  .tf-toast,
  .tf-map-modal,
  .cr-notification-center,
  .tf-history-detail,
  .tf-pdf-result,
  .tf-pdf-file-modal,
  .carrec-admin-shell {
    display: none !important;
  }

  .tf-screen,
  .tf-screen--pdf {
    display: block !important;
    position: static !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tf-screen:not(.tf-screen--pdf) {
    display: none !important;
  }

  .tf-pdf-viewer {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  .carrec-pdf-page,
  .tf-pdf-page {
    width: 210mm !important;
    min-height: 297mm !important;
    height: 297mm !important;
    margin: 0 !important;
    padding: 8mm !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    page-break-after: always;
    break-after: page;
  }
}
