/* ============================================
   dnevnice.si — Custom Theme
   Modern, polished business SaaS styling
   Layered on top of Pico CSS
   ============================================ */

/* --- Design Tokens --- */
:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-300: #93c5fd;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;

  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;

  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-500: #3b82f6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.15);
  --shadow-glow-lg: 0 0 40px rgba(37, 99, 235, 0.2);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Pico Overrides --- */
[data-theme="light"],
:root:not([data-theme="dark"]) {
  --pico-primary: var(--brand-600);
  --pico-primary-hover: var(--brand-700);
  --pico-primary-focus: rgba(37, 99, 235, 0.15);
  --pico-primary-background: var(--brand-600);
  --pico-primary-hover-background: var(--brand-700);
  --pico-primary-inverse: #fff;
  --pico-background-color: #fff;
  --pico-card-background-color: #fff;
  --pico-card-sectioning-background-color: var(--gray-50);
  --pico-border-radius: var(--radius-md);
  --pico-form-element-border-color: var(--gray-200);
  --pico-form-element-focus-color: var(--brand-600);
  --pico-color: var(--gray-800);
  --pico-h1-color: var(--gray-900);
  --pico-h2-color: var(--gray-900);
  --pico-h3-color: var(--gray-800);
  --pico-muted-color: var(--gray-500);
  --pico-muted-border-color: var(--gray-200);
  --pico-card-border-color: var(--gray-200);
  --pico-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* --- Base / Typography --- */
html {
  scroll-behavior: smooth;
}

body {
  background: var(--gray-50);
  color: var(--gray-700);
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

small {
  color: var(--gray-500);
}

/* --- Navbar --- */
nav.site-nav {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  margin: 0;
}

nav.site-nav > .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

nav.site-nav .nav-brand a {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gray-900);
  text-decoration: none;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav.site-nav .nav-brand .brand-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
}

nav.site-nav .nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media (min-width: 769px) {
  nav.site-nav .nav-links {
      margin-left: 10px;
  }
}

nav.site-nav .nav-links a {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

nav.site-nav .nav-links a:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

nav.site-nav .nav-links a.active {
  color: var(--brand-600);
  background: var(--brand-50);
}

nav.site-nav .nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}


nav.site-nav .nav-actions .nav-link-plain {
  color: var(--gray-600);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

nav.site-nav .nav-actions .nav-link-plain:hover {
  color: var(--gray-900);
  background: var(--gray-100);
}

nav.site-nav .btn-ghost {
  background: none;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin: 0;
  line-height: 1.4;
}

nav.site-nav .btn-ghost:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: none;
  box-shadow: none;
}

nav.site-nav .btn-primary-sm {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  border: none;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

nav.site-nav .btn-primary-sm:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* --- Nav menu wrapper --- */
nav.site-nav .nav-menu {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-between;
}

/* When there are no nav-links (logged-out), push actions to the right */
nav.site-nav .nav-menu > .nav-actions:first-child {
  margin-left: auto;
}

/* --- Mobile nav --- */
nav.site-nav .nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--gray-700);
  margin: 0;
}

nav.site-nav .nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  margin: 4px 0;
  border-radius: 1px;
  transition: all 0.25s ease;
  transform-origin: center;
}

/* Hamburger → X animation */
nav.site-nav.open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

nav.site-nav.open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

nav.site-nav.open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 768px) {
  nav.site-nav .nav-toggle {
    display: block;
  }

  nav.site-nav .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh; /* explicit dimensions needed: backdrop-filter on nav creates a containing block for fixed children */
    width: 100vw;
    background: #fff;
    z-index: 99;
    padding-top: 4.5rem;
    overflow-y: auto;
    flex-direction: column;
    align-items: stretch;
  }

  nav.site-nav.open .nav-menu {
    display: flex;
  }

  nav.site-nav .nav-menu .nav-links,
  nav.site-nav .nav-menu .nav-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    list-style: none;
    padding: 0.5rem 1.5rem;
    margin: 0;
    gap: 0;
  }

  nav.site-nav .nav-menu .nav-links a {
    padding: 0.875rem 0.75rem;
    width: 100%;
    display: block;
    font-size: 1rem;
    border-radius: var(--radius-sm);
  }

  nav.site-nav .nav-menu .nav-links a.active {
    color: var(--brand-600);
    background: var(--brand-50);
    font-weight: 600;
  }

  nav.site-nav .nav-menu .nav-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    margin-top: auto;
  }

  /* Keep brand + toggle above the menu overlay */
  nav.site-nav .nav-brand,
  nav.site-nav .nav-toggle {
    position: relative;
    z-index: 101;
  }
}

