/* Match the final ERP-density rules in return-sorting admin, not earlier overrides. */
body{background:var(--ui-page);font-family:"Pretendard","Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",system-ui,sans-serif}
.tab-nav{background:var(--ui-page)}.tab-nav button.active{background:#334155;border-color:#334155;color:#fff;box-shadow:inset 0 -3px 0 #94a3b8}
.trip-entry-actions button[aria-pressed=true]{background:#334155;border-color:#334155;color:#fff;box-shadow:inset 0 -3px 0 #94a3b8}
#tripSection>h2,#tripLogsSection>.section-head{border-bottom:2px solid #dbe3ee;padding-bottom:10px;margin-bottom:12px}
.schedule-controls{background:#f1f5f9;border-color:#dbe3ee}.triplog-matrix th{background:#e8eef7;color:#334155;border-bottom:2px solid #cbd5e1}
@media(min-width:901px){.tab-nav button{min-height:36px;padding:7px 12px;font-size:14px}.schedule-controls{padding:12px;gap:6px 10px}.schedule-controls input,.schedule-controls select,.schedule-controls button{min-height:32px;height:32px;padding:5px 9px;font-size:13px;border-radius:6px}.schedule-controls label{font-size:12px}#tripSection,#tripLogsSection{padding:14px}#tripSection>h2,#tripLogsSection h2{font-size:22px}}
label:has(>input[type="checkbox"]){display:flex!important;align-items:center;gap:8px;min-height:44px;line-height:1.5}
label:has(>input[type="checkbox"])>input[type="checkbox"]{appearance:auto;box-sizing:border-box;display:block;width:22px!important;height:22px!important;min-height:22px!important;max-width:22px;flex:0 0 22px;margin:0!important;padding:0!important;accent-color:#1d4ed8}
label:has(>input[type="checkbox"])>span{min-width:0;overflow-wrap:anywhere}
#repeatPreview .repeat-date-row label>span{white-space:normal}
.triplog-period-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) repeat(4,auto);gap:8px;align-items:end;margin:12px 0}
.triplog-period-controls label{margin:0 0 4px}.triplog-period-controls input{min-width:0}.triplog-period-controls button{width:auto;margin:0;white-space:nowrap}
@media(max-width:780px){.triplog-period-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.triplog-period-controls button{min-height:44px}.triplog-period-controls #queryTripLogPeriod{grid-column:1 / -1}}
.triplog-matrix{width:max-content;min-width:100%;table-layout:auto}
.triplog-matrix td:nth-child(2),.triplog-matrix td:nth-child(5),.triplog-matrix td:nth-child(6){white-space:pre;overflow-wrap:normal;word-break:normal}

/* Final density and accessibility rules; no bottom navigation or state scripts. */
.triplog-period-controls{padding:8px;background:#f8fafc;border:1px solid var(--ui-border);border-radius:var(--ui-radius)}
@media(max-width:680px){.tab-nav button{min-height:44px}.section-head{flex-wrap:wrap}.section-head>div{min-width:0}.section-head button{max-width:100%}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}}

/* Mobile navigation reuses the existing role-controlled buttons and handlers. */
@media(max-width:680px){
 body.ui-bottom-menu{--ui-nav-space:76px;padding-bottom:calc(var(--ui-nav-space) + env(safe-area-inset-bottom,0px))}
 html{scroll-padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
 body.ui-bottom-menu .tab-nav{position:fixed;top:auto;left:0;right:0;bottom:0;z-index:40;margin:0;padding:8px calc(6px + env(safe-area-inset-right,0px)) calc(8px + env(safe-area-inset-bottom,0px)) calc(6px + env(safe-area-inset-left,0px));gap:4px;background:#fff;border-top:1px solid #cbd5e1;border-bottom:0;box-shadow:0 -3px 12px #0f172a14;overflow-x:auto;scrollbar-width:thin}
 .tab-nav button{flex:0 0 auto;min-height:48px;min-width:64px;padding:8px 6px;font-size:12px}
 #userNav button{flex:1 0 auto}
 .tab-nav.hidden,.tab-nav.workspace-hidden,.tab-nav[hidden],.tab-nav button.hidden,.tab-nav button[hidden]{display:none!important}
 body.ui-bottom-menu #tripStartForm button,body.ui-bottom-menu #tripReturnForm button,body.ui-bottom-menu #createReservationBtn{bottom:calc(var(--ui-nav-space) + 8px + env(safe-area-inset-bottom,0px))}
 input,select,textarea{scroll-margin-bottom:calc(88px + env(safe-area-inset-bottom,0px))}
 .ui-password .ui-password-toggle,#createForm .ui-password-toggle{min-height:40px}
 body.ui-keyboard-open .tab-nav{display:none!important}
 body.ui-keyboard-open{padding-bottom:16px}
 body.ui-keyboard-open #tripStartForm button,body.ui-keyboard-open #tripReturnForm button,body.ui-keyboard-open #createReservationBtn{position:static;bottom:auto}
}

/* Candidate final cascade, preserving stage-4 UI states and role hiding. */
body{font-size:15px;line-height:1.55}
header{background:linear-gradient(135deg,#0f1f4d,#1e3a8a);padding:10px 18px}header .head,main{max-width:1120px}
main{margin:16px auto 56px;padding:0 14px}
.card{border-radius:14px}.tab-nav{background:#f3f5f9ee}
.tab-nav button{border-radius:999px;font-size:13.5px}
.tab-nav button.active,.trip-entry-actions button[aria-pressed=true]{background:#1d4ed8;border-color:#1d4ed8;color:#fff;box-shadow:0 3px 10px #1d4ed833}
.tab-nav.hidden,.tab-nav[hidden],.tab-nav button.hidden,.tab-nav button[hidden]{display:none!important}
.triplog-matrix th{background:#eef2f8;color:#1f2937}
.schedule-matrix th.is-today{background:#dbe7ff;color:#1e3a8a;box-shadow:inset 0 3px 0 #1d4ed8}
.schedule-matrix td.is-today{background:#f5f9ff}
.schedule-matrix td.is-today:hover{background:#eaf2ff}
.schedule-matrix-wrap{background-color:#fff;background-image:linear-gradient(to right,#fff 30%,#fff0),linear-gradient(to left,#fff 30%,#fff0),radial-gradient(farthest-side at 0 50%,#0f172a1f,#0000),radial-gradient(farthest-side at 100% 50%,#0f172a1f,#0000);background-position:left,right,left,right;background-repeat:no-repeat;background-size:36px 100%,36px 100%,12px 100%,12px 100%;background-attachment:local,local,scroll,scroll}
.schedule-matrix-wrap.ui-no-scroll{background-image:none}
@media(max-width:680px){
 header{padding:10px 12px}header h1{font-size:16px}header h1::before{width:28px;height:28px}header .brand-subtitle{margin-left:37px}
 main{padding:0 10px}.card{padding:12px}#loginCard{margin-top:5vh;padding:22px 18px}
 body.ui-bottom-menu .tab-nav{background:#fffffff2;gap:2px}
 body.ui-bottom-menu .tab-nav button{flex:1 0 auto;min-width:62px;flex-direction:column;gap:2px;border:0;border-radius:10px;min-height:52px;padding:5px 6px;font-size:11px;background:transparent;color:#64748b;box-shadow:none}
 body.ui-bottom-menu #adminNav button{flex:0 0 auto;min-width:68px}
 body.ui-bottom-menu .tab-nav button::before{font-size:19px}
 body.ui-bottom-menu .tab-nav button.active{background:#eff4ff;color:#1d4ed8;box-shadow:inset 0 3px 0 #1d4ed8}
 .trip-entry-actions button{font-size:13px;min-height:44px}
 .header-account{max-width:58%}
}

/* Keep the scroll cue for roles with more menu items than fit on screen. */
@media(max-width:680px){
 body.ui-bottom-menu .tab-nav{scrollbar-color:#94a3b8 transparent}
 body.ui-bottom-menu .tab-nav::-webkit-scrollbar{display:block;height:3px}
 body.ui-bottom-menu .tab-nav::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:999px}
}

.booking-grid th.is-today{background:#dbe7ff;color:#1e3a8a;box-shadow:inset 0 3px 0 #1d4ed8}.booking-grid td.is-today{background:#f5f9ff}

/* Match candidate filter surface after legacy density overrides. */
.schedule-controls{background:#f8fafc;border-color:#e2e8f0;border-radius:12px}

/* Compact date controls: keep label, date and both navigation buttons on one row. */
#scheduleSection .schedule-controls,#myReservationsSection .schedule-controls{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;align-items:center;gap:6px;padding:8px;margin:12px 0;}
#scheduleSection .schedule-controls>* ,#myReservationsSection .schedule-controls>*{grid-column:auto;grid-row:auto;min-width:0;margin:0;}
#scheduleSection .schedule-controls label,#myReservationsSection .schedule-controls label{white-space:nowrap;font-size:12px;}
#scheduleSection .schedule-controls input,#myReservationsSection .schedule-controls input{width:100%;min-height:40px;height:40px;padding:5px;font-size:14px;}
#scheduleSection .schedule-controls button,#myReservationsSection .schedule-controls button{width:auto;min-height:40px;height:40px;padding:5px 8px;font-size:12px;white-space:nowrap;}
@media(max-width:430px){#scheduleSection .schedule-controls,#myReservationsSection .schedule-controls{gap:4px;padding:6px;}#scheduleSection .schedule-controls label,#myReservationsSection .schedule-controls label{font-size:11px;}#scheduleSection .schedule-controls button,#myReservationsSection .schedule-controls button{font-size:11px;padding:5px 6px;}}

#scheduleSection>.section-head,#myReservationsSection>.section-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:center;}
#scheduleSection>.section-head>div,#myReservationsSection>.section-head>div{display:contents;}
#scheduleSection>.section-head>div>.muted,#myReservationsSection>.section-head>div>.muted{grid-column:1/-1;grid-row:2;}
#scheduleSection>.section-head>button,#myReservationsSection>.section-head>button{grid-column:2;grid-row:1;min-height:40px;padding:6px 10px;}
@media(max-width:680px){#scheduleSection>.section-head>div>.muted,#myReservationsSection>.section-head>div>.muted{font-size:12px;line-height:1.5;}}

@media(max-width:680px){#scheduleSection .schedule-controls input,#myReservationsSection .schedule-controls input{font-size:16px;}}

/* Schedule identity: plate first; only actionable status and registered emergency phone. */
#scheduleList .schedule-vehicle-info{display:grid;gap:5px;text-align:left;}
#scheduleList .schedule-vehicle-info .plate{font-size:17px;line-height:1.25;font-weight:850;white-space:nowrap;color:var(--ink,#172033);}
#scheduleList .schedule-vehicle-info .vehicle-name{font-size:12px;line-height:1.4;font-weight:500;}
#scheduleList .schedule-emergency-phone{font-size:12px;line-height:1.5;overflow-wrap:anywhere;}
#scheduleList .schedule-vehicle-status{justify-self:start;font-size:11px;white-space:normal;}
/* Expanded manual: quick path and distinct cards remain keyboard/native-details accessible. */
.user-guide .guide-content{margin-top:14px;}
.user-guide .guide-overview{padding:14px;background:#eff6ff;border-left:4px solid #2563eb;border-radius:8px;color:#1e3a8a;}
.user-guide .guide-overview>strong{font-size:15px;}
.user-guide .guide-flow{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:10px 0;}
.user-guide .guide-flow span{padding:5px 9px;border:1px solid #bfdbfe;border-radius:6px;background:white;font-weight:700;color:#1e40af;}
.user-guide .guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px;}
.user-guide .guide-card{min-width:0;padding:14px;border:1px solid #dbe4f0;border-radius:10px;background:#fff;}
.user-guide .guide-card h3{display:flex;align-items:center;gap:8px;font-size:15px;line-height:1.4;margin:0 0 10px;color:#172033;}
.user-guide .guide-card ul,.user-guide .guide-card ol{padding-left:20px;margin:0;}
.user-guide .guide-card li{margin:7px 0;line-height:1.7;font-size:14px;color:#334155;}
.user-guide .guide-card p{font-size:13px;line-height:1.7;}
.user-guide .guide-note{padding:9px 10px;background:#f8fafc;border-radius:6px;border-left:3px solid #cbd5e1;margin-top:10px;}
.user-guide .guide-role{display:inline-block;padding:1px 6px;border-radius:4px;background:#e2e8f0;color:#334155;font-size:11px;font-weight:750;}
@media(max-width:680px){.user-guide .guide-grid{grid-template-columns:minmax(0,1fr);}.user-guide .guide-card{padding:12px;}.user-guide .guide-overview{padding:12px;}}

/* Vehicle detail insurance fields: consistent label/value rows for admin and user. */
#vehicleDetailBody>.vehicle-insurance-info,#vehiclesList .vehicle-insurance-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(200px,100%),1fr));gap:12px 16px;align-items:start;}
#vehicleDetailBody .vehicle-insurance-company,#vehiclesList .vehicle-insurance-company,#vehicleDetailBody .vehicle-insurance-phone,#vehiclesList .vehicle-insurance-phone{display:grid;grid-template-rows:auto auto;gap:4px;align-content:start;min-height:52px;margin:0;padding:0;line-height:1.5;}
#vehicleDetailBody .insurance-field-label,#vehiclesList .insurance-field-label{font-size:13px;font-weight:650;line-height:1.4;color:#64748b;}
#vehicleDetailBody .insurance-company-value,#vehiclesList .insurance-company-value{font-size:16px;font-weight:750;color:#173b68;}
#vehicleDetailBody .insurance-phone-value,#vehiclesList .insurance-phone-value{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 7px;min-width:0;}
#vehicleDetailBody .insurance-phone-number,#vehiclesList .insurance-phone-number{font-size:18px;font-weight:800;line-height:1.5;}
#vehicleDetailBody .insurance-call-hint,#vehiclesList .insurance-call-hint{font-size:12px;font-weight:600;white-space:nowrap;}
#vehicleDetailBody a.vehicle-insurance-phone,#vehiclesList a.vehicle-insurance-phone{text-decoration:none;}
#vehicleDetailBody a.vehicle-insurance-phone::after,#vehiclesList a.vehicle-insurance-phone::after{content:none;}
#vehicleDetailBody a .insurance-phone-number,#vehiclesList a .insurance-phone-number{text-decoration:underline;text-underline-offset:3px;}
