:root {
  --bg-body: #f4f6fb;
  --bg-muted: #eef2ff;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --border: #e2e8f0;
  --border-strong: #cbd5f5;
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --radius: 16px;
  --header-height: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg-body);
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

.header-logo-text {
  height: 20px;
  width: auto;
  display: inline-block;
}

.header-title .app-name {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.header-title .view-name {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo-icon {
  height: 48px;
  width: auto;
  display: block;
  margin-left: 8px;
}

.license-wrapper {
  padding: 8px 8px;
}

.license-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.license-banner-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.license-banner-cta:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.5);
  outline-offset: 2px;
}

.license-wrapper + .page-content {
  padding-top: 4px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
  min-width: 200px;
}

.header-dates {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.header-date-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-date-field input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  min-width: 150px;
}

.header-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  line-height: 1.4;
}

.hamburger-button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}

.hamburger-button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.hamburger-icon span {
  display: block;
  height: 2px;
  border-radius: 4px;
  background: currentColor;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 6px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all .2s;
}

.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.prominent {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 26px;
  font-size: 15px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transition: all .2s;
}

.btn.prominent:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.filters-toggle-like {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--surface);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transition: all .2s;
}

.filters-toggle-like:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn.ghost {
  background: var(--surface);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  z-index: 45;
  display: none;
}

.app-drawer {
  position: fixed;
  inset: 0 60% 0 0;
  max-width: 320px;
  background: var(--surface);
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.25);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: 50;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body[data-drawer-open="1"] .app-drawer {
  transform: translateX(0);
}

body[data-drawer-open="1"] .drawer-overlay {
  display: block;
}

.drawer-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  padding-bottom: 6px;
}

.drawer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 110px;
  margin: 0 auto;
}

.drawer-brand img {
  width: 100%;
  height: auto;
  display: block;
}

.drawer-close {
  align-self: flex-end;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
}

.drawer-close:hover {
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: var(--accent);
}

.drawer-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.drawer-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 4px -4px 0;
}

.drawer-close-icon {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-block;
}

.drawer-close-icon::before,
.drawer-close-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform-origin: center;
}

.drawer-close-icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.drawer-close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.drawer-client {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.drawer-user {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.drawer-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.drawer-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: border-color .2s, background .2s, color .2s;
}

.drawer-link:hover {
  border-color: var(--border-strong);
  background: var(--surface-alt);
  color: var(--accent);
}

.drawer-link.is-active {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

.drawer-link.logout {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.drawer-link.logout:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

.pane-toggle-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  transition: all .2s;
}

.pane-toggle-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pane-toggle-icon {
  display: inline-block;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 8px solid currentColor;
  transition: transform .2s ease;
}

#stops-pane[data-collapsed="1"] .pane-toggle-icon {
  transform: rotate(180deg);
}
.status-table {
  width: 100%;
  border-collapse: collapse;
}

.status-table th,
.status-table td {
  text-align: center;
  padding: 8px;
  border-bottom: 1px solid #e5e7eb;
}

.status-table th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.status-table td {
  font-size: 14px;
  color: var(--text);
}
.history-table {
  width: 100%;
}

.history-table ul {
  margin: 6px 0;
  padding-left: 18px;
  color: var(--text);
}

.history-table ol {
  margin: 6px 0;
  padding-left: 18px;
  color: var(--text);
}

.history-table small {
  color: var(--text-muted);
}

.req-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
}

.req-status.req-status-pending {
  border-color: #fcd34d;
  background: #fff7ed;
  color: #92400e;
}

.req-status.req-status-ok {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.req-status.req-status-approved {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.req-status.req-status-paid {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.req-status.req-status-error {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}

.req-status.req-status-rejected {
  border-color: #fecaca;
  background: #fee2e2;
  color: #b91c1c;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

.badge-ok {
  border-color: #c7f9cc;
  background: #ecfdf3;
  color: #166534;
}

.badge-warn {
  border-color: #fecdd3;
  background: #fef2f2;
  color: #b91c1c;
}

.badge-muted {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #475569;
}

.badge-info {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-pending {
  border-color: #fbbf24;
  background: #fef3c7;
  color: #92400e;
}
.form-hint {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  color: #64748b;
  background: rgba(248, 250, 252, 0.95);
  border-radius: 999px;
  padding: 4px 14px;
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  width: fit-content;
  max-width: 100%;
  font-weight: 500;
}