/* --- Main content --- */
main.container {
  max-width: 1000px;
  padding: 2rem 1.5rem 4rem;
}

/* --- Buttons --- */
[role="button"],
button,
input[type="submit"] {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.25rem;
  transition: all var(--transition-fast);
  cursor: pointer;
  letter-spacing: -0.01em;
  position: relative;
}

[role="button"]:not(.outline):not(.secondary),
button[type="submit"],
input[type="submit"] {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

[role="button"]:not(.outline):not(.secondary):hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[role="button"]:not(.outline):not(.secondary):active,
button[type="submit"]:active,
input[type="submit"]:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.outline,
[role="button"].outline,
button.outline {
  background: transparent;
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  box-shadow: var(--shadow-xs);
}

.outline:hover,
[role="button"].outline:hover,
button.outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.secondary,
[role="button"].secondary,
button.secondary {
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  color: var(--gray-700);
  box-shadow: var(--shadow-xs);
}

.secondary:hover,
[role="button"].secondary:hover,
button.secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* --- Cards / Articles --- */
article {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}

article:hover {
  box-shadow: var(--shadow-md);
}

article > header {
  background: transparent;
  border-bottom: 1px solid var(--gray-100);
  padding: 0 0 1rem 0;
  margin: -1.5rem -1.5rem 1.5rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

article > header h2,
article > header h3 {
  margin: 0;
}

article > footer {
  background: transparent;
  border-top: 1px solid var(--gray-100);
  padding: 1.25rem 1.5rem 0;
  margin: 1.5rem -1.5rem 0;
}

/* --- Forms --- */
input, select, textarea {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm) !important;
  background: #fff;
  font-size: 0.875rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

fieldset {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

legend {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  padding: 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --- Tables --- */
table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.875rem;
}

thead th {
  background: var(--gray-50);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--gray-200);
}

tbody td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--brand-50);
}

figure {
  overflow-x: auto;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin: 0;
  background: #fff;
}

figure table {
  margin: 0;
}

/* --- Status badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.badge-draft {
  background: var(--gray-100);
  color: var(--gray-600);
}

.badge-draft::before {
  background: var(--gray-400);
}

.badge-approved {
  background: var(--blue-50);
  color: var(--brand-700);
}

.badge-approved::before {
  background: var(--brand-500);
}

.badge-completed {
  background: var(--green-50);
  color: var(--green-700);
}

.badge-completed::before {
  background: var(--green-500);
}

.badge-cancelled {
  background: var(--red-50);
  color: var(--red-600);
}

.badge-cancelled::before {
  background: var(--red-500);
}

/* --- Alerts --- */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.alert::before {
  font-size: 1rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.alert-error {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-error::before {
  content: "\26A0";
}

.alert-success {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-success::before {
  content: "\2713";
}

/* --- Dashboard stat cards --- */
.stat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-200);
  transform: translateY(-3px);
}

.stat-card:hover::after {
  opacity: 1;
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.stat-card .stat-icon.purple {
  background: var(--brand-50);
  color: var(--brand-600);
}

.stat-card .stat-icon.green {
  background: var(--green-50);
  color: var(--green-600);
}

.stat-card .stat-icon.amber {
  background: var(--amber-50);
  color: var(--amber-600);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.stat-card .stat-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.75rem;
}

.stat-card .stat-action {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-600);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* --- Hero section (landing) --- */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--gray-900);
  margin-bottom: 1.25rem;
}

