:root {
  --blue: #007AFF;
  --green: #34C759;
  --red: #FF3B30;
  --orange: #FF9500;
  --gray: #8E8E93;
  --gray-light: #F2F2F7;
  --gray-border: #E5E5EA;
  --text: #1C1C1E;
  --text-secondary: #6D6D72;
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --tab-height: 83px;
  --header-height: 56px;
  --icon-color: #8E8E93;
  --icon-active: #007AFF;
  --type-bg: #FFFFFF;
  --type-border: #E5E5EA;
  --type-active-bg: #E8F0FE;
  --type-active-border: #007AFF;
  --type-text: #6D6D72;
  --type-active-text: #007AFF;
  --border: #E5E5EA;
  --card-bg: #FFFFFF;
}

body.dark {
  --blue: #0A84FF;
  --green: #30D158;
  --red: #FF453A;
  --orange: #FF9F0A;
  --gray: #636366;
  --gray-light: #2C2C2E;
  --gray-border: #38383A;
  --text: #FFFFFF;
  --text-secondary: #8E8E93;
  --bg: #000000;
  --card: #1C1C1E;
  --icon-color: #636366;
  --icon-active: #0A84FF;
  --type-bg: #1C1C1E;
  --type-border: #38383A;
  --type-active-bg: #0A2A5C;
  --type-active-border: #0A84FF;
  --type-text: #8E8E93;
  --type-active-text: #0A84FF;
  --border: #38383A;
  --card-bg: #1C1C1E;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  height: 100dvh;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* HEADER */
.header {
  height: var(--header-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 0.5px solid var(--gray-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.header-car {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.header-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: var(--blue);
}

.header-btn:disabled { opacity: 0.3; }
.header-logo { display: flex; align-items: center; }

.header-offline {
  display: none;
  font-size: 15px;
  opacity: 0.7;
}

.header-sync-badge {
  display: none;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  cursor: pointer;
  transition: opacity 0.3s;
}
.header-sync-badge.visible { display: flex; }
.header-sync-badge.error { background: var(--red); }
.header-logo svg { height: 32px; width: auto; }

/* SCREENS */
.screens {
  flex: 1;
  overflow: hidden;
  position: relative;
  min-height: 0;
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  padding-bottom: 8px;
}

.screen.active { display: block; }

/* TAB BAR */
.tabbar {
  height: var(--tab-height);
  min-height: var(--tab-height);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 0.5px solid var(--gray-border);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  flex-shrink: 0;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 0;
  border: none;
  background: none;
}

.tab-item svg {
  width: 24px;
  height: 24px;
  fill: var(--icon-color);
  transition: fill 0.15s;
}

.tab-item span {
  font-size: 10px;
  font-weight: 500;
  color: var(--icon-color);
  transition: color 0.15s;
}

.tab-item.active svg { fill: var(--icon-active); }
.tab-item.active span { color: var(--icon-active); }

/* CARDS */
.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  margin: 12px 16px 0;
}

.card-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--gray-border);
  gap: 12px;
}

.card-row:last-child { border-bottom: none; }

.card-label {
  font-size: 13px;
  color: var(--text-secondary);
  width: 80px;
  flex-shrink: 0;
}

.card-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  text-align: right;
}

.card-input::placeholder { color: var(--gray-border); }

/* LOCATION BOXES */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 16px 0;
}

