:root {
  --ink: #123034;
  --muted: #64777a;
  --line: #d6e6e1;
  --soft: #f2f8f5;
  --panel: #ffffff;
  --brand: #0a8d87;
  --brand-dark: #0a4f52;
  --brand-soft: #e5f6f1;
  --accent: #c99734;
  --accent-soft: #fff4d8;
  --danger: #c6483c;
  --ok: #26865a;
  --shadow: 0 18px 50px rgba(18, 48, 52, 0.1);
}

@font-face {
  font-family: "Regatto";
  src: url("assets/brand/Regatto.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(10, 141, 135, 0.08), transparent 32rem),
    #f6f8f7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.svg-sprite {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 22px 16px;
  color: #f6fbfa;
  background:
    linear-gradient(180deg, rgba(10, 141, 135, 0.22), rgba(10, 79, 82, 0)),
    #102b2f;
}

.brand {
  display: grid;
  gap: 10px;
  padding: 4px 8px 22px;
}

.brand-logo-wide {
  width: 170px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand span {
  color: #d8ebe7;
  font-size: 12px;
  font-weight: 650;
}

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: #d9ebe7;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #ffffff;
  background: rgba(10, 141, 135, 0.32);
  border-color: rgba(201, 151, 52, 0.72);
  box-shadow: inset 3px 0 0 var(--accent);
}

.icon,
.icon svg,
.icon-button svg {
  display: inline-block;
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-footer {
  margin-top: auto;
  padding: 16px 8px 0;
  color: #a9c8c8;
  font-size: 12px;
}

.sidebar-footer strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
}

.main {
  min-width: 0;
  padding: 26px 28px 34px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar h1,
.hero-panel h2,
.panel h2,
.panel h3 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 820;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-logo {
  display: block;
  width: min(190px, 52vw);
  height: auto;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  object-fit: contain;
}

.hero-brand-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-brand-line span {
  color: #d8fff4;
  font-size: 13px;
  font-weight: 780;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(34vw, 360px);
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(18, 48, 52, 0.05);
}

.search input {
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  outline: 0;
}

select,
input,
textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

textarea {
  resize: vertical;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.experience-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(214, 230, 225, 0.9);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 48, 52, 0.06);
}

.experience-strip article {
  min-width: 0;
}

.experience-strip span {
  display: block;
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.experience-strip strong {
  display: block;
  margin-top: 2px;
  font-size: 18px;
}

.experience-strip p {
  margin: 4px 0 0;
  color: var(--muted);
}

.api-status {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 5px 9px;
  color: #7a5817;
  background: var(--accent-soft);
  border: 1px solid rgba(201, 151, 52, 0.32);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.api-status.connected {
  color: #0b5d47;
  background: #ddf5e8;
  border-color: rgba(38, 134, 90, 0.28);
}

.experience-actions,
.hero-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.experience-pill {
  min-height: 36px;
  padding: 0 13px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #c8e7dd;
  border-radius: 999px;
  font-weight: 850;
}

.experience-pill.active {
  color: #ffffff;
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.85fr);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 24px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(125deg, rgba(10, 55, 58, 0.98), rgba(10, 141, 135, 0.9)),
    #183f43;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  max-width: 620px;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1;
}

.hero-copy {
  max-width: 560px;
  margin: 16px 0 0;
  color: #d9f7f0;
  font-size: 16px;
  line-height: 1.55;
}

.hero-quick-actions {
  margin-top: 22px;
}

.hero-panel .eyebrow {
  color: #d5fff4;
}

.hero-visual {
  min-height: 260px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.03)),
    url("assets/martinique-operations.svg") center / cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.route-map {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 240px;
}

.route-map span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding: 5px 7px;
  color: #123;
  background: #effbf7;
  border: 1px solid rgba(201, 151, 52, 0.56);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
  transform: translate(-50%, -50%);
}

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

.metric,
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(214, 230, 225, 0.9);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(18, 48, 52, 0.07);
}

.metric {
  position: relative;
  overflow: hidden;
  padding: 18px 18px 16px;
}

.metric.compact {
  min-height: 112px;
  padding: 15px 16px;
}

.metric.compact strong {
  font-size: clamp(26px, 3vw, 36px);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

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

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
  letter-spacing: 0;
}

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