.hero h1 .text-gradient {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .hero-sub {
  font-size: 1.2rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero .hero-actions {
  display: flex;
  gap: 0.875rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .hero-actions .btn-hero {
  padding: 0.85rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.hero .hero-actions .btn-hero-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.hero .hero-actions .btn-hero-primary:hover {
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.hero .hero-actions .btn-hero-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.hero .hero-actions .btn-hero-secondary {
  background: #fff;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.hero .hero-actions .btn-hero-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* --- Hero decoration --- */
.hero-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: -1;
}

.hero-glow-1 {
  background: var(--brand-400);
  top: -100px;
  right: -150px;
}

.hero-glow-2 {
  background: var(--brand-300);
  bottom: -200px;
  left: -200px;
  opacity: 0.1;
}

/* --- Feature cards (landing) --- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity var(--transition-base);
}

.feature-card:nth-child(1)::before { background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); }
.feature-card:nth-child(2)::before { background: linear-gradient(90deg, var(--green-500), var(--green-600)); }
.feature-card:nth-child(3)::before { background: linear-gradient(90deg, var(--amber-500), var(--amber-600)); }

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
  transform: translateY(-4px);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
}

.feature-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.65;
  margin: 0;
}

@media (max-width: 768px) {
  .features {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 2.25rem;
  }
}

/* --- How it works section (landing) --- */
.how-it-works {
  padding: 4rem 0 2rem;
}

.how-it-works .section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-600);
  margin-bottom: 0.5rem;
}

.how-it-works .section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--gray-900);
  margin-bottom: 3rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
}

.steps-grid::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 16.66%;
  right: 16.66%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 auto 1.25rem;
  position: relative;
}

.step-number-1 {
  background: var(--brand-50);
  color: var(--brand-600);
  border: 2px solid var(--brand-200);
}

.step-number-2 {
  background: var(--green-50);
  color: var(--green-600);
  border: 2px solid var(--green-100);
}

.step-number-3 {
  background: var(--amber-50);
  color: var(--amber-600);
  border: 2px solid var(--amber-100);
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.875rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin: 0;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .steps-grid::before {
    display: none;
  }
}

/* --- Social proof strip --- */
.trust-strip {
  text-align: center;
  padding: 2.5rem 1rem 0;
  color: var(--gray-400);
  font-size: 0.8rem;
  font-weight: 500;
}

.trust-strip .trust-items {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.trust-strip .trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-500);
  font-size: 0.8rem;
  font-weight: 500;
}

.trust-strip .trust-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

/* --- CTA banner (landing) --- */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  margin-top: 4rem;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.cta-banner::after {
  content: "";
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 50%;
  pointer-events: none;
}

.cta-banner h2 {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.cta-banner .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: var(--brand-700);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

.cta-banner .btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

/* --- Breadcrumbs --- */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
}

.breadcrumb li {
  padding: 0;
}

.breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand-600);
  text-decoration: underline;
}

.breadcrumb li::before {
  content: "/";
  margin: 0 0.5rem;
  color: var(--gray-300);
}

.breadcrumb li:first-child::before {
  content: none;
}

/* --- Pricing cards --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all var(--transition-base);
  position: relative;
}

.pricing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.pricing-card.featured {
  border-color: var(--brand-400);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--brand-400);
}

.pricing-card.featured:hover {
  box-shadow: var(--shadow-xl), 0 0 0 1px var(--brand-400), var(--shadow-glow);
}

.pricing-card .pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.pricing-card .pricing-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.pricing-card .pricing-price {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.pricing-card .pricing-price small {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
}

.pricing-card .pricing-features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.pricing-card .pricing-features li {
  font-size: 0.85rem;
  color: var(--gray-600);
  padding: 0.45rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-card .pricing-features li::before {
  content: "\2713";
  font-weight: 700;
  color: var(--brand-600);
  font-size: 0.8rem;
  width: 20px;
  height: 20px;
  background: var(--brand-50);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pricing-card .pricing-cta {
  display: block;
  text-align: center;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.pricing-card .pricing-cta-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pricing-card .pricing-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.pricing-card .pricing-cta-outline {
  background: transparent;
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.pricing-card .pricing-cta-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
}

/* --- Auth forms (login/register) --- */
.auth-wrapper {
  max-width: 420px;
  margin: 2rem auto;
}

.auth-wrapper article {
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-md);
}

.auth-wrapper h2 {
  font-size: 1.5rem;
  text-align: center;
}

.auth-wrapper p.auth-sub {
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.auth-wrapper button[type="submit"],
.auth-wrapper input[type="submit"] {
  width: 100%;
}

.auth-wrapper .auth-footer {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
}

/* --- Page headers --- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.page-header .btn-new {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.page-header .btn-new:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* --- Filters bar --- */
.filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.filters-bar select,
.filters-bar input[type="text"] {
  margin-bottom: 0;
  font-size: 0.85rem;
  min-width: 0;
  flex: 1;
  min-width: 140px;
}

.filters-bar button[type="submit"] {
  white-space: nowrap;
  flex: none;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .filters-bar select,
  .filters-bar input[type="text"] {
    flex: 1 1 100%;
  }
}

/* --- Detail pages --- */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.detail-header .detail-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.detail-header h2 {
  margin: 0;
}

.detail-header .detail-meta {
  color: var(--gray-500);
  font-size: 0.8rem;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.detail-actions form {
  display: flex;
  margin: 0;
}

.detail-actions a,
.detail-actions button {
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  margin: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .detail-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }

  .detail-actions a,
  .detail-actions button {
    padding: 0.5rem 0.5rem;
    font-size: 0.75rem;
    width: 100%;
  }
}

.outline.btn-danger-outline,
button.outline.btn-danger-outline {
  background: var(--red-50);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--red-600);
}

