/* Putopilot: light surfaces, restrained glass and a single control language. */
:root {
  --paper: #eef5f4;
  --white: #fff;
  --ink: #183735;
  /* Sitni opisi moraju imati barem 4.5:1 i na podlozi i na zelenoj plohi. */
  --sub: #5c726e;
  --green: #147c67;
  --lime: #edf6d7;
  --rail: #183735;
  --line: #dbe7e3;
  --mint: #e8f3ef;
  --radius: 22px;
  --shadow: 0 12px 36px #244c3d08;
  --glass: #ffffffb8;
  --control: #ffffffee;
}
html { background: var(--paper); }
body {
  background: radial-gradient(ellipse at 6% 4%, #dbebe6 0, transparent 46%),
    radial-gradient(ellipse at 97% 8%, #edf2e2 0, transparent 38%), #f3f7f6;
  background-attachment: fixed;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; }
h1 { font-weight: 650; letter-spacing: -1.2px; }
a { color: var(--green); }
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #147d68; outline-offset: 3px;
}
.shell { grid-template-columns: 250px minmax(0, 1fr); }
.sidebar {
  width: 250px; padding: 32px 20px 20px;
  background: #ffffffa8; color: var(--ink);
  border-right: 1px solid #ffffff; overflow-y: auto;
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.sidebar .logo { width: 181px; margin: 4px 12px 32px; }
.org-select { padding: 0; border: 0; background: none; margin: 0 0 25px; }
.org-select label { color: var(--sub); margin: 0 12px 8px; font-size: 10px; }
.org-select select { color: var(--ink); background: var(--control); }
.nav-label { color: #5f786c; font-size: 10px; letter-spacing: 1.2px; }
.nav-item { color: #526f65; min-height: 46px; border-radius: 14px; padding: 12px 14px; }
.nav-item:hover { color: var(--ink); background: #e1ede88f; }
.nav-item.active {
  color: #126451; background: #dcece5; box-shadow: inset 0 1px 0 #ffffffe6;
}
.nav-item .count { background: #d9e7df; }
.sidebar-note { display: none; }
.sidebar-note strong { color: var(--ink); }
.sidebar-note .icon { color: var(--green); }
.profile { border-top-color: var(--line); padding-top: 18px; }
.profile-info strong { color: var(--ink); }
.profile-info span { color: var(--sub); }
.profile .icon-btn { color: var(--sub); }
.avatar, .profile .avatar { color: #286551; background: #deebe4; border-radius: 50%; }
.topbar {
  height: 82px; position: sticky; top: 0; z-index: 30;
  background: #f9fcf9b8; border-bottom: 1px solid #ffffffdd;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.content { max-width: 1480px; padding: 38px 40px 70px; }
.page-title { margin-bottom: 30px; }
.page-title p { line-height: 1.65; }
.btn, .icon-btn {
  border-radius: 13px; border-color: #d8e5df; background: #ffffffdf;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn { min-height: 44px; padding: 11px 17px; font-size: 13px; font-weight: 600; }
.btn:hover, .icon-btn:hover { background: #f4f9f6; border-color: #adc9bd; }
.btn.primary { background: #147d68; border-color: #147d68; box-shadow: 0 4px 12px #147d6818; }
.btn.primary:hover { background: #0f6756; border-color: #0f6756; }
.btn.soft { background: #e5f1eb; border-color: transparent; color: #166d58; }
.btn.soft:hover { background: #d8e9df; }
.btn.light { background: #edf6d7; color: var(--ink); border-color: transparent; }
.btn.link { background: none; border: none; min-height: 36px; padding: 4px 0; }
.btn.small { font-size: 12px; min-height: 36px; padding: 8px 12px; }
.icon-btn { width: 40px; height: 40px; }
.card, .stat {
  background: #ffffffdc; border: 1px solid #ffffff;
  box-shadow: 0 3px 22px #20473405;
}
.stat { padding: 24px; }
.stat.accent { background: #e5f0e8d9; border-color: #edf6ef; }
.stat.accent .stat-value { color: #21634f; }
.stat-top { color: var(--sub); }
.stat-top .icon { color: #73a18b; }
.card-head { padding: 24px 25px 18px; }
.card-body { padding: 0 25px 25px; }
.hero-card {
  color: var(--ink); background: linear-gradient(125deg, #dfebe3, #edf3e4);
  border: 1px solid #ffffff; box-shadow: none; padding: 27px;
}
.hero-card h2 { color: var(--ink); }
.hero-card p { color: #587169; font-size: 13px; }
.hero-card .eyebrow { color: #527568; }
.hero-card:after { border-color: #769f8b25; box-shadow: 0 0 0 28px #ffffff1f, 0 0 0 58px #ffffff14; }
.quick-action { background: #ffffffdc; border-color: #ffffff; border-radius: 20px; }
.quick-action:first-child { background: #dfeede; border-color: #eaf5e6; }
.quick-action:hover { border-color: #abc5b3; background: #eff6ed; transform: none; }
.row-icon { background: #ecf3ee; color: #508573; }
.list-row { border-top-color: #e8efeb; }
.list-row:hover { background: #f7faf8; }
.badge { border-radius: 7px; }
.filterbar .search, .filterbar input[type=month], .date-tag { border-radius: 13px; background: var(--control); }
.search { min-height: 48px; }
.filterbar input[type=month], .filterbar select { min-height: 48px; color: var(--ink); }
.search input { font-size: 14px; }
.data-table th { background: #f7faf8; color: #637d70; }
.data-table td { padding-block: 18px; border-bottom-color: #e9f0eb; }
.data-table tbody tr:hover { background: #f7faf8; }
.tabs { background: #deebe4a1; border: 1px solid #ffffff; padding: 5px; border-radius: 15px; }
.tab { border-radius: 11px; min-height: 40px; font-size: 13px; }
.tab.active { box-shadow: 0 2px 7px #1c44350a; }
.form { gap: 24px; grid-template-columns: minmax(0, 1fr); }
.form > * { min-width: 0; }
.form-grid { gap: 22px 20px; }
.field { gap: 8px; }
.field label, .field-label, .receipt-extra-filters label, .foreign-time-part>span {
  color: #516b60; font-size: 13px; line-height: 1.5; font-weight: 550;
}
.field input, .field select, .field textarea, .foreign-time-part select,
.receipt-extra-filters select, .audit-filters select, .audit-filters input {
  border: 1px solid #d5e2db; border-radius: 14px; background: var(--control);
  color: var(--ink); min-height: 50px; font-size: 15px; padding: 12px 15px;
  box-shadow: 0 2px 5px #29483203; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #78aa93; box-shadow: 0 0 0 3px #147d6810;
}
.field input[readonly], .field textarea[readonly] { background: #f2f6f2; color: #5e7568; }
.field input[readonly][type=number] { appearance: textfield; -moz-appearance: textfield; }
.field input[readonly]::-webkit-inner-spin-button,
.field input[readonly]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.field textarea { min-height: 104px; line-height: 1.65; }
.field small, .helper { font-size: 12px; line-height: 1.7; color: #60766b; }
.field input::placeholder, .field textarea::placeholder { color: #65786c; }
.check-field { font-size: 13px; color: #526c60; gap: 10px; align-items: flex-start; }
.check-field input { width: 18px; height: 18px; flex: none; margin-top: 2px; }
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px #f1f7f2 inset; -webkit-text-fill-color: #183735; }
.details, .trip-route-panel, .per-diem-control, .ai-report-tools,
.trip-stage-intro, .trip-receipt-tools {
  background: transparent; border: 0; border-radius: 0; box-shadow: none;
}
.details { border-top: 1px solid #dbe7e0; overflow: visible; }
.details summary { padding: 17px 0; font-size: 14px; color: var(--ink); }
.details summary::after { content: '⌄'; font-size: 18px; line-height: 1; }
.details[open] summary::after { content: '⌃'; }
.details-body { padding: 3px 0 22px; }
.details-body .details { margin-top: 18px; }
.per-diem-control { padding: 16px 0 0; border-top: 1px solid #dbe7e0; }
.per-diem-control [data-foreign-diem] { border-top-color: #dbe7e0; padding-top: 20px; }
.per-diem-control [data-per-diem-inputs] { gap: 20px; }
.per-diem-control>small { font-size: 12px; }
.per-diem-amount { padding-top: 12px; }
.fixed-tariff { padding: 0; gap: 6px; }
.fixed-tariff output { display: block; font-size: 28px; font-weight: 650; color: #176b56; letter-spacing: -.8px; line-height: 1.5; }
.fixed-tariff small { max-width: 450px; }
.foreign-country-name { font-size: 15px; }
.foreign-period-details { background: none; }
.foreign-time-controls { background: none; padding: 0; border: 0; }
.foreign-fixed-date { background: none; border: 0; border-radius: 0; padding: 5px 0; }
.foreign-fixed-date>span { font-size: 12px; color: var(--sub); }
.foreign-fixed-date>strong { color: var(--ink); font-size: 14px; }
.foreign-time-proposal, .per-diem-planned { border: 0; border-left: 2px solid #dac696; border-radius: 0; background: #faf7ee; }
.meal-row { border: 0; border-bottom: 1px solid #e1e9e2; border-radius: 0; padding: 13px 0; background: none; font-size: 12px; }
.trip-stage-intro { padding: 0; margin: 12px 0 4px; }
.trip-stage-intro .helper { margin-bottom: 10px; }
.trip-receipt-tools { padding: 0 0 20px; margin-bottom: 0; border-bottom: 1px solid #dbe7e0; }
.trip-receipt-tools p { line-height: 1.7; }
.document-handoff-note { background: transparent; border: 0; border-radius: 0; padding: 0 0 18px; color: var(--sub); font-size: 12px; }
.document-handoff-note strong { color: #527566; font-size: 12px; }
.document-handoff-note .icon { color: #6d9781; }
.trip-receipt-actions { gap: 14px; }
.trip-receipt-actions .btn.soft { background: transparent; border-color: #d4e3d8; }
.trip-route-panel { padding: 6px 0 18px; }
.trip-route-return { margin-top: 18px; }
.trip-route-preview { border: 0; padding-top: 8px; }
.place-actions { gap: 15px; }
.place-tools { margin-top: 2px; }
.place-tools>summary { font-size: 12px; color: #658875; cursor: pointer; padding: 4px 0; width: max-content; }
.place-tools .place-actions { margin-top: 7px; }
.place-actions .btn { font-size: 12px; min-height: 32px; padding: 3px 0; }
.place-results { gap: 4px; }
.place-option { background: #f1f7f2; border: 0; min-height: 46px; border-radius: 12px; font-size: 13px; }
.country-options { background: #fffffffa; border: 1px solid #dce7dc; border-radius: 18px; padding: 7px; box-shadow: 0 12px 32px #183b2b12; max-height: 260px; }
.country-option { min-height: 48px; padding: 12px 14px; font-size: 15px; border-radius: 11px; }
.country-option:hover, .country-option.active { background: #edf4e9; color: var(--ink); }
.country-option[aria-selected=true] { background: #e6eedf; color: #365b41; font-weight: 500; }
.country-option[aria-selected=true]::after { content: '✓'; float: right; margin-left: 12px; color: #6c8964; }
.notice { border: 0; border-left: 2px solid #c0d8c8; border-radius: 0 10px 10px 0; background: #edf5ef; padding: 12px 14px; color: #587060; line-height: 1.7; }
.notice.info { background: #f0f5f4; color: #53736b; border-color: #bfd7cf; }
.notice.warning { background: #faf7ed; color: #80672f; border-color: #dac796; }
.notice.error { border-color: #dbaa9f; }
.issue-row { background: #faf7ef; border: 0; border-radius: 9px; line-height: 1.65; padding: 12px; }
.completion-summary { background: #faf7ee; border: 0; border-radius: 14px; padding: 0; margin-bottom: 20px; }
.completion-summary>summary { display: flex; align-items: center; gap: 12px; padding: 14px 16px; list-style: none; cursor: pointer; font-size: 13px; color: #7d673c; }
.completion-summary>summary::-webkit-details-marker { display: none; }
.completion-summary>summary::after { content: '⌄'; margin-left: auto; font-size: 20px; }
.completion-summary[open]>summary::after { content: '⌃'; }
.completion-summary>summary strong { font-size: 13px; }
.completion-summary>summary span { color: #8e7c59; font-size: 12px; }
.completion-summary>summary .icon { color: #a48a4c; }
.completion-summary .completion-issues-list { margin: 0; padding: 0 16px 12px 34px; }
.completion-summary .completion-issue { padding: 9px 0; border-color: #e8deca; font-size: 12px; }
.completion-issue .btn { background: transparent; color: #7a632e; }
.completion-summary.complete { padding: 13px 16px; }
.completion-error { padding: 0 16px 15px; }
.modal-backdrop { background: #29473c55; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal {
  border-radius: 26px; background: #fbfdfb; border: 1px solid #ffffffe6;
  box-shadow: 0 28px 90px #153b2b24; max-height: 94dvh;
}
.modal.wide { width: min(1120px, 100%); }
.modal-head { background: #fbfdfbe6; border-bottom-color: #e3ebe4; padding: 24px 30px; }
.modal-head p { font-size: 12px; line-height: 1.6; max-width: 720px; }
.modal-head .icon-btn { background: transparent; border-color: #e0e9e2; }
.modal-body { padding: 26px 30px 30px; }
.modal-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; }
.modal-side { gap: 22px; border-left: 1px solid #e1eae2; padding-left: 26px; }
.modal-side .card { border: 0; box-shadow: none; background: transparent; border-radius: 0; overflow: visible; }
.modal-side .card-head { padding: 0 0 17px; flex-wrap: nowrap; }
.modal-side .card-body { padding: 0; }
.modal-side .card-head p { font-size: 12px; line-height: 1.65; }
.modal-side .summary-lines { gap: 14px; }
.modal-side .summary-line { font-size: 13px; }
.modal-side .issue-list { margin-top: 18px; }
.preview-rule { font-size: 11px; line-height: 1.65; color: #63796c; }
.form-actions { gap: 10px; padding-top: 20px; margin-top: 0; }
.upload-zone, .drive-launcher { border: 1px solid #ffffff; background: #e8f1e8ae; border-radius: 18px; }
.booking-summary { border: 0; background: transparent; }
.booking-originals { border: 1px solid #e4ece6; background: #f2f6f2; }
.booking-attachments { padding-inline: 0; }
.booking-data { padding-inline: 0; }
.booking-section-heading { background: none; border-bottom-color: #e3ebe4; }
.booking-attachment { background: none; border-color: #e1e9e2; }
.booking-form, .booking-submit { background: transparent; border: 0; border-radius: 0; padding-inline: 0; }
.collaboration-card, .client-card { box-shadow: 0 3px 22px #20473405; }
.client-counts { gap: 0; margin: 27px 0; }
.client-counts:has(>span:nth-child(4)),
.client-card:only-child .client-counts:has(>span:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.client-counts>span { background: none; border: 0; border-radius: 0; border-right: 1px solid #e1e9e2; min-height: 58px; padding: 0 13px; font-size: 12px; }
.client-counts>span:first-child { padding-left: 0; }
.client-counts>span:last-child { border-right: 0; }
.client-counts b { margin-bottom: 6px; }
.mobile-nav { background: #fbfdfbdc; border: 1px solid #ffffff; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.mobile-nav .nav-item.active { background: #dcece5; color: #126451; }
.auth-shell {
  width: calc(100% - 64px); max-width: 1040px; min-height: 0;
  margin: clamp(24px, 6vh, 72px) auto;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  border: 1px solid #ffffff; border-radius: 30px; overflow: hidden;
  box-shadow: 0 24px 80px #244c3d0e;
}
.auth-shell.auth-creation { max-width: 1140px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
#app:has(>.auth-shell) { display: grid; align-items: center; min-height: 100svh; padding: 32px; }
#app>.auth-shell { width: 100%; margin: 0 auto; }
.auth-art { background: linear-gradient(135deg, #dfece5, #eef3e3); color: var(--ink); padding: 36px; gap: 38px; }
.auth-art::before { width: 420px; height: 420px; right: -230px; top: 28%; pointer-events: none; }
.auth-art .logo { width: 196px; }
.auth-pitch { max-width: 330px; padding: 0; }
.auth-pitch h1 { font-size: 40px; line-height: 1.15; letter-spacing: -1.5px; }
.auth-pitch h1, .auth-pitch h1 span { color: var(--ink); }
.auth-pitch h1 span { color: #19765e; }
.auth-pitch p, .auth-caption, .brand-tagline { color: #567367; }
.auth-pitch p { font-size: 13px; line-height: 1.8; margin-top: 20px; }
.auth-caption { line-height: 1.8; max-width: 330px; }
.auth-mini { background: #ffffffb0; border: 1px solid #fff; box-shadow: 0 20px 45px #2b54370d; color: var(--ink); backdrop-filter: blur(16px); transform: none; width: 100%; max-width: 280px; padding: 17px; margin-top: 24px; }
.auth-mini-line, .auth-mini-top small { color: var(--sub); }
.auth-mini-top strong { color: var(--ink); }
.auth-mini .row-icon { background: #e8f0df; color: var(--green); }
.auth-mini-line b { color: var(--green); background: #e5f0e4; }
.auth-panel { background: #f8fbf7dc; padding: 36px 40px; min-width: 0; }
.auth-box { max-width: 440px; min-width: 0; }
.auth-creation .auth-box { max-width: 580px; }
.auth-box>h2 { letter-spacing: -.9px; line-height: 1.3; }
.auth-box>p { font-size: 13px; line-height: 1.7; margin-bottom: 22px; }
.auth-box .form { gap: 18px; }
.auth-box .form-grid { gap: 18px 20px; }
.auth-box .auth-fields { grid-template-columns: minmax(0, 1fr); }
.auth-creation .auth-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.auth-box .notice { font-size: 12px; margin-bottom: 20px; }
.auth-box .premium-select-value { white-space: normal; overflow-wrap: anywhere; }
.auth-box .details-body { padding-bottom: 8px; }
.auth-box .details-body .check-field { margin-top: 15px; }
.auth-note { font-size: 11px; line-height: 1.7; color: var(--sub); margin-top: 20px; }
.auth-public-link { display: block; text-align: center; margin-top: 14px; }
.auth-forgot { display: flex; justify-content: flex-end; margin-top: -8px; }
.auth-recovery-help { margin-top: 18px; }
.auth-recovery-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 20px; margin-top: 20px; }
.auth-shell.auth-secure { max-width: 980px; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.auth-secure .auth-art { padding: 38px; gap: 30px; min-height: 580px; }
.auth-secure .auth-pitch { margin-block: auto; }
.auth-secure .auth-pitch h1 { font-size: 34px; line-height: 1.2; letter-spacing: -1.2px; }
.auth-secure .auth-pitch p { margin-top: 16px; max-width: 30ch; }
.auth-security-symbol { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 24px; border: 1px solid #ffffffdb; border-radius: 22px; background: #ffffff8c; color: var(--green); box-shadow: 0 8px 26px #24564308; }
.auth-security-symbol .icon { width: 30px; height: 30px; stroke-width: 1.5; }
.auth-security-caption { display: flex; align-items: flex-start; gap: 10px; }
.auth-security-caption .icon { margin-top: 2px; }
.auth-secure .auth-panel { padding: 40px; }
.auth-secure .auth-box>h2 { margin-bottom: 10px; }
.auth-reset-identity { display: flex; align-items: center; gap: 13px; padding: 0 0 22px; margin-bottom: 24px; border-bottom: 1px solid #dce7e0; min-width: 0; }
.auth-reset-identity>div:last-child { min-width: 0; display: grid; gap: 3px; }
.auth-reset-identity strong { font-size: 14px; font-weight: 650; }
.auth-reset-identity span { font-size: 13px; color: var(--sub); }
.auth-reset-identity small { font-size: 11px; color: var(--sub); margin-top: 3px; }
.auth-reset-identity strong, .auth-reset-identity span, .auth-reset-identity small { overflow-wrap: anywhere; }
.auth-identity-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid #dce7e0; border-radius: 14px; background: #edf4ef; color: var(--green); }
.auth-secure .form>.btn.primary { margin-top: 4px; min-height: 48px; }
.auth-reset-footer { margin-top: 22px; text-align: center; }
.auth-link-validity { display: flex; justify-content: center; align-items: flex-start; gap: 7px; font-size: 11px; line-height: 1.7; }
.auth-link-validity .icon { margin-top: 2px; }
.auth-reset-footer>.btn { margin-top: 12px; }
.auth-secure .auth-recovery-help { font-size: 12px; line-height: 1.75; margin-top: 22px; }
.auth-secure-status { display: grid; justify-items: start; gap: 18px; padding-top: 16px; font-size: 13px; color: var(--sub); }
.auth-secure-result { display: grid; gap: 18px; margin: 24px 0; }
.auth-secure-result p { font-size: 13px; color: var(--sub); line-height: 1.8; }
.auth-result-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #e4f0e8; color: var(--green); }
.auth-result-icon.warning { color: #87652e; background: #f4eddd; }
/* Native values remain authoritative. The portal is separate from modal scrolling. */
.premium-select { display: block; position: relative; width: 100%; min-width: 0; }
.premium-select-native { display: none !important; }
.premium-select-trigger {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px;
  padding: 12px 15px; border: 1px solid #d5e2db; border-radius: 14px;
  color: var(--ink); background: var(--control); font-size: 15px; font-weight: 400;
  text-align: left; box-shadow: 0 2px 5px #29483203; cursor: pointer;
}
.premium-select-trigger:hover { border-color: #a5c2b2; }
.premium-select-trigger[aria-expanded=true] { border-color: #82a893; box-shadow: 0 0 0 3px #147d680d; }
.premium-select-value { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.premium-select-chevron { width: 9px; height: 9px; flex: none; border-right: 1.5px solid #7c9687; border-bottom: 1.5px solid #7c9687; transform: translateY(-2px) rotate(45deg); margin: 0 3px; transition: transform .15s; }
.premium-select-trigger[aria-expanded=true] .premium-select-chevron { transform: translateY(2px) rotate(225deg); }
.premium-select.is-disabled .premium-select-trigger { background: #f1f5f0; cursor: default; color: #61786b; opacity: 1; }
.premium-select-popup {
  position: fixed; z-index: 400; background: #fffffff7; border: 1px solid #e0e8dc;
  border-radius: 18px; padding: 7px; overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 18px 55px #183b2b25, 0 3px 10px #183b2b09;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.premium-select-popup[hidden] { display: none !important; }
.premium-select-option {
  display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 12px 14px;
  border-radius: 11px; font-size: 15px; color: var(--ink); cursor: pointer;
}
.premium-select-option-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.premium-select-option[aria-selected=true] { background: #e6eedf; color: #365b41; }
.premium-select-option.is-active { background: #edf4e9; outline: 1px solid #d1e1cb; outline-offset: -1px; }
.premium-select-check { width: 18px; height: 18px; color: #6c8964; flex: none; visibility: hidden; }
.premium-select-option[aria-selected=true] .premium-select-check { visibility: visible; }
.premium-select-option[aria-disabled=true] { opacity: .45; cursor: default; }
.premium-select-group { padding: 9px 14px 5px; font-size: 11px; color: var(--sub); font-weight: 650; }
.filterbar>.premium-select { width: auto; min-width: 160px; }
.org-select .premium-select-trigger { background: #edf4ec9c; font-size: 13px; font-weight: 600; }
.foreign-time-part .premium-select-trigger { font-size: 14px; }
.mobile-navigation-modal .mobile-menu-links .nav-item { background: transparent; border-color: #e0e9e1; }
.mobile-navigation-modal .mobile-menu-links .nav-item.active { background: #e0eee3; }
@media (max-width: 1200px) {
  .shell { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { width: 220px; padding-inline: 16px; }
  .sidebar .logo { width: 170px; margin-inline: 8px; }
  .content { padding: 30px 28px 60px; }
  .modal-grid { grid-template-columns: minmax(0, 1fr) 270px; gap: 26px; }
  .modal-side { padding-left: 20px; }
}
@media (max-width: 900px) {
  .modal-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-side { padding: 24px 0 0; border-left: 0; border-top: 1px solid #dbe7e0; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .topbar { height: 72px; padding-inline: 18px; }
  .content { padding: 26px 18px 116px; }
  .sidebar { display: none; }
  .page-title { gap: 16px; }
  .stats { gap: 12px; }
  .stat { padding: 20px 17px; }
  .card-head { padding: 21px 20px 16px; }
  .card-body { padding: 0 20px 21px; }
  .btn, .btn.small, .btn.link, .icon-btn { min-height: 44px; }
  .btn.link { padding: 6px 0; }
  .field input, .field textarea, .field select, .premium-select-trigger,
  .premium-select-option, .search input, .filterbar input[type=month] { font-size: 16px; }
  .country-option { font-size: 16px; }
  .form-grid, .form-grid.three { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .form { gap: 22px; }
  .modal-backdrop { padding: 10px; padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .modal { border-radius: 22px; max-height: calc(100dvh - 20px); }
  .modal-head { padding: 20px; }
  .modal-head h2 { font-size: 20px; }
  .modal-body { padding: 22px 20px; }
  .modal-head p { max-width: 100%; }
  .modal-side .card-head, .modal-side .card-body { padding: 0; }
  .modal-side .card-head { padding-bottom: 16px; }
  .completion-summary>summary span { display: none; }
  .completion-summary .completion-issue { gap: 9px; padding-block: 9px; }
  .completion-issue>.btn { margin-left: 0; flex: none; }
  .place-actions { gap: 12px; }
  .place-actions .btn { min-height: 44px; }
  .place-tools>summary { display: flex; align-items: center; min-height: 44px; }
  .trip-receipt-actions { gap: 10px; }
  .trip-receipt-actions .btn { font-size: 12px; }
  .foreign-clock-parts .premium-select-trigger { padding-inline: 12px; }
  .foreign-date-parts .premium-select-trigger { font-size: 14px; padding-inline: 9px; }
  .filterbar>.premium-select { flex: 1; min-width: 140px; }
  .mobile-nav { bottom: 12px; left: 12px; right: 12px; border-radius: 20px; padding: 7px 5px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .mobile-nav .nav-item { border-radius: 14px; min-height: 52px; }
  .booking-modal .modal-body { padding: 20px; }
  .client-counts, .client-counts:has(>span:nth-child(4)),
  .client-card:only-child .client-counts:has(>span:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 0; }
  .client-counts>span:nth-child(odd) { padding-left: 0; }
  .client-counts>span:nth-child(even) { border-right: 0; }
}
@media (max-width: 900px) {
  #app:has(>.auth-shell) { padding: 24px; }
  .auth-shell, .auth-shell.auth-creation, .auth-shell.auth-secure { display: block; max-width: 580px; min-height: 0; }
  .auth-art { padding: 26px 32px; min-height: 0; }
  .auth-secure .auth-art { padding: 26px 32px; min-height: 0; }
  .auth-pitch, .auth-caption { display: none; }
  .auth-panel { padding: 30px 32px; }
  .auth-secure .auth-panel { padding: 30px 32px; }
  .auth-box, .auth-creation .auth-box { max-width: none; }
}
@media (max-width: 760px) {
  .auth-creation .auth-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  #app:has(>.auth-shell) { display: block; padding: 0; }
  .auth-shell, .auth-shell.auth-creation, .auth-shell.auth-secure { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .auth-art { padding: 24px 22px 20px; background: transparent; }
  .auth-secure .auth-art { padding: 24px 22px 20px; }
  .auth-art::before { display: none; }
  .auth-art .logo { width: 178px; }
  .brand-tagline { margin-top: 8px; }
  .auth-panel { padding: 22px 22px 32px; background: transparent; }
  .auth-secure .auth-panel { padding: 22px 22px 32px; }
  .auth-box>h2 { font-size: 26px; line-height: 1.3; }
  .auth-box .form-grid { gap: 18px; }
  .auth-box .notice { font-size: 12px; }
}
@media (max-width: 360px) {
  .modal-body, .modal-head { padding-inline: 16px; }
  .content { padding-inline: 14px; }
  .card-body { padding-inline: 17px; }
  .btn { padding-inline: 13px; }
}
@media (prefers-reduced-transparency: reduce) {
  .sidebar, .topbar, .mobile-nav, .premium-select-popup, .auth-mini, .auth-panel { background: #fbfdfb; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .modal-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; background: #29473c88; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-contrast: more) {
  :root { --sub: #3c574b; --line: #98af9c; }
  .sidebar, .topbar, .mobile-nav, .card, .stat, .premium-select-popup { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .field input, .field textarea, .premium-select-trigger { border-color: #738f79; }
}
@media (forced-colors: active) {
  .premium-select-trigger, .premium-select-popup, .premium-select-option.is-active { border: 1px solid ButtonText; }
  .premium-select-option[aria-selected=true] { background: Highlight; color: HighlightText; }
}

/* Journey editor: a continuous form, with compact secondary details. */
.modal-head-actions {display:flex;align-items:center;gap:10px;flex-shrink:0;}
.trip-form .trip-number-note {font-size:13px;line-height:1.6;color:var(--muted);margin:0 0 20px;}
.trip-form .trip-section {padding:22px 0;border-bottom:1px solid rgba(104,143,130,.18);}
.trip-form .trip-section h3,.trip-form .per-diem-control h3 {font-size:15px;margin:0 0 15px;}
.trip-form .trip-section>.field+.field {margin-top:16px;}
.trip-form .trip-mileage-grid {grid-template-columns:repeat(3,minmax(0,1fr));margin-top:18px;gap:16px;}
.trip-form .trip-reading-note {font-size:12px;color:var(--muted);line-height:1.6;margin-top:9px;}
.trip-form .trip-mileage-note {font-size:12px;line-height:1.6;margin:10px 0 0;}
.trip-form .trip-mileage-note:empty,.trip-form [data-distance-policy]:empty {display:none;}
.trip-form .trip-mileage-note.is-error {color:#a33737;}
.trip-form .mileage-source {font-size:11px;line-height:1.5;color:#4d756b;margin-top:7px;}
.trip-form .odometer-camera {font-size:11px;padding:7px 9px;min-height:34px;white-space:normal;}
.trip-form .trip-ai-actions {display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;margin-top:10px;}
.trip-form .trip-ai-actions [data-report-proposal] {flex:1;min-width:180px;font-size:12px;}
.trip-form .trip-ai-actions [data-report-proposal] small {display:block;line-height:1.6;}
.trip-form .per-diem-control {padding:22px 0;border-bottom:1px solid rgba(104,143,130,.18);}
.trip-form .traveller-fixed {display:block;padding:13px 16px;background:rgba(255,255,255,.5);border:1px solid rgba(104,143,130,.2);border-radius:14px;}
/* Keep document actions and saving together without another card. */
.trip-editor-footer {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 20px;align-items:start;border-top:1px solid rgba(104,143,130,.18);padding-top:22px;margin-top:24px;}
.trip-editor-footer .trip-save-actions {grid-column:2;min-width:0;margin:0;padding:0;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.trip-footer-record-actions {min-width:0;}
.trip-footer-secondary-actions {display:flex;gap:10px;align-items:center;flex-wrap:wrap;}
.trip-footer-secondary-actions>.btn {min-height:44px;}
.trip-footer-delete {display:inline-flex;}
.trip-footer-delete .btn.danger {min-height:44px;background:transparent;border-color:transparent;padding:10px 8px;box-shadow:none;}
.trip-footer-delete .btn.danger:hover {background:rgba(179,55,55,.055);border-color:rgba(179,55,55,.12);}
.trip-footer-record-actions>.advanced {margin-top:12px;}
.trip-footer-record-actions .record-protection {margin-top:10px;max-width:440px;}
.trip-editor-footer-readonly {grid-template-columns:1fr;}

@media(max-width:760px){
 .document-editor .modal-head {gap:10px;align-items:flex-start;}
 .document-editor .modal-head h2 {font-size:18px;}
 .document-editor .modal-head p {font-size:12px;}
 .modal-head-actions {gap:6px;}
 .modal-head-actions>.btn {padding:9px 10px;font-size:11px;min-height:38px;}
 .trip-form .trip-date-grid {grid-template-columns:1fr;gap:15px;}
 .trip-form .trip-mileage-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;}
 .trip-form .trip-mileage-grid>.field:last-child {grid-column:1/-1;}
 .trip-form .odometer-camera {min-height:44px;}
 .trip-editor-footer {grid-template-columns:minmax(0,1fr);gap:18px;margin-top:20px;padding-top:20px;}
 .trip-editor-footer .trip-save-actions {grid-column:1;grid-row:1;display:flex;justify-content:stretch;}
 .trip-editor-footer .trip-save-actions>.btn {flex:1 1 auto;min-height:44px;}
 .trip-editor-footer .trip-save-actions>.btn.primary {order:-1;flex-basis:100%;}
 .trip-footer-record-actions {grid-column:1;grid-row:2;}
 .trip-footer-secondary-actions {justify-content:space-between;gap:8px;}
 .trip-editor-footer-readonly .trip-footer-record-actions {grid-row:1;}
 .trip-form .trip-ai-actions {gap:8px;}
}
@media(max-width:380px){.trip-form .trip-mileage-grid {grid-template-columns:1fr;}}

.foreign-period-fields { display: grid; gap: 14px; min-width: 0; margin-top: 14px; }
.foreign-period-fields[hidden] { display: none; }
.foreign-whole-help { display: block; margin-top: 7px; color: var(--sub); font-size: 11px; }