.two-col {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.form-grid {
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
}

.fleet-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.fleet-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px) minmax(180px, 240px) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(214, 230, 225, 0.9);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 48, 52, 0.06);
}

.reporting-panel {
  margin-bottom: 16px;
}

.reporting-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.reporting-filters label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.reporting-metrics {
  margin-top: 0;
}

.planning-control,
.planning-metrics,
.shift-builder {
  margin-bottom: 16px;
}

.planning-filters,
.shift-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.shift-form {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
}

.post-form,
.site-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

.site-form {
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) auto;
}

.post-form label,
.site-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.post-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.post-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--brand-dark);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.post-chip span {
  width: 13px;
  height: 13px;
  background: var(--post-color);
  border-radius: 999px;
}

.shift-draft-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.shift-draft-card {
  border-left: 4px solid var(--accent);
}

.planning-filters label,
.shift-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.shift-form select[multiple] {
  min-height: 128px;
  padding: 8px;
}

.planning-year-calendar {
  margin-top: 14px;
}

.calendar-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(36px, 1fr));
  gap: 6px;
}

.calendar-strip > span,
.month-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day,
.month-cell {
  display: grid;
  gap: 4px;
  min-height: 48px;
  padding: 8px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.calendar-day {
  min-height: 44px;
  place-items: start;
}

.calendar-day strong {
  display: inline-grid;
  min-width: 22px;
  min-height: 22px;
  place-items: center;
  color: #ffffff;
  background: var(--brand);
  border-radius: 999px;
  font-size: 11px;
}

.calendar-day.empty,
.month-cell.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}

.calendar-day.in-week,
.month-cell.selected {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.calendar-day.selected {
  color: #ffffff;
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.calendar-day.selected strong {
  color: var(--brand-dark);
  background: #ffffff;
}

.month-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.month-cell strong {
  font-size: 15px;
}

.month-cell small {
  color: var(--muted);
  font-weight: 750;
}

.hr-metrics {
  margin-bottom: 18px;
}

.hr-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1fr) minmax(320px, 1fr);
}

.hr-card {
  border-left: 4px solid var(--brand);
}

.fleet-search {
  min-width: 0;
  box-shadow: none;
}

.fleet-grid {
  grid-template-columns: minmax(300px, 0.72fr) minmax(360px, 1fr) minmax(300px, 0.78fr);
  align-items: start;
}

.fleet-directory,
.fleet-detail-panel {
  min-height: 560px;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #c8e7dd;
  border-radius: 8px;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.icon-button:hover,
.primary:hover,
.secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(18, 48, 52, 0.1);
}

.primary,
.secondary,
.segmented button {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 760;
}

.primary {
  color: #ffffff;
  background: linear-gradient(180deg, #0a9992, var(--brand-dark));
  border: 1px solid var(--brand-dark);
}

.secondary,
.segmented button {
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #d0e9e0;
}

.small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: #eef3f2;
  border-radius: 8px;
}

.segmented button {
  min-height: 34px;
  border: 0;
  background: transparent;
}

.segmented button.active {
  color: #ffffff;
  background: var(--brand);
}

.table-wrap {
  overflow-x: auto;
}

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

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.ok {
  color: #17623f;
  background: #def5e9;
}

.pill.warn {
  color: #8b6514;
  background: var(--accent-soft);
}

.pill.danger {
  color: #8a2922;
  background: #ffe0dc;
}

.alert-list,
.card-list,
.timeline,
.quality-bars {
  display: grid;
  gap: 10px;
}

.fleet-directory .card-list {
  max-height: 640px;
  overflow: auto;
  padding-right: 4px;
}