.outline.btn-danger-outline:hover,
button.outline.btn-danger-outline:hover {
  background: var(--red-100);
  border-color: var(--red-500);
  color: var(--red-600);
}

/* --- Info grid (order detail sections) --- */
.info-section {
  margin-bottom: 1.5rem;
}

.info-section .info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-400);
  margin-bottom: 0.15rem;
}

.info-section .info-value {
  font-size: 0.95rem;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

/* --- Empty state --- */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--gray-400);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: var(--gray-100);
  border-radius: 50%;
  margin: 0 auto 1.25rem;
}

.empty-state p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--gray-500);
}

.empty-state .btn-new {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  margin-top: 1.25rem;
}

.empty-state .btn-new:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

/* --- Footer --- */
footer.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--gray-400);
  font-size: 0.8rem;
  border-top: 1px solid var(--gray-100);
  margin-top: 2rem;
}

footer.site-footer .footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 768px) {
  footer.site-footer .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
  }
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* --- Grid override for dashboard --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Welcome bar (dashboard) --- */
.welcome-bar {
  margin-bottom: 2rem;
}

.welcome-bar h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.welcome-bar p {
  color: var(--gray-500);
  font-size: 0.9rem;
  margin: 0;
}

/* --- Inline action buttons (tables) --- */
.row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.row-actions a {
  font-size: 0.8rem;
  color: var(--brand-600);
  text-decoration: none;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.row-actions a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
}

.row-actions button {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  margin: 0;
  background: transparent;
  border: 1px solid var(--gray-200);
  color: var(--gray-500);
  box-shadow: none;
}

.row-actions button:hover {
  color: var(--red-600);
  border-color: var(--red-500);
  background: var(--red-50);
  transform: none;
  box-shadow: none;
}

/* --- Back link --- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--gray-500);
  text-decoration: none;
  margin-top: 1.5rem;
}

.back-link:hover {
  color: var(--brand-600);
}

/* --- Error pages --- */
.error-page {
  text-align: center;
  padding: 4rem 1rem 6rem;
  max-width: 480px;
  margin: 0 auto;
}

.error-page .error-code {
  font-size: 8rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand-300), var(--brand-500));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
  user-select: none;
}

.error-page .error-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}

.error-page .error-message {
  font-size: 1rem;
  color: var(--gray-500);
  line-height: 1.6;
  margin-bottom: 2.5rem;
}

.error-page .error-actions .btn-hero {
  padding: 0.75rem 2rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.error-page .error-actions .btn-hero-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.error-page .error-actions .btn-hero-primary:hover {
  box-shadow: 0 6px 24px rgba(37, 99, 235, 0.4);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .error-page .error-code {
    font-size: 5rem;
  }

  .error-page {
    padding: 2.5rem 1rem 4rem;
  }
}

/* --- Smooth load animation --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main.container > * {
  animation: fadeInUp 0.4s ease-out both;
}

main.container > *:nth-child(2) { animation-delay: 0.05s; }
main.container > *:nth-child(3) { animation-delay: 0.1s; }
main.container > *:nth-child(4) { animation-delay: 0.15s; }
main.container > *:nth-child(5) { animation-delay: 0.2s; }
main.container > *:nth-child(6) { animation-delay: 0.25s; }

/* --- Form details (collapsible sections) --- */
.form-details {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  padding: 0;
}

.form-details > summary {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-800);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1rem 1.5rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-details > summary::-webkit-details-marker {
  display: none;
}

.form-details > summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-400);
  background-image: none;
  transition: transform var(--transition-fast);
}

.form-details[open] > summary::after {
  content: "\2212";
}

.form-details > summary:hover {
  color: var(--brand-600);
}

.form-details-body {
  padding: 0 1.5rem 1.5rem;
}