.location-box {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.location-box.start-box {
  background: linear-gradient(135deg, #E8F5E9, #F1F8E9);
  border: 1px solid #C8E6C9;
}

.location-box-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.start-box .location-box-label { color: #2E7D32; }

.location-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  line-height: 1.3;
}

.location-name.placeholder { color: var(--gray); font-weight: 400; font-style: italic; }

.location-btns {
  display: flex;
  gap: 6px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  overflow: hidden;
}

.start-box .location-btns { border-color: #A5D6A7; }

.loc-btn {
  flex: 1;
  padding: 6px 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loc-btn svg {
  width: 18px;
  height: 18px;
  fill: var(--text-secondary);
}

.loc-btn:first-child { border-right: 1px solid var(--gray-border); }
.start-box .loc-btn:first-child { border-right-color: #A5D6A7; }

/* TYPE BUTTONS */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 16px 0;
}

.type-btn {
  background: var(--type-bg);
  border: 1.5px solid var(--type-border);
  border-radius: 10px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.type-btn svg {
  width: 22px;
  height: 22px;
  fill: var(--type-text);
  transition: fill 0.15s;
}

.type-btn span { font-size: 11px; font-weight: 500; color: var(--type-text); transition: color 0.15s; }

.type-btn.active {
  background: var(--type-active-bg);
  border-color: var(--type-active-border);
}

.type-btn.active svg { fill: var(--type-active-text); }
.type-btn.active span { color: var(--type-active-text); }

/* SAVE BUTTON */
.save-btn {
  margin: 14px 16px 0;
  width: calc(100% - 32px);
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.save-btn:active { opacity: 0.8; }

/* ACTIVITY LIST */
.section-header {
  padding: 20px 16px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.trip-item {
  background: var(--card);
  margin: 0 16px 1px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0.5px solid var(--gray-border);
}

.trip-item:first-of-type { border-radius: 12px 12px 0 0; }
.trip-item:last-of-type { border-radius: 0 0 12px 12px; border-bottom: none; margin-bottom: 0; }
.trip-item:only-of-type { border-radius: 12px; border-bottom: none; }

.trip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.trip-dot.billable { background: var(--green); }
.trip-dot.zakelijk { background: var(--blue); }
.trip-dot.woonwerk { background: var(--blue); }
.trip-dot.privé { background: var(--gray); }

.trip-info { flex: 1; min-width: 0; }
.trip-route { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trip-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.trip-km {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  text-align: right;
}

.trip-km span { display: block; font-size: 11px; font-weight: 400; color: var(--text-secondary); }

.trip-delete {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFE5E5;
  border: none;
  color: var(--red);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* INZICHT */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 16px 0;
}

.stat-card {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
}

.stat-value { font-size: 26px; font-weight: 700; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.stat-sub { font-size: 11px; color: var(--blue); margin-top: 4px; }

/* YEAR SELECTOR */
.year-selector {
  display: flex;
  gap: 8px;
  padding: 12px 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.year-selector::-webkit-scrollbar { display: none; }

.year-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--gray-border);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text);
  flex-shrink: 0;
}

.year-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

/* EXPORT BTN */
.export-btn {
  margin: 12px 16px 0;
  width: calc(100% - 32px);
  background: var(--green);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* ACCOUNT */
.car-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 16px 0;
}

.car-card {
  background: var(--card);
  border-radius: 12px;
  padding: 14px;
  border: 2px solid transparent;
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s;
}

.car-card.selected { border-color: var(--blue); }

.car-card-name { font-size: 15px; font-weight: 600; }
.car-card-plate {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 3px;
  background: #FFF9C4;
  border: 1px solid #F9A825;
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-block;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.car-delete {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFE5E5;
  border: none;
  color: var(--red);
  font-size: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
}

.car-card:hover .car-delete { display: flex; }

.add-car-form {
  background: var(--card);
  border-radius: 12px;
  margin: 10px 16px 0;
  overflow: hidden;
}

.add-car-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--gray-border);
  gap: 12px;
}

.add-car-row:last-child { border-bottom: none; }
.add-car-label { font-size: 13px; color: var(--text-secondary); width: 80px; }

.add-car-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 17px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  text-align: right;
}

.add-car-btn {
  margin: 10px 16px 0;
  width: calc(100% - 32px);
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* SETTINGS */
.settings-card {
  background: var(--card);
  border-radius: 12px;
  margin: 12px 16px 0;
  overflow: hidden;
}

.settings-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--gray-border);
  gap: 12px;
}

.settings-row:last-child { border-bottom: none; }
.settings-label { font-size: 15px; flex: 1; }
.settings-value { font-size: 15px; color: var(--blue); font-weight: 500; }

.settings-input {
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--blue);
  background: transparent;
  text-align: right;
  width: 80px;
  font-weight: 500;
}

.settings-save {
  margin: 12px 16px 0;
  width: calc(100% - 32px);
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* MODAL */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  display: none;
  align-items: flex-end;
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  padding: 16px 0 40px;
}

.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--gray-border);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.modal-title {
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  padding: 0 16px;
}

.modal-search {
  margin: 0 16px 12px;
  background: var(--gray-light);
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  width: calc(100% - 32px);
  outline: none;
}

.modal-location-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--gray-border);
}