.alert,
.mini-card,
.timeline-item,
.client-card,
.planning-card,
.summary-card {
  padding: 13px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.alert {
  border-left: 4px solid var(--danger);
}

.fleet-card {
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.fleet-card:hover,
.fleet-card.selected {
  border-color: rgba(10, 141, 135, 0.52);
  box-shadow: 0 10px 24px rgba(18, 48, 52, 0.09);
  transform: translateY(-1px);
}

.fleet-card.selected {
  background: #eef9f5;
}

.fleet-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.fleet-card-head h4 {
  margin: 0;
}

.list-divider {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.fleet-detail {
  display: grid;
  gap: 14px;
}

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

.media-tile {
  display: grid;
  gap: 8px;
}

.media-tile img,
.media-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.media-tile img {
  display: block;
  object-fit: cover;
  background: var(--soft);
}

.media-placeholder {
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(10, 141, 135, 0.07), rgba(201, 151, 52, 0.08)),
    var(--soft);
  font-size: 13px;
  font-weight: 760;
  text-align: center;
}

.media-tile strong {
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.plate-display {
  display: grid;
  min-height: 78px;
  place-items: center;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(10, 48, 52, 0.98), rgba(10, 141, 135, 0.9)),
    var(--brand-dark);
  border-radius: 8px;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 900;
  letter-spacing: 0;
}

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

.detail-grid span,
.history-list article,
.empty-state {
  display: grid;
  gap: 5px;
  padding: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-grid strong,
.history-list strong,
.empty-state strong {
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
}

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

.history-list span,
.empty-state span {
  color: var(--muted);
}

.ocr-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  color: #7a5817;
  background: var(--accent-soft);
  border: 1px solid rgba(201, 151, 52, 0.34);
  border-radius: 8px;
}

.ocr-box.validated {
  color: #0b5d47;
  background: #ddf5e8;
  border-color: rgba(38, 134, 90, 0.28);
}

.ocr-box div {
  display: grid;
  gap: 3px;
}

.ocr-box strong {
  font-size: 12px;
  text-transform: uppercase;
}

.ocr-box span {
  color: inherit;
  font-size: 13px;
}

.mini-card h4,
.alert h4,
.client-card h4,
.planning-card h4 {
  margin: 0 0 5px;
}

.mini-card p,
.alert p,
.timeline-item p,
.client-card p,
.planning-card p,
.summary-card p {
  margin: 0;
  color: var(--muted);
}

.punch-panel {
  display: grid;
  align-content: start;
  gap: 12px;
}

.punch-panel h2 {
  font-size: clamp(48px, 8vw, 84px);
  line-height: 1;
}

.punch-actions,
.form-row,
.site-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.site-picker label {
  display: grid;
  gap: 7px;
  color: #cde8e8;
  font-size: 13px;
  font-weight: 750;
}

.presence-record {
  gap: 4px;
}

.presence-record span,
.presence-record small {
  display: block;
  color: var(--muted);
}

.presence-record span {
  font-weight: 760;
}

.presence-record small {
  font-size: 12px;
}

.validation-strip,
.validation-flow,
.export-grid,
.selected-list,
.intervention-evidence {
  display: grid;
  gap: 10px;
}

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

.selected-chip,
.empty-chip {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #d0e9e0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 820;
  text-align: left;
}

.selected-chip::after {
  content: " retirer";
  color: var(--muted);
  font-weight: 700;
}

.intervention-card {
  display: grid;
  gap: 8px;
}

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

.intervention-evidence span {
  padding: 8px;
  color: var(--brand-dark);
  background: rgba(229, 246, 241, 0.74);
  border: 1px solid #d0e9e0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 780;
}

.danger-text {
  color: var(--danger) !important;
  font-weight: 780;
}

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

.validation-strip span,
.validation-flow button {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 8px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border: 1px solid #d0e9e0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

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

.validation-flow button.done {
  color: #0b5d47;
  background: #ddf5e8;
  border-color: rgba(38, 134, 90, 0.28);
}

.validation-flow button.done::before {
  content: "Validé · ";
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.export-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.export-button {
  min-height: 54px;
  white-space: normal;
}

.status-text {
  margin: 0;
  padding: 12px;
  color: var(--brand-dark);
  background: var(--brand-soft);
  border-radius: 8px;
}

.status-text.compact {
  margin-top: 12px;
  padding: 9px 10px;
  font-size: 13px;
  font-weight: 750;
}

.stacked-form {
  display: grid;
  gap: 13px;
}

.stacked-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.planning-board {
  overflow-x: auto;
}

.planning-real-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 1120px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--brand-soft);
  border: 1px solid #d0e9e0;
  border-radius: 8px;
}

.planning-real-head div {
  display: grid;
  gap: 3px;
}

.planning-real-head span,
.planning-real-head small {
  color: var(--muted);
}

.planning-real-grid {
  display: grid;
  grid-template-columns: 185px repeat(7, minmax(170px, 1fr)) 92px;
  gap: 0;
  min-width: 1468px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.planning-day-list,
.planning-month-grid {
  display: grid;
  gap: 10px;
}

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

.planning-month-grid {
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  min-width: 980px;
}

.planning-employee-cell,
.planning-day-cell,
.planning-total-cell {
  min-height: 76px;
  padding: 8px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 0;
}

.planning-employee-cell.heading,
.planning-day-cell.heading,
.planning-total-cell.heading {
  min-height: auto;
  color: var(--brand-dark);
  background: #eaf6f2;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.planning-employee-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  align-content: start;
  gap: 6px;
  background: #ffffff;
}

.employee-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.employee-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  color: #3162dd;
  background: #e7efff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.employee-line div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.employee-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.employee-line small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.employee-drag-row {
  cursor: grab;
}

.employee-drag-row:active {
  cursor: grabbing;
}

.employee-drag-row:hover {
  box-shadow: inset 3px 0 0 var(--brand);
}

.drag-hint {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.planning-employee-cell.heading {
  z-index: 3;
}

.planning-total-cell {
  display: grid;
  place-items: center;
  background: #ffffff;
}

.planning-day-cell {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.shift-drop-zone {
  transition: background 150ms ease, box-shadow 150ms ease;
}

.shift-drop-zone:hover {
  background: #eef8f5;
  box-shadow: inset 0 0 0 1px rgba(10, 153, 146, 0.22);
}

.shift-drop-zone.selected-shift-cell {
  background: #e5f6f1;
  box-shadow: inset 0 0 0 2px var(--brand);
}

.planning-day-cell.heading {
  position: sticky;
  top: 0;
  z-index: 1;
  place-items: center;
  text-align: center;
  min-height: 42px;
}

.planning-day-cell.heading span {
  display: block;
}

.planning-day {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 360px;
  padding: 12px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.planning-day h4 {
  margin: 0;
}

.planning-card {
  display: grid;
  gap: 4px;
  padding: 8px 9px;
  color: #18333b;
  background: #d9f6e6;
  border-left: 4px solid #35a968;
  border-radius: 6px;
  box-shadow: inset 0 0 0 1px rgba(18, 48, 52, 0.04);
  cursor: grab;
}

.planning-card[style*="--post-color"] {
  background: color-mix(in srgb, var(--post-color) 24%, #ffffff);
  border-left-color: var(--post-color);
}

.planning-card:active {
  cursor: grabbing;
}

.planning-context-menu {
  position: fixed;
  z-index: 2000;
  display: none;
  min-width: 190px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(18, 48, 52, 0.18);
}

.planning-context-menu.open {
  display: grid;
  gap: 4px;
}

.planning-context-menu button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--brand-dark);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 820;
  text-align: left;
}

.planning-context-menu button:hover {
  background: var(--brand-soft);
}

.planning-context-menu button:disabled {
  color: var(--muted);
  background: #f5f7f7;
}

.modal-open {
  overflow: hidden;
}

.shift-modal {
  position: fixed;
  inset: 0;
  z-index: 1800;
  display: none;
  place-items: center;
  padding: 24px;
}

.shift-modal.open {
  display: grid;
}

.shift-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 32, 0.42);
  backdrop-filter: blur(2px);
}

.shift-modal-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  width: min(720px, 96vw);
  max-height: min(820px, 92vh);
  overflow-y: auto;
  padding: 26px 30px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(18, 48, 52, 0.22);
}

.shift-modal-head,
.shift-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.shift-modal-head h3,
.shift-modal-head p {
  margin: 0;
}

.shift-modal-head p {
  color: var(--muted);
  font-weight: 750;
}

.shift-modal-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.shift-modal-tabs button {
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 850;
}

.shift-modal-tabs button.active {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.modal-conflict {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  color: var(--brand-dark);
  background: #f8fbfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.modal-conflict span {
  color: var(--muted);
}

.shift-modal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shift-modal-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.shift-modal-card textarea {
  min-height: 72px;
  resize: vertical;
}

.shift-modal-actions {
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.planning-card.office {
  background: #dcd9ff;
  border-left-color: #6d66e8;
}

.planning-card.workshop {
  background: #f4a7a7;
  border-left-color: #e25555;
}

.planning-card.maintenance {
  background: #c7f4dc;
  border-left-color: #25a464;
}

.planning-card.field-shift {
  background: #9fd4ff;
  border-left-color: #3d83f6;
}

.planning-empty {
  color: var(--muted);
  font-size: 12px;
}

.planning-card.warning {
  border-left-color: var(--accent);
  background: #fffaf0;
}

.planning-card.absence {
  border-left-color: #767676;
  background: #b9b9b9;
  color: #303030;
}

.planning-card.empty {
  border-left-color: #cbd8d5;
  background: #f8fbfa;
}

.planning-time {
  width: fit-content;
  padding: 0;
  color: inherit;
  background: transparent;
  border-radius: 0;
  font-size: 12px;
  font-weight: 900;
}

.planning-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.planning-card-footer span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.planning-day-total,
.planning-bottom-label {
  position: sticky;
  bottom: 0;
  z-index: 2;
  min-height: 42px;
  background: #ffffff;
  box-shadow: 0 -6px 16px rgba(18, 48, 52, 0.08);
}

.planning-bottom-label {
  left: 0;
}

.quality-bar {
  display: grid;
  gap: 7px;
}

.quality-bar header {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  background: #e5eceb;
  border-radius: 999px;
}

.bar-track span {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

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

.client-space-layout {
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: start;
  margin-top: 16px;
}

.client-search-row {
  margin-top: 0;
}

.client-card {
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.client-card.selected,
.client-card:hover {
  border-color: rgba(10, 141, 135, 0.45);
  box-shadow: 0 18px 36px rgba(16, 43, 47, 0.12);
  transform: translateY(-2px);
}

.client-card strong {
  display: block;
  margin-top: 10px;
}

.client-space-detail {
  position: sticky;
  top: 18px;
}

.client-detail-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(16, 43, 47, 0.1);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.client-detail-card h3,
.client-detail-card h4 {
  margin: 0;
}

.client-detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.client-detail-metrics span,
.client-mini-list span {
  display: block;
  padding: 10px;
  color: var(--muted);
  background: #f5f9f8;
  border-radius: 8px;
}

.client-detail-metrics strong,
.client-mini-list strong {
  color: var(--ink);
}

.client-mini-list {
  display: grid;
  gap: 8px;
}

.client-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.booking-summary {
  align-content: start;
}

.summary-card {
  display: grid;
  gap: 10px;
}

.confirmation-box {
  display: grid;
  gap: 4px;
  padding: 12px;
  color: #0b5d47;
  background: #ddf5e8;
  border: 1px solid rgba(38, 134, 90, 0.28);
  border-radius: 8px;
}

.confirmation-box span {
  color: #27624d;
  font-size: 13px;
}

body[data-experience="field"] {
  --brand: #0aa6b8;
  --brand-dark: #183284;
  --brand-soft: #e7f8fb;
  --accent: #ffcf24;
  background:
    radial-gradient(circle at 12% 0, rgba(112, 191, 52, 0.18), transparent 24rem),
    linear-gradient(180deg, #f7fbfa, #eef7fb);
}

body[data-experience="field"] .sidebar {
  background:
    linear-gradient(180deg, rgba(10, 166, 184, 0.32), rgba(46, 49, 146, 0.08)),
    #17263d;
}

body[data-experience="field"] .hero-panel {
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.7fr);
  background:
    linear-gradient(135deg, rgba(10, 166, 184, 0.94), rgba(46, 49, 146, 0.92)),
    #183284;
}

body[data-experience="field"] .hero-panel h2 {
  max-width: 520px;
}

body[data-experience="field"] .stats-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

body[data-experience="field"] .metric {
  min-height: 128px;
  border-radius: 14px;
}

body[data-experience="field"] .punch-panel {
  background: #10262b;
  color: #ffffff;
}

body[data-experience="field"] .punch-panel .muted {
  color: #cde8e8;
}

body[data-experience="field"] .punch-panel .status-text {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body[data-experience="premium"] {
  --brand: #2e3192;
  --brand-dark: #191b62;
  --brand-soft: #efefff;
  --accent: #c99734;
  --accent-soft: #fff4d8;
  background:
    radial-gradient(circle at top right, rgba(201, 151, 52, 0.18), transparent 28rem),
    #fbfaf6;
}

body[data-experience="premium"] .sidebar {
  background:
    linear-gradient(180deg, rgba(201, 151, 52, 0.22), transparent),
    #121225;
}

body[data-experience="premium"] .hero-panel {
  background:
    linear-gradient(135deg, rgba(18, 18, 37, 0.96), rgba(46, 49, 146, 0.72)),
    #121225;
}

body[data-experience="premium"] .hero-panel h2 {
  font-family: "Regatto", Georgia, serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.9;
}

body[data-experience="premium"] .hero-logo {
  width: min(230px, 58vw);
}

body[data-experience="premium"] .metric::before,
body[data-experience="premium"] .bar-track span {
  background: linear-gradient(180deg, var(--accent), var(--brand));
}

body[data-experience="premium"] .primary {
  background: linear-gradient(180deg, #3d40a7, #191b62);
  border-color: #191b62;
}

.print-report {
  display: none;
}

.report-page {
  color: #123034;
  background: #ffffff;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--brand);
}

.report-header img {
  width: 190px;
  height: auto;
}

.report-header h1,
.report-section h2 {
  margin: 0;
}

.report-header p,
.report-header span {
  margin: 0;
  color: #64777a;
}

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

.report-grid div,
.report-section {
  padding: 12px;
  border: 1px solid #d6e6e1;
  border-radius: 8px;
}

.report-grid strong {
  display: block;
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
}

.report-grid span {
  display: block;
  margin-top: 4px;
}

.report-section {
  margin-top: 14px;
}

.report-section h2 {
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-size: 18px;
}

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

.report-photo {
  display: grid;
  gap: 8px;
}

.report-photo img,
.report-photo div {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid #d6e6e1;
  border-radius: 8px;
}

.report-photo div {
  display: grid;
  place-items: center;
  color: #64777a;
  background: #f2f8f5;
}

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #ffffff !important;
  }

  .app-shell,
  .svg-sprite {
    display: none !important;
  }

  .print-report {
    display: block !important;
  }

  .report-page {
    display: block;
    box-shadow: none;
  }

  .report-section,
  .report-grid div,
  .report-photo {
    break-inside: avoid;
  }

  table {
    min-width: 0;
  }
}

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

  .sidebar {
    position: fixed;
    z-index: 10;
    width: min(82vw, 310px);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

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

  .menu-button {
    display: block;
  }

  .main {
    padding: 18px;
  }

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

  .topbar-actions,
  .topbar {
    flex-wrap: wrap;
  }

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

  .fleet-toolbar,
  .fleet-grid,
  .hr-grid,
  .planning-filters,
  .post-form,
  .site-form,
  .shift-form,
  .reporting-filters {
    grid-template-columns: 1fr;
  }

  .fleet-directory,
  .fleet-detail-panel {
    min-height: auto;
  }

  .experience-strip {
    grid-template-columns: 1fr;
  }

  .search {
    min-width: min(100%, 420px);
  }

  .hero-panel,
  .two-col,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    gap: 18px;
  }

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

  body[data-experience="field"] .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .main {
    padding: 14px;
  }

  .topbar h1 {
    font-size: 30px;
  }

  .topbar-actions,
  .search {
    width: 100%;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .stats-grid,
  .client-grid,
  .fleet-overview,
  .detail-grid,
  .media-grid,
  .punch-actions,
  .site-picker,
  .form-row,
  .validation-strip,
  .validation-flow,
  .selected-list,
  .intervention-evidence,
  .export-grid {
    grid-template-columns: 1fr;
  }

  body[data-experience="field"] .stats-grid {
    grid-template-columns: 1fr;
  }

  .experience-actions,
  .hero-quick-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 18px;
    margin-inline: -2px;
  }

  .hero-panel h2 {
    font-size: 33px;
  }

  .hero-copy {
    font-size: 14px;
  }

  .hero-brand-line {
    margin-bottom: 18px;
  }

  .hero-logo {
    width: min(170px, 62vw);
  }

  .hero-visual {
    min-height: 220px;
  }

  .shift-modal {
    padding: 10px;
  }

  .shift-modal-card {
    padding: 20px;
  }

  .shift-modal-row {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 14px;
  }
}