/* --- Form hint text --- */
.form-hint {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--gray-500);
  font-size: 0.8rem;
}

.form-hint-auto {
  display: block;
  margin-top: 0.35rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
  color: var(--pico-primary);
  background: color-mix(in srgb, var(--pico-primary) 8%, white);
  border-left: 3px solid var(--pico-primary);
  border-radius: 2px;
}

/* --- Form meta text --- */
.form-meta {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* --- Last trip shortcut hint --- */
.last-trip-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--blue-50);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.last-trip-hint a {
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.last-trip-hint a:hover {
  text-decoration: underline;
}

.last-trip-dismiss {
  background: none !important;
  border: none !important;
  color: var(--gray-400) !important;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.25rem !important;
  margin-left: auto;
  line-height: 1;
  box-shadow: none !important;
}

.last-trip-dismiss:hover {
  color: var(--gray-600) !important;
  transform: none !important;
  box-shadow: none !important;
}


/* --- Draft restore prompt --- */
.alert-info {
  background: var(--blue-50);
  color: var(--blue-500);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.alert-info a {
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: none;
}

.alert-info a:hover {
  text-decoration: underline;
}

/* --- Inline validation --- */
.field-error {
  display: block;
  color: var(--red-600);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

.field-warning {
  display: block;
  color: var(--amber-600);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--red-500) !important;
}

input[aria-invalid="true"]:focus,
select[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

input[aria-invalid="false"],
select[aria-invalid="false"] {
  border-color: var(--green-500) !important;
}

input[aria-invalid="false"]:focus,
select[aria-invalid="false"]:focus {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15) !important;
}

/* --- Form action buttons --- */
.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.form-actions button,
.form-actions a {
  flex: 1;
  min-width: 120px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

/* --- Mobile sticky cost preview footer --- */
.mobile-cost-footer {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--gray-200);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  padding: 0.75rem 1.25rem;
}

.mobile-cost-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  cursor: pointer;
}

.mobile-cost-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mobile-cost-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

/* Only show on mobile */
@media (min-width: 769px) {
  .mobile-cost-footer {
    display: none !important;
  }
}

@media (max-width: 768px) {
  /* Make meal checkboxes larger touch targets on mobile */
  .meal-checkbox {
    display: block;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
  }

  /* Add padding at bottom for mobile footer */
  .form-actions {
    padding-bottom: 4rem;
  }
}

/* --- Status stepper (order detail) --- */
.status-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 1rem 0;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--gray-200);
  border: 2px solid var(--gray-300);
  transition: all var(--transition-fast);
}

.step-done .step-dot {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.step-current .step-dot {
  background: #fff;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.step-done .step-label {
  color: var(--brand-600);
}

.step-current .step-label {
  color: var(--gray-700);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin: 0 0.5rem;
  margin-bottom: 1.5rem;
  min-width: 2rem;
}

.step-line-done {
  background: var(--brand-600);
}

.stepper-hint {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-color);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.stepper-hint-action {
  color: var(--brand-700, #1a56db);
  background: var(--brand-50, #eff6ff);
  border: 1px solid var(--brand-200, #bfdbfe);
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
  margin-top: 0;
}

/* --- Planned values summary (expense report) --- */
.planned-summary {
  background: var(--gray-50);
  border-color: var(--gray-200);
}

/* --- Purpose cell truncation (orders table) --- */
.purpose-cell {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 280px;
}

/* --- Order cards --- */
.orders-table-desktop {
  display: none;
}

.order-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.order-card {
  display: block;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}

.order-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-200);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.order-card-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-800);
}

.order-card-destination {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.order-card-meta {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.75rem;
}

.order-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px solid var(--gray-100);
}

.order-card-open {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand-600);
}

.order-card-copy {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-500);
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .order-cards {
    grid-template-columns: 1fr;
  }
}

/* --- File upload area --- */
.file-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: none;
  letter-spacing: normal;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--brand-400);
  background: var(--brand-50);
}

.file-upload-area.file-selected {
  border-color: var(--green-500);
  background: var(--green-50);
}

.file-upload-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

.file-upload-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.25rem;
}

.file-upload-hint {
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 400;
}

/* --- Settings hub --- */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.settings-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
}

.settings-card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.settings-card:hover .settings-card-arrow {
  color: var(--brand-600);
  transform: translateX(2px);
}