.modal-location-btn:last-child { border-bottom: none; }
.modal-location-icon { font-size: 20px; width: 32px; text-align: center; }
.modal-location-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }

.modal-section-header {
  padding: 10px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 0.5px solid var(--gray-border);
  margin-top: 4px;
}

/* EDIT MODAL */
.edit-modal {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 16px 0 40px;
}

.edit-form-card {
  background: var(--gray-light);
  border-radius: 12px;
  margin: 0 16px 12px;
  overflow: hidden;
}

.edit-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--gray-border);
  gap: 12px;
  background: var(--card);
}

.edit-row:last-child { border-bottom: none; }

.edit-label {
  font-size: 13px;
  color: var(--text-secondary);
  width: 72px;
  flex-shrink: 0;
}

.edit-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  text-align: right;
}

.edit-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0 16px 12px;
}

.edit-type-btn {
  background: var(--type-bg);
  border: 1.5px solid var(--type-border);
  border-radius: 10px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.15s;
  font-size: 11px;
  font-weight: 500;
  color: var(--type-text);
  font-family: inherit;
}

.edit-type-btn svg { width: 18px; height: 18px; fill: var(--type-text); transition: fill 0.15s; }
.edit-type-btn.active { background: var(--type-active-bg); border-color: var(--type-active-border); color: var(--type-active-text); }
.edit-type-btn.active svg { fill: var(--type-active-text); }

