:root {
  color-scheme: light;
  --bg: #f2f4f7;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --text-primary: #1a1a1a;
  --text-secondary: #6b7280;
  --text-label: #374151;
  --border: #d1d5db;
  --border-focus: #2563eb;
  --primary: #2563eb;
  --primary-disabled: #93c5fd;
  --primary-text: #ffffff;
  --error-bg: #fee2e2;
  --error-text: #b91c1c;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --slot-border: #9ca3af;
  --slot-filled-border: #2563eb;
  --slot-filled-bg: #eff6ff;
  --overlay-bg: rgba(0, 0, 0, 0.45);
  --sheet-shadow: rgba(0, 0, 0, 0.15);
  --keypad-btn-bg: #f2f4f7;
  --keypad-btn-active-bg: #e0e4ea;
  --keypad-action-color: #4b5563;
  --keypad-action-active-bg: #e5e7eb;
  --status-done-bg: #dcfce7;
  --status-done-text: #166534;
  --status-progress-bg: #dbeafe;
  --status-progress-text: #1e40af;
  --status-waiting-bg: #fef3c7;
  --status-waiting-text: #92400e;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --table-row-hover: #f8fafc;
  --glow-1: rgba(37, 99, 235, 0.12);
  --glow-2: rgba(124, 58, 237, 0.1);
  --focus-ring: rgba(37, 99, 235, 0.15);
  --primary-shadow: rgba(37, 99, 235, 0.3);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f172a;
  --card-bg: #1e293b;
  --card-shadow: rgba(0, 0, 0, 0.4);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-label: #cbd5e1;
  --border: #334155;
  --border-focus: #3b82f6;
  --primary: #3b82f6;
  --primary-disabled: #1e3a5f;
  --primary-text: #ffffff;
  --error-bg: rgba(239, 68, 68, 0.15);
  --error-text: #fca5a5;
  --success-bg: rgba(34, 197, 94, 0.15);
  --success-text: #86efac;
  --slot-border: #475569;
  --slot-filled-border: #3b82f6;
  --slot-filled-bg: rgba(59, 130, 246, 0.15);
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --sheet-shadow: rgba(0, 0, 0, 0.5);
  --keypad-btn-bg: #334155;
  --keypad-btn-active-bg: #475569;
  --keypad-action-color: #cbd5e1;
  --keypad-action-active-bg: #475569;
  --status-done-bg: rgba(34, 197, 94, 0.15);
  --status-done-text: #86efac;
  --status-progress-bg: rgba(59, 130, 246, 0.15);
  --status-progress-text: #93c5fd;
  --status-waiting-bg: rgba(245, 158, 11, 0.15);
  --status-waiting-text: #fcd34d;
  --danger: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --table-row-hover: #1e2937;
  --glow-1: rgba(59, 130, 246, 0.16);
  --glow-2: rgba(139, 92, 246, 0.14);
  --focus-ring: rgba(59, 130, 246, 0.25);
  --primary-shadow: rgba(59, 130, 246, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% -8%, var(--glow-1), transparent 45%),
    radial-gradient(circle at 108% 105%, var(--glow-2), transparent 45%),
    var(--bg);
  background-attachment: fixed;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  transition: background-color 0.2s ease;
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sheetSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pinPop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.16);
  }
  100% {
    transform: scale(1);
  }
}