.settings-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-card-icon.amber { background: var(--amber-50); color: var(--amber-600); }
.settings-card-icon.purple { background: var(--brand-50); color: var(--brand-600); }
.settings-card-icon.green { background: var(--green-50); color: var(--green-600); }
.settings-card-icon.blue { background: var(--blue-50, #eff6ff); color: var(--brand-600); }

.settings-card-body {
  flex: 1;
  min-width: 0;
}

.settings-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.3;
}

.settings-card-desc {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.15rem;
}

.settings-card-arrow {
  color: var(--gray-300);
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.settings-support {
  margin-top: 2rem;
  font-size: 0.8rem;
  color: var(--gray-400);
  text-align: center;
}

.settings-support a {
  color: var(--gray-500);
  text-decoration: underline;
}

@media (max-width: 768px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Breadcrumb spacing --- */
nav[aria-label="Breadcrumb"] {
  padding: 0;
  margin: 0;
  display: block;
}

nav[aria-label="Breadcrumb"] .breadcrumb li {
  list-style: none;
}

.breadcrumb {
  margin-bottom: 1rem;
}

/* --- Transport type picker --- */
.transport-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.transport-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: none;
  letter-spacing: normal;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-500);
  text-align: center;
  user-select: none;
}

.transport-option svg {
  color: var(--gray-400);
  transition: color var(--transition-fast);
  flex-shrink: 0;
}

.transport-option:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
  color: var(--gray-700);
}

.transport-option:hover svg {
  color: var(--gray-500);
}

.transport-option.active {
  border-color: var(--brand-500);
  background: var(--brand-50);
  color: var(--brand-700);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.transport-option.active svg {
  color: var(--brand-600);
}

@media (max-width: 768px) {
  .transport-picker {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Litepicker date range picker overrides --- */
:root {
  --litepicker-container-months-color-bg: #fff;
  --litepicker-container-months-box-shadow-color: rgba(0, 0, 0, 0.08);
  --litepicker-month-header-color: var(--gray-800);
  --litepicker-month-weekday-color: var(--gray-400);
  --litepicker-month-week-number-color: var(--gray-400);
  --litepicker-day-color: var(--gray-700);
  --litepicker-day-color-hover: var(--brand-600);
  --litepicker-day-width: 38px;
  --litepicker-month-width: calc(var(--litepicker-day-width) * 7);
  --litepicker-is-today-color: var(--brand-600);
  --litepicker-is-in-range-color: var(--brand-50);
  --litepicker-is-start-color: #fff;
  --litepicker-is-start-color-bg: var(--brand-600);
  --litepicker-is-end-color: #fff;
  --litepicker-is-end-color-bg: var(--brand-600);
  --litepicker-is-locked-color: var(--gray-300);
  --litepicker-button-prev-month-color: var(--gray-500);
  --litepicker-button-prev-month-color-hover: var(--brand-600);
  --litepicker-button-next-month-color: var(--gray-500);
  --litepicker-button-next-month-color-hover: var(--brand-600);
  --litepicker-button-reset-color: var(--gray-400);
  --litepicker-button-reset-color-hover: var(--brand-600);
  --litepicker-highlighted-day-color: var(--brand-700);
  --litepicker-highlighted-day-color-bg: var(--brand-50);
  --litepicker-tooltip-color-bg: var(--gray-800);
  --litepicker-footer-color-bg: var(--gray-50);
  --litepicker-footer-box-shadow-color: rgba(0, 0, 0, 0.04);
  --litepicker-button-cancel-color: var(--gray-600);
  --litepicker-button-cancel-color-bg: var(--gray-100);
  --litepicker-button-apply-color: #fff;
  --litepicker-button-apply-color-bg: var(--brand-600);
}

.litepicker {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875em;
}

.litepicker .container__months {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-200);
}

.litepicker .container__months .month-item-header {
  font-weight: 700;
  font-size: 0.95em;
}

.litepicker .container__days .day-item {
  border-radius: 6px;
  font-weight: 500;
}

.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date {
  font-weight: 700;
  border-radius: 6px;
}

.litepicker .container__days .day-item.is-in-range {
  border-radius: 0;
}

.litepicker .container__days .day-item.is-today {
  font-weight: 700;
}

.litepicker .container__tooltip {
  background-color: var(--gray-800);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  padding: 4px 10px;
}

@media (max-width: 768px) {
  .litepicker .container__months {
    width: calc(var(--litepicker-month-width) + 10px) !important;
  }
}