.edit-save-btn {
  margin: 0 16px;
  width: calc(100% - 32px);
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: calc(var(--tab-height) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(50,50,50,0.92);
  color: white;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: all 0.25s;
  white-space: nowrap;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 48px 32px;
  color: var(--text-secondary);
}

.empty-state-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state-title { font-size: 17px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state-text { font-size: 14px; line-height: 1.5; }

/* RDW BADGE */
.rdw-badge {
  font-size: 11px;
  background: #E3F2FD;
  color: #1565C0;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

/* DARK MODE TOGGLE */
.dark-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toggle-switch {
  position: relative;
  width: 51px;
  height: 31px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-border);
  border-radius: 31px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider:before {
  content: '';
  position: absolute;
  width: 27px;
  height: 27px;
  left: 2px;
  top: 2px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

input:checked + .toggle-slider { background: var(--green); }
input:checked + .toggle-slider:before { transform: translateX(20px); }

body.dark .header { background: rgba(28,28,30,0.92); }
body.dark .tabbar { background: rgba(28,28,30,0.92); }
body.dark .modal { background: #1C1C1E; }
body.dark .modal-search { background: #2C2C2E; color: var(--text); }
body.dark .card-input { color: var(--text); }
body.dark .add-car-input { color: var(--text); }
body.dark .settings-input { color: var(--blue); }
body.dark .year-btn { background: var(--card); color: var(--text); border-color: var(--gray-border); }
body.dark .location-box.start-box { background: linear-gradient(135deg, #1B2F1C, #1E2E0E); border-color: #2E5130; }
body.dark .location-btns { border-color: var(--gray-border); }
body.dark .start-box .location-btns { border-color: #2E5130; }
body.dark .start-box .loc-btn:first-child { border-right-color: #2E5130; }
body.dark .header-btn { background: #2C2C2E; }

/* NL KENTEKEN PLAAT */
.nl-plate {
  display: flex;
  align-items: stretch;
  background: #F5C518;
  border: 3px solid #1a1a1a;
  border-radius: 6px;
  overflow: hidden;
  height: 62px;
  width: 252px;
  flex-shrink: 0;
}

.nl-plate-eu {
  background: #003399;
  width: 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 3px 2px;
}

.nl-plate-stars {
  font-size: 5px;
  color: #F5C518;
  line-height: 1.3;
  text-align: center;
  word-break: break-all;
  width: 22px;
}

.nl-plate-nl {
  font-size: 11px;
  font-weight: 900;
  color: white;
  letter-spacing: 1px;
}

.nl-plate-number {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: #1a1a1a;
  letter-spacing: 2px;
  font-family: 'Arial Black', Arial, sans-serif;
  text-transform: uppercase;
}

/* VEHICLE DETAIL MODAL — z-index must exceed sidebar (200) */
.vehicle-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  display: none;
  align-items: flex-end;
}

.vehicle-detail-overlay.open { display: flex; }

.vehicle-detail-sheet {
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 40px;
}

.vd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 0;
}

.vd-title { font-size: 17px; font-weight: 600; }

.vd-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gray-light);
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.vd-plate-wrap {
  display: flex;
  justify-content: center;
  padding: 20px 16px;
}

.vd-section { margin: 0 16px 10px; }

.vd-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 6px 0;
}

.vd-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

.vd-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--gray-border);
}

.vd-row:last-child { border-bottom: none; }
.vd-label { font-size: 15px; color: var(--text-secondary); flex: 1; }
.vd-value { font-size: 15px; font-weight: 500; color: var(--text); }

.vd-rdw-btn {
  margin: 16px 16px 0;
  width: calc(100% - 32px);
  background: var(--blue);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* MONTH OVERVIEW */
.year-summary-card {
  background: linear-gradient(135deg, #007AFF 0%, #0055D4 100%);
  border-radius: 16px;
  margin: 12px 16px 0;
  padding: 20px;
  color: white;
}

body.dark .year-summary-card {
  background: linear-gradient(135deg, #0A84FF 0%, #003EAA 100%);
}

.ys-year { font-size: 14px; font-weight: 500; opacity: 0.75; margin-bottom: 10px; }

.ys-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ys-label { font-size: 13px; opacity: 0.7; margin-right: 8px; }
.ys-km { font-size: 22px; font-weight: 700; }
.ys-bedrag { font-size: 17px; font-weight: 600; opacity: 0.9; }

.ys-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin: 10px 0 8px;
}

.ys-prognose-km { font-size: 16px; font-weight: 600; opacity: 0.8; }
.ys-prognose-bedrag { font-size: 13px; opacity: 0.65; }

.months-card {
  background: var(--card);
  border-radius: 12px;
  margin: 10px 16px 0;
  overflow: hidden;
}

.month-row {
  padding: 11px 16px 9px;
  border-bottom: 0.5px solid var(--gray-border);
}

.month-row:last-child { border-bottom: none; }

.month-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.month-name { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.month-name.has-data { color: var(--blue); font-weight: 600; }

.month-right { display: flex; gap: 10px; align-items: baseline; }
.month-km { font-size: 14px; font-weight: 600; color: var(--text); }
.month-bedrag { font-size: 12px; color: var(--text-secondary); }

.month-bar { height: 3px; background: var(--gray-border); border-radius: 2px; overflow: hidden; }
.month-bar-fill { height: 100%; background: var(--blue); border-radius: 2px; }

/* FORMAT TOGGLE */
.format-toggle {
  display: flex;
  border: 1.5px solid var(--blue);
  border-radius: 8px;
  overflow: hidden;
}

.format-btn {
  padding: 5px 14px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--blue);
  font-family: inherit;
}

.format-btn.active { background: var(--blue); color: white; }
.format-btn:not(:last-child) { border-right: 1.5px solid var(--blue); }

/* EXPORT MODAL */
.export-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 12px 0 6px;
}

.export-section-title:first-child { padding-top: 4px; }

.export-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
}

.export-row {
  display: flex;
  align-items: center;
  padding: 13px 16px;
  border-bottom: 0.5px solid var(--gray-border);
  gap: 12px;
}

.export-row:last-child { border-bottom: none; }
.export-label { font-size: 15px; color: var(--text-secondary); flex: 1; }

.export-select {
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  text-align: right;
  cursor: pointer;
  max-width: 180px;
}

.export-date-input {
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  text-align: right;
  cursor: pointer;
}
/* ── ACTIVITEITEN HEADER ──────────────────── */
.act-header{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 6px;}
.act-car-name{font-size:18px;font-weight:700;color:var(--text);}
.act-subtitle{font-size:13px;color:var(--text-secondary);margin-top:1px;}
.act-export-btn{width:38px;height:38px;border-radius:50%;background:var(--gray-light);border:none;font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--text);}

/* ── ACTIVITEITEN DAG ─────────────────────── */
.act-day-header{padding:16px 16px 6px;font-size:11px;font-weight:700;color:var(--text-secondary);text-transform:uppercase;letter-spacing:0.5px;}
.act-day-card{margin:0 16px;border-radius:12px;overflow:hidden;border:1px solid var(--border);background:var(--card-bg);}
.act-trip-item{display:flex;align-items:center;padding:12px 14px;gap:10px;cursor:pointer;border-bottom:1px solid var(--border);transition:background 0.15s;}
.act-trip-item:last-child{border-bottom:none;}
.act-trip-item:active{background:var(--gray-light);}
.act-trip-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;}
.act-trip-info{flex:1;min-width:0;}
.act-trip-route{font-size:14px;font-weight:500;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.act-trip-meta{display:flex;align-items:center;gap:6px;margin-top:3px;flex-wrap:wrap;}
.act-trip-time{font-size:12px;color:var(--text-secondary);}
.act-cat-pill{font-size:11px;font-weight:600;padding:2px 8px;border-radius:20px;}
.act-cat-pill.billable{background:#E8F5E9;color:#2E7D32;}
.act-cat-pill.zakelijk,.act-cat-pill.woonwerk{background:#E8F0FE;color:#1565C0;}
.act-cat-pill.privé,.act-cat-pill.prive{background:#F5F5F5;color:#616161;}
.dark .act-cat-pill.billable{background:rgba(46,125,50,0.25);color:#81C784;}
.dark .act-cat-pill.zakelijk,.dark .act-cat-pill.woonwerk{background:rgba(21,101,192,0.25);color:#90CAF9;}
.dark .act-cat-pill.privé,.dark .act-cat-pill.prive{background:rgba(255,255,255,0.1);color:#9E9E9E;}
.act-trip-note{font-size:12px;color:var(--text-secondary);font-style:italic;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:120px;}
.act-trip-right{display:flex;flex-direction:column;align-items:flex-end;gap:2px;flex-shrink:0;}
.act-trip-km{font-size:14px;font-weight:600;color:var(--text);}
.act-trip-bedrag{font-size:12px;color:var(--text-secondary);}
.act-day-total{margin:4px 16px 12px;padding:4px 14px;font-size:12px;color:var(--text-secondary);font-weight:500;}

/* ── PRIVÉ PROGRESS ───────────────────────── */
.prive-progress-card{margin:12px 16px 0;background:var(--card-bg);border:1px solid var(--border);border-radius:12px;padding:14px 16px;}
.prive-progress-title{font-size:11px;font-weight:700;color:var(--text-secondary);text-transform:uppercase;letter-spacing:0.4px;margin-bottom:10px;}
.prive-stats{display:grid;grid-template-columns:1fr 1fr 1fr;text-align:center;margin-bottom:12px;}
.prive-stat-value{display:block;font-size:20px;font-weight:700;color:var(--text);}
.prive-stat-value.red{color:var(--red);}
.prive-stat-label{display:block;font-size:11px;color:var(--text-secondary);margin-top:2px;text-transform:uppercase;letter-spacing:0.3px;}
.prive-bar-wrap{height:6px;background:var(--gray-light);border-radius:3px;overflow:hidden;}
.prive-bar-fill{height:100%;background:var(--blue);border-radius:3px;transition:width 0.4s ease;}
.prive-bar-fill.over{background:var(--red);}
.prive-warning{margin-top:10px;font-size:13px;color:var(--text-secondary);}
.prive-warning.red{color:var(--red);}

/* ── CATEGORIE FILTER ─────────────────────── */
.cat-filter-wrap{display:flex;gap:8px;padding:10px 16px 0;flex-wrap:wrap;}
.cat-filter-btn{padding:6px 16px;border-radius:20px;border:1px solid var(--border);background:transparent;color:var(--text-secondary);font-size:13px;font-weight:500;cursor:pointer;transition:all 0.15s;font-family:inherit;}
.cat-filter-btn.active{background:var(--blue);color:white;border-color:var(--blue);}

/* ── INZICHT TABLE ────────────────────────── */
.inzicht-table-card{margin:10px 16px 16px;background:var(--card-bg);border:1px solid var(--border);border-radius:12px;overflow:hidden;}
.inzicht-totaal-row{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:var(--gray-light);}
.inzicht-prognose-row{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-top:1px solid var(--border);}
.inzicht-totaal-label{font-size:11px;color:var(--text-secondary);text-transform:uppercase;letter-spacing:0.4px;margin-bottom:3px;}
.inzicht-totaal-km{font-size:20px;font-weight:700;color:var(--text);}
.inzicht-totaal-km.muted{font-size:16px;color:var(--text-secondary);font-weight:500;}
.inzicht-totaal-bedrag{font-size:20px;font-weight:700;color:var(--text);}
.inzicht-totaal-bedrag.muted{font-size:16px;color:var(--text-secondary);font-weight:500;}
.inzicht-month-row{display:grid;grid-template-columns:1fr 90px 90px;gap:4px;padding:10px 16px;border-top:1px solid var(--border);align-items:center;}
.inzicht-month-row.empty{opacity:0.35;}
.inzicht-month-name{font-size:14px;font-weight:500;color:var(--text);}
.inzicht-month-km{font-size:14px;color:var(--text);font-weight:500;text-align:right;}
.inzicht-month-bedrag{font-size:13px;color:var(--text-secondary);text-align:right;}

/* ── EXPORT PREVIEW ───────────────────────── */
.export-preview{background:var(--gray-light);border-radius:10px;padding:12px 14px;margin-top:12px;font-size:13px;line-height:1.8;color:var(--text-secondary);}
.export-preview strong{color:var(--text);}

/* ── KM MUTED (eindstand niet aangepast) ─── */
.km-muted { color: var(--text-secondary) !important; }

/* ═══════════════════════════════════════════
   DESKTOP LAYOUT  ≥ 960px
   ═══════════════════════════════════════════ */

/* Sidebar — always in DOM, hidden on mobile */
.sidebar {
  display: none;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 240px;
  background: #111827;
  border-right: 1px solid rgba(255,255,255,0.07);
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}
.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.sidebar-logo svg { width: 110px; height: auto; }
.sidebar-logo svg text { fill: #fff !important; }
.sidebar-nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.sidebar-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 20px;
  background: none; border: none;
  color: rgba(255,255,255,0.6);
  font-size: 14px; font-weight: 500; font-family: inherit;
  cursor: pointer; text-align: left;
  transition: background 0.13s, color 0.13s;
}
.sidebar-item svg { width: 18px; height: 18px; fill: rgba(255,255,255,0.4); flex-shrink: 0; }
.sidebar-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.sidebar-item:hover svg { fill: rgba(255,255,255,0.7); }
.sidebar-item.active { background: rgba(0,122,255,0.18); color: #fff; }
.sidebar-item.active svg { fill: #007AFF; }
.sidebar-footer {
  padding: 14px 20px 28px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.sidebar-export-btn {
  width: 100%; padding: 10px 14px;
  background: rgba(0,122,255,0.12); color: #60a5fa;
  border: 1px solid rgba(0,122,255,0.25);
  border-radius: 8px; font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: background 0.13s;
}
.sidebar-export-btn:hover { background: rgba(0,122,255,0.22); }

@media (min-width: 960px) {
  body { overflow: auto; flex-direction: row; height: auto; }
  html { height: auto; }

  .sidebar { display: flex; }
  .header { display: none; }
  .tabbar { display: none !important; }

  .screens {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
    padding-bottom: 0;
    overflow: visible;
  }

  .screen {
    display: none;
    padding: 32px;
    max-width: 1200px;
    overflow: visible;
  }
  .screen.active { display: block; }

  #screen-registreren { max-width: 560px; }
  #screen-registreren .save-btn { margin-top: 8px; }
  #screen-account { max-width: 700px; }

  /* ── DESKTOP ACTIVITEITEN TABLE ──────────── */
  .dt-page-header {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
  }
  .dt-page-title { font-size: 24px; font-weight: 700; color: var(--text); }
  .dt-page-sub { font-size: 14px; color: var(--text-secondary); margin-top: 2px; }
  .dt-add-btn {
    padding: 9px 18px; background: var(--blue); color: white;
    border: none; border-radius: 8px; font-size: 14px; font-weight: 600;
    font-family: inherit; cursor: pointer;
  }
  .dt-table-wrap {
    background: var(--card); border-radius: 12px;
    border: 1px solid var(--border); overflow: hidden;
    margin-top: 16px;
  }
  .dt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
  .dt-table thead th {
    padding: 11px 14px; text-align: left;
    font-size: 11px; font-weight: 700;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.5px; background: var(--gray-light);
    border-bottom: 1px solid var(--border);
  }
  .dt-table thead th.r { text-align: right; }
  .dt-day-row td {
    padding: 7px 14px;
    font-size: 11px; font-weight: 700;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.4px; background: var(--gray-light);
    border-top: 2px solid var(--border);
  }
  .dt-day-row td.r { text-align: right; color: var(--text); font-size: 12px; }
  .dt-trip-row {
    cursor: pointer; transition: background 0.1s;
    border-top: 1px solid var(--border);
  }
  .dt-trip-row:hover { background: rgba(0,122,255,0.05); }
  .dark .dt-trip-row:hover { background: rgba(0,132,255,0.08); }
  .dt-trip-row td { padding: 10px 14px; color: var(--text); vertical-align: middle; }
  .dt-trip-row td.r { text-align: right; }
  .dt-trip-row td.muted { color: var(--text-secondary); font-size: 13px; }
  .dt-route { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dt-del {
    background: none; border: none; color: var(--text-secondary);
    cursor: pointer; padding: 3px 7px; border-radius: 5px; font-size: 13px;
    transition: background 0.1s, color 0.1s;
  }
  .dt-del:hover { background: rgba(255,59,48,0.1); color: var(--red); }

  /* ── DESKTOP INZICHT ─────────────────────── */
  .dt-inzicht-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
  .dt-chart-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px; text-align: center;
    position: sticky; top: 32px;
  }
  .dt-chart-label {
    font-size: 11px; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px;
  }
  .dt-chart-legend { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
  .dt-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); }
  .dt-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
  .dt-legend-km { margin-left: auto; font-weight: 600; color: var(--text); }

  .dt-month-table { width: 100%; border-collapse: collapse; }
  .dt-month-table th {
    padding: 9px 14px; font-size: 11px; font-weight: 700;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.4px; border-bottom: 1px solid var(--border);
    text-align: right;
  }
  .dt-month-table th:first-child { text-align: left; }
  .dt-month-table td {
    padding: 9px 14px; font-size: 14px;
    border-top: 1px solid var(--border);
    text-align: right; color: var(--text);
  }
  .dt-month-table td:first-child { text-align: left; font-weight: 500; }
  .dt-month-table tr.dt-empty td { color: var(--text-secondary); opacity: 0.5; }

  /* ── DESKTOP EXPORT MODAL ────────────────── */
  #exportModal .modal { max-width: 680px; width: 95vw; margin: auto; }
  .dt-export-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
}