.topbar {
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--card-bg);
  background: color-mix(in srgb, var(--card-bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px var(--card-shadow);
  transition: background-color 0.2s ease;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
}

.topbar-logo svg {
  width: 18px;
  height: 18px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

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

.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.topbar-user-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #ffffff;
}

.topbar-user-icon svg {
  width: 14px;
  height: 14px;
}

.topbar-user-name {
  max-width: 140px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

@media (max-width: 480px) {
  .topbar-user-name {
    max-width: 80px;
  }
}

/* Ekstra sempit khusus lebar HP umum (~360-390px) - dikasih lebih banyak jarak aman supaya
   nama panjang tidak bikin topbar meluber ke samping saat ukuran font digeser ke paling besar. */
@media (max-width: 400px) {
  .topbar-user-name {
    max-width: 34px;
  }

  .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.page-content {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
}

.admin-link-row {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.admin-link-row .link-button {
  font-size: 14px;
}

.site-footer {
  flex: 0 0 auto;
  padding: 16px;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border-radius: 22px;
  padding: 36px 26px;
  box-shadow: 0 20px 40px -12px var(--card-shadow);
  transition: background-color 0.2s ease;
  animation: fadeInUp 0.35s ease;
}

.theme-toggle {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:active {
  transform: scale(0.9);
}

.lang-toggle {
  flex: 0 0 auto;
  width: auto;
  height: 36px;
  padding: 0 14px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.lang-toggle:active {
  transform: scale(0.9);
}

h1 {
  margin: 0 0 4px;
  font-size: 23px;
  letter-spacing: -0.01em;
  text-align: center;
  color: var(--text-primary);
}

.subtitle {
  margin: 0 0 26px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-label);
  font-weight: 600;
}

input {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  background: var(--card-bg);
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

textarea {
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  background: var(--card-bg);
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

input[readonly] {
  background: var(--bg);
  color: var(--text-secondary);
  cursor: default;
}

input[readonly]:focus {
  box-shadow: none;
  border-color: var(--border);
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 18px;
  width: 44px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

button {
  width: 100%;
  padding: 13px 14px;
  background: var(--primary);
  color: var(--primary-text);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

button:active {
  transform: scale(0.98);
}

button[type="submit"] {
  box-shadow: 0 12px 20px -10px var(--primary-shadow);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-label);
  cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.remembered-driver {
  margin-bottom: 18px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.remembered-label {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.remembered-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.remembered-code {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Driver search (admin - ubah PIN driver) */
.driver-search-wrap {
  position: relative;
}

.driver-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 20px var(--card-shadow);
  z-index: 20;
}

.driver-search-results[hidden] {
  display: none;
}

.driver-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

.driver-result-item:last-child {
  border-bottom: none;
}

.driver-result-item:hover {
  background: var(--table-row-hover);
}

.driver-result-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.driver-result-code {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.driver-search-empty {
  padding: 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.selected-driver-code {
  font-size: 12px;
  color: var(--text-secondary);
}

.pin-status-badge {
  flex: 0 0 auto;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pin-status-badge.has-pin {
  background: var(--status-done-bg);
  color: var(--status-done-text);
}

.pin-status-badge.no-pin {
  background: var(--status-waiting-bg);
  color: var(--status-waiting-text);
}

.pin-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.pin-input-row input {
  flex: 1;
  min-width: 0;
}

.secondary-button {
  width: auto;
  flex: 0 0 auto;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.do-action-btn {
  width: auto;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  white-space: nowrap;
  cursor: pointer;
}

.do-action-btn--start {
  background: var(--primary);
  color: var(--primary-text);
}

.do-action-btn--arrive {
  background: var(--success-bg);
  color: var(--success-text);
}

.do-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.do-eta-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.do-action-btn--block {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  margin-top: 10px;
  margin-bottom: 16px;
}

.history-link {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  font-size: 13px;
  text-align: center;
}

.history-sheet.keypad-sheet {
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.history-search {
  margin-bottom: 10px;
}

.history-date-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.history-date-filter-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.history-date-filter-label svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.history-date-filter-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-date-input {
  flex: 0 0 auto;
  width: 150px;
  margin-bottom: 0;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
}

.history-date-clear-btn {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.history-date-clear-btn:hover {
  background: var(--card-bg);
  color: var(--text-primary);
}

.history-date-clear-btn[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .history-date-input {
    width: 118px;
  }
}

.history-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.history-date-header {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0 0 12px;
  padding: 6px 0;
  background: var(--card-bg);
  box-shadow: 0 1px 0 var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.history-date-group {
  margin-bottom: 18px;
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-entry {
  position: relative;
  padding: 0 0 20px 26px;
}

.history-entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-secondary);
  border: 2px solid var(--card-bg);
  box-shadow: 0 0 0 1px var(--border);
  z-index: 1;
}

.history-entry::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 18px;
  bottom: -2px;
  width: 2px;
  background: var(--border);
}

.history-entry:last-child {
  padding-bottom: 0;
}

.history-entry:last-child::after {
  display: none;
}

.history-entry--start::before {
  background: var(--primary);
}

.history-entry--arrive::before {
  background: var(--success-text);
}

.history-entry-top {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 4px;
  gap: 8px;
  margin-bottom: 3px;
}

.history-entry-time {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.history-entry-title {
  flex: 1 1 auto;
  min-width: 80px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

.history-uploaded-badge {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--slot-filled-bg);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.history-entry-place {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.history-entry-coords {
  margin: 0 0 4px;
  font-size: 11px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.history-entry-by {
  margin: 0 0 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.history-entry-remark {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.history-entry-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 6px;
  gap: 10px;
  margin-bottom: 8px;
}

.history-action-pill {
  flex: 0 0 auto;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.history-action-pill--start {
  background: var(--slot-filled-bg);
  color: var(--primary);
}

.history-action-pill--checkpoint {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.history-action-pill--arrive {
  background: var(--success-bg);
  color: var(--success-text);
}

.history-entry-map-link {
  font-size: 12px;
}

.history-entry-photo {
  display: block;
  width: 100%;
  max-width: 220px;
  border-radius: 10px;
  cursor: pointer;
}

.history-empty {
  padding: 30px 0;
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.history-checkin-btn {
  flex: 0 0 auto;
  margin-top: 14px;
  margin-bottom: 0;
}

.history-trip-completed-note {
  flex: 0 0 auto;
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.history-trip-completed-note[hidden] {
  display: none;
}

.history-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.history-tab-btn {
  flex: 1;
  width: auto;
  padding: 8px 0;
  background: none;
  border: none;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.history-tab-btn.active {
  background: var(--primary);
  color: var(--primary-text);
}

.history-map {
  height: 400px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
}

.history-map .leaflet-popup-content-wrapper {
  border-radius: 10px;
}

.history-map-popup-title {
  font-weight: 700;
  margin-bottom: 2px;
}

.history-map-popup-place {
  color: #374151;
  font-size: 12px;
  margin-bottom: 2px;
}

.history-map-popup-time {
  color: #6b7280;
  font-size: 12px;
}

.history-map-marker span {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.history-map-marker--start span {
  background: #22c55e;
}

.history-map-marker--end span {
  background: #ef4444;
}

.history-map-marker--mid span {
  background: #3b82f6;
}

.time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--text-primary);
}

.time-badge-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-text);
}

.time-badge-icon svg {
  width: 10px;
  height: 10px;
}

.trip-timeline {
  display: flex;
  align-items: flex-start;
  margin: 14px 0 6px;
}

.trip-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  width: 96px;
}

.trip-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.trip-dot svg {
  width: 12px;
  height: 12px;
}

.trip-dot--done {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-text);
}

.trip-dot--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--slot-filled-bg);
}

.trip-connector {
  flex: 1 1 auto;
  height: 2px;
  min-width: 20px;
  margin-top: 10px;
  background: var(--border);
  transition: background-color 0.15s ease;
}

.trip-connector--active {
  background: var(--primary);
}

.trip-node-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.trip-node-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.trip-node-date {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.trip-node-clock {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.trip-node-time--muted .trip-node-date,
.trip-node-time--muted .trip-node-clock {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
}

.do-action-btn--checkpoint {
  background: var(--bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.checkpoint-sheet.keypad-sheet {
  max-width: 460px;
}

.checkpoint-gps-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-secondary);
  font-size: 13px;
}

.checkpoint-gps-status.is-ready {
  border-color: var(--success-text);
  background: var(--success-bg);
  color: var(--success-text);
}

.checkpoint-gps-status.is-error {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.checkpoint-camera {
  position: relative;
  height: 260px;
  margin-bottom: 12px;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.checkpoint-camera video,
.checkpoint-camera img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkpoint-camera-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.75);
}

.checkpoint-confirm {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--success-text);
  background: var(--success-bg);
  animation: fadeInUp 0.2s ease;
}

.checkpoint-confirm-message {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--success-text);
  font-size: 13px;
  font-weight: 600;
}

.checkpoint-confirm-message svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.checkpoint-confirm-buttons {
  display: flex;
  gap: 10px;
}

.checkpoint-confirm-buttons button {
  flex: 1;
  margin-bottom: 0;
  padding: 10px 14px;
  font-size: 13px;
}

#checkpointChangePhotoBtn {
  margin-bottom: 18px;
}

.link-button {
  width: auto;
  padding: 0;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.login-as-driver-link {
  display: block;
  margin-top: 14px;
}

.link-button:disabled {
  background: none;
  box-shadow: none;
  opacity: 0.6;
  cursor: not-allowed;
}

button:disabled {
  background: var(--primary-disabled);
  box-shadow: none;
  cursor: not-allowed;
}

.message {
  margin-top: 16px;
  margin-bottom: 0;
  text-align: center;
  font-size: 14px;
  padding: 11px;
  border-radius: 10px;
  animation: fadeInUp 0.2s ease;
}

.message.error {
  background: var(--error-bg);
  color: var(--error-text);
}

.message.success {
  background: var(--success-bg);
  color: var(--success-text);
}

/* PIN slot display (buka keypad) */
.pin-display {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pin-display:focus,
.pin-display:hover {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.pin-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--slot-border);
  background: transparent;
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.pin-slot.filled {
  border-color: var(--slot-filled-border);
  background: var(--slot-filled-bg);
  animation: pinPop 0.18s ease;
}

/* Keypad popup */
.keypad-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: overlayFadeIn 0.2s ease;
}

.keypad-overlay[hidden] {
  display: none;
}

.keypad-sheet {
  width: 100%;
  max-width: 360px;
  background: var(--card-bg);
  border-radius: 24px 24px 0 0;
  padding: 12px 20px 24px;
  box-shadow: 0 -8px 30px var(--sheet-shadow);
  animation: sheetSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.keypad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-label);
  white-space: nowrap;
}

.keypad-close {
  width: auto;
  flex: 0 0 auto;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  margin-right: -8px;
}

.keypad-dots {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 24px;
}

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

.keypad-btn {
  padding: 17px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--keypad-btn-bg);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.1s ease, background-color 0.1s ease;
}

.keypad-btn:active {
  background: var(--keypad-btn-active-bg);
  transform: scale(0.94);
}

.keypad-action {
  font-size: 16px;
  color: var(--keypad-action-color);
  background: transparent;
}

.keypad-action:active {
  background: var(--keypad-action-active-bg);
}

/* Admin dashboard */
.dashboard-shell {
  flex: 1 1 auto;
  width: 100%;
}

.dashboard-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: var(--card-bg);
  z-index: 20;
}

.dashboard-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: none;
  border: none;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dashboard-nav-item:hover:not(.active) {
  background: var(--bg);
  color: var(--text-primary);
}

.dashboard-nav-item .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.dashboard-nav-item .nav-icon svg {
  width: 22px;
  height: 22px;
}

.dashboard-nav-item.active {
  background: var(--primary);
  color: var(--primary-text);
  box-shadow: 0 4px 12px -4px var(--primary-shadow);
}

.dashboard-main {
  margin-left: 240px;
  min-width: 0;
  padding: 32px 32px;
  display: flex;
  justify-content: center;
}

.dashboard-site-footer {
  margin-left: 240px;
}

.dashboard-panel {
  width: 100%;
  max-width: 780px;
}

.dashboard-panel[hidden] {
  display: none;
}

@media (min-width: 768px) {
  .dashboard-panel--wide {
    max-width: 1320px;
  }
}

@media (max-width: 767px) {
  .dashboard-sidebar {
    top: auto;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 50;
    width: auto;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border-radius: 999px;
    background: var(--card-bg);
    background: color-mix(in srgb, var(--card-bg) 90%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    box-shadow: 0 14px 30px var(--card-shadow);
  }

  .dashboard-nav-item {
    flex: 1 1 0;
    flex-direction: column;
    gap: 2px;
    width: auto;
    padding: 8px 6px;
    font-size: 11px;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .dashboard-nav-item.active {
    background: var(--primary);
    color: var(--primary-text);
  }

  .dashboard-nav-item .nav-icon {
    width: 22px;
    height: 22px;
    border-radius: 0;
  }

  .dashboard-nav-item.active .nav-icon {
    background: none;
    color: var(--primary-text);
  }

  .dashboard-main {
    margin-left: 0;
    padding: 20px 16px 110px;
  }

  .site-footer {
    padding-bottom: 110px;
  }

  .dashboard-site-footer {
    margin-left: 0;
  }
}

.dashboard-panel h1 {
  margin: 0 0 24px;
  font-size: 22px;
  text-align: center;
  color: var(--text-primary);
}

.panel-header h1 {
  margin: 0;
}

.panel-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.do-search {
  width: 100%;
  max-width: 420px;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .panel-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  .panel-header h1 {
    text-align: left;
  }

  .do-search {
    flex: 0 1 340px;
  }
}

.do-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

@media (max-width: 767px) {
  .do-filter-bar {
    justify-content: center;
  }
}

.do-filter-chip {
  flex: 0 0 auto;
  margin-bottom: 0;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.do-filter-chip:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.do-filter-chip:focus,
.do-filter-chip:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  color: var(--text-primary);
}

select.do-filter-chip {
  width: auto;
  max-width: 220px;
  padding-right: 36px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

:root[data-theme="dark"] select.do-filter-chip {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

select.do-filter-chip option {
  text-align: center;
  padding: 10px 20px;
}

.do-filter-chip--date {
  width: 152px;
}

.do-filter-clear-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin-bottom: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: none;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.do-filter-clear-btn:hover {
  background: var(--bg);
  color: var(--text-primary);
}

.do-filter-clear-btn[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .do-filter-chip--date {
    width: 142px;
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
  box-shadow: 0 4px 16px -10px var(--card-shadow);
}

.do-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  white-space: nowrap;
}

.do-table th,
.do-table td {
  text-align: left;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.do-table th {
  background: var(--bg);
  color: var(--text-label);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.do-table tbody tr:last-child td {
  border-bottom: none;
}

.do-table tbody tr:hover {
  background: var(--table-row-hover);
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-done {
  background: var(--status-done-bg);
  color: var(--status-done-text);
}

.status-progress {
  background: var(--status-progress-bg);
  color: var(--status-progress-text);
}

.status-waiting {
  background: var(--status-waiting-bg);
  color: var(--status-waiting-text);
}

.do-empty-state {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 24px;
}

.do-card-list {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.do-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.do-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.do-card-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
}

.do-card-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 3px 0;
}

.do-card-label {
  flex: 0 0 auto;
  color: var(--text-secondary);
}

.do-card-value {
  text-align: right;
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 767px) {
  .table-wrap {
    display: none;
  }

  .do-card-list {
    display: flex;
  }
}

/* Kartu di layar sempit + zoom font maksimal (150%) bisa bikin timeline "Berangkat/Sampai"
   meluber dikit karena .trip-node lebar tetap 96px - dipersempit di lebar sempit biar aman. */
@media (max-width: 400px) {
  .trip-node {
    width: 82px;
  }
}

.profile-grid {
  display: flex;
  flex-direction: column;
}

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

@media (min-width: 860px) {
  .profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    gap: 20px;
  }

  .profile-side {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .profile-grid.profile-grid--focused {
    display: block;
  }

  .profile-grid--focused .profile-main {
    max-width: 640px;
    margin: 0 auto;
  }
}

.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.profile-section-label {
  margin: 0 0 8px 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.profile-menu-card {
  padding: 6px;
}

.profile-menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.profile-menu-row:active {
  transform: none;
}

.profile-menu-row:hover {
  background: var(--table-row-hover);
}

.profile-menu-row + .profile-menu-row {
  margin-top: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  border-radius: 0;
}

.profile-menu-row--static {
  cursor: default;
}

.profile-menu-row--static:hover {
  background: none;
}

.lang-segmented {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.lang-segment-btn {
  width: auto;
  padding: 6px 14px;
  background: none;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-segment-btn.active {
  background: var(--primary);
  color: var(--primary-text);
}

.menu-row-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--slot-filled-bg);
  color: var(--primary);
}

.menu-row-icon svg {
  width: 20px;
  height: 20px;
}

.menu-row-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.menu-row-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.menu-row-desc {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-row-chevron {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.profile-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  padding: 0;
  margin-bottom: 16px;
  background: none;
  border: none;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.profile-back-btn svg {
  width: 18px;
  height: 18px;
}

.profile-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.card-icon-badge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--slot-filled-bg);
  color: var(--primary);
}

.card-icon-badge svg {
  width: 20px;
  height: 20px;
}

.profile-card h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-card-desc {
  margin: 0 0 18px 52px;
  font-size: 13px;
  color: var(--text-secondary);
}

.theme-choice {
  display: flex;
  gap: 10px;
}

.theme-choice-btn {
  flex: 1;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

.theme-choice-btn svg {
  width: 18px;
  height: 18px;
}

.theme-choice-btn.active {
  background: var(--slot-filled-bg);
  color: var(--primary);
  border-color: var(--primary);
}

.sign-out-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--danger);
  font-size: 15px;
  font-weight: 600;
}

.sign-out-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
}

.sign-out-icon svg {
  width: 18px;
  height: 18px;
}

/* Slider ukuran font di halaman Profile */
.font-size-control {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.font-size-preview-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.font-size-preview {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.font-size-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
}

.font-size-slider {
  width: 100%;
  height: 22px;
  margin: 10px 0 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.font-size-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--primary) 0%,
    var(--primary) var(--slider-fill, 25%),
    var(--border) var(--slider-fill, 25%),
    var(--border) 100%
  );
}

.font-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--card-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.font-size-slider::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
}

.font-size-slider::-moz-range-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--primary);
}

.font-size-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--card-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.font-size-slider:focus {
  outline: none;
}

.font-size-slider:focus::-webkit-slider-thumb,
.font-size-slider:focus::-moz-range-thumb {
  box-shadow: 0 0 0 4px var(--focus-ring);
}

/* Lightbox foto bukti (zoom in/out, geser, tutup) */
.keypad-overlay.photo-lightbox-overlay {
  align-items: center;
  z-index: 200;
  background: rgba(10, 10, 12, 0.92);
  padding: 0;
}

.photo-lightbox {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  animation: none;
}

.photo-lightbox-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
}

.photo-lightbox-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.photo-lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.photo-lightbox-btn:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  cursor: not-allowed;
}

.photo-lightbox-zoom-level {
  flex: 0 0 auto;
  min-width: 48px;
  text-align: center;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.photo-lightbox-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  margin-left: 12px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.photo-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.photo-lightbox-viewport {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
}

.photo-lightbox-viewport.is-zoomed {
  cursor: grab;
}

.photo-lightbox-viewport.is-dragging {
  cursor: grabbing;
}

.photo-lightbox-viewport img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.photo-lightbox-viewport img.is-transitioning {
  transition: transform 0.15s ease;
}
