/* Trip Planning keeps entry, masters and reports on a single page scroll. */
.trip-daybar,.trip-save,.trip-master-search,.trip-report-controls,.trip-report-summary{
 display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px
}
.trip-daybar{margin-bottom:7px}
.trip-day-nav{display:flex;align-items:center;gap:4px;min-width:0}
.trip-day-nav #trip-day-date{width:133px;min-width:0;padding-inline:6px}
.trip-day-nav .btn{min-height:39px}
.trip-date-arrow{width:39px;min-width:39px;padding:0}
.trip-next svg{transform:rotate(180deg)}
.trip-day-summary{display:flex;align-items:baseline;gap:7px;min-width:0;text-align:right;color:#50627b;font-size:11px}
.trip-day-summary strong{white-space:nowrap;color:#1b3454;font-size:12px}
.trip-day-summary span{overflow-wrap:anywhere}
.trip-log-fields{border:0;min-width:0;margin:0;padding:0}
.trip-log-table-wrap,.trip-report-panel{min-width:0;overflow:hidden}
.trip-log-table,.trip-report-table{width:100%;table-layout:fixed;border-spacing:0}
.trip-col-vehicle{width:12%}
.trip-col-trip{width:40%}
.trip-col-driver{width:36%}
.trip-col-silak{width:12%}
.trip-log-table th,.trip-log-table td,.trip-report-table th,.trip-report-table td{text-align:left;padding:5px 7px}
.trip-heading-mobile{display:none}
.trip-log-table thead th,.trip-report-table thead th{font-size:11.5px;color:#52637b;background:#eef4fc;font-weight:700}
.trip-log-table tbody th{font-size:13px;vertical-align:middle}
.trip-log-table tbody td{padding-block:4px}
.trip-vehicle-number{display:block;overflow-wrap:anywhere;color:#203b5d}
.trip-log-table small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#5a6e88;font-weight:500;font-size:10.5px}
.trip-log-table .input,.trip-log-table .select{width:100%;min-width:0;padding:5px 7px;min-height:35px}
.trip-log-table .select{appearance:auto;white-space:nowrap;text-overflow:ellipsis;padding-inline:5px}
.trip-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:7px 9px;margin-top:7px}
.trip-field{display:grid;gap:4px;min-width:0;color:#37516d;font-size:12px;font-weight:650}
.trip-field .input,.trip-field .select{width:100%;min-width:0}
.trip-field textarea{resize:vertical;min-height:56px}
.trip-save{position:sticky;bottom:8px;z-index:4;margin-top:7px;background:#f8fbff}
.trip-save-status,.trip-report-summary span{color:#52637b;font-size:12px}
.trip-master-search{border-bottom:1px solid #e4ebf5}
.trip-master-search .input{width:min(100%,320px)}
.trip-master-list{list-style:none;margin:0;padding:0}
.trip-master-row{display:grid;grid-template-columns:minmax(120px,1fr) minmax(0,2.15fr) auto;gap:8px;align-items:center;padding:7px 9px;border-bottom:1px solid #e4ebf5}
.trip-master-row:last-child{border-bottom:0}
.trip-master-main{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.trip-master-main strong{color:#213957}
.trip-master-main span,.trip-saved-photos span{color:#52637b;font-size:11px}
.trip-master-dates{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:0}
.trip-master-dates dt{font-weight:650;color:#49627d;font-size:11px}
.trip-master-dates dd{margin:2px 0 0;font-variant-numeric:tabular-nums;font-size:11px}
.trip-master-actions,.trip-saved-photos,.trip-photo-action{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.trip-master-actions{justify-content:flex-end}
.trip-master-actions .btn,.trip-saved-photos .btn,.trip-photo-action .btn{min-height:38px}
.trip-master-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.trip-photo-field{min-width:0}
.trip-photo-field input[type=file]{font-size:12px;height:auto;min-height:36px}
.trip-photo-action{margin-top:4px;font-size:12px}
.trip-photo-action label{display:inline-flex;align-items:center;gap:4px}
.trip-report-controls{display:grid;grid-template-columns:auto repeat(2,minmax(0,1fr));align-items:end;border-bottom:1px solid #e4ebf5}
.trip-report-mode{display:flex;gap:4px}
.trip-report-mode .btn[aria-pressed="true"]{background:#eaf2ff;border-color:#9db9e6;color:#214c87}
.trip-report-controls .btn{min-height:37px}
.trip-report-summary{background:#f7faff}
.trip-report-table td{overflow-wrap:anywhere;font-size:12px;vertical-align:top}
.trip-report-table th:first-child,.trip-report-table td:first-child{width:14%;white-space:nowrap}
.trip-report-table th:nth-child(2){width:19%}
.trip-report-table th:nth-child(3){width:23%}
.trip-report-table th:nth-child(4){width:28%}
.trip-report-table th:nth-child(5){width:16%}
.trip-report-table tbody tr:nth-child(even){background:#f8fafd}
@media(max-width:940px){
 .trip-report-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
 .trip-report-mode{grid-column:1 / -1}
}
@media(max-width:680px){
 .trip-daybar{align-items:stretch;flex-direction:column;padding:6px;gap:5px}
 .trip-day-nav #trip-day-date{width:129px;flex:0 1 129px;font-size:16px}
 .trip-day-nav .btn{min-height:42px}
 .trip-date-arrow{width:42px;min-width:42px}
 .trip-day-summary{justify-content:space-between;text-align:left}
 /* Mobile static snapshot remains 12 / 40 / 36 / 12. */
 .trip-col-vehicle{width:12%}
 .trip-col-trip{width:40%}
 .trip-col-driver{width:36%}
 .trip-col-silak{width:12%}
 /* Edit Log uses its own column widths without changing Static View. */
 .trip-log-table.trip-edit-table .trip-col-vehicle{width:12%}
 .trip-log-table.trip-edit-table .trip-col-trip{width:45%}
 .trip-log-table.trip-edit-table .trip-col-driver{width:25%}
 .trip-log-table.trip-edit-table .trip-col-silak{width:18%}
 .trip-log-table th,.trip-log-table td,.trip-report-table th,.trip-report-table td{padding-inline:4px}
 .trip-log-table .input,.trip-log-table .select{font-size:16px;min-height:40px;padding-inline:4px}
 .trip-log-table tbody th{font-size:11.5px}
 .trip-log-table small{font-size:10px}
 .trip-field textarea{font-size:16px}
 .trip-save{bottom:calc(54px + env(safe-area-inset-bottom,0px));padding:5px 7px}
 .trip-save .btn,.trip-master-actions .btn{min-height:42px}
 .trip-notes{gap:5px;padding:6px}
 .trip-master-row{grid-template-columns:minmax(0,1fr) auto;gap:5px}
 .trip-master-main{grid-column:1;grid-row:1}
 .trip-master-actions{grid-column:2;grid-row:1}
 .trip-master-extras{grid-column:1 / -1}
 .trip-report-controls{gap:5px;padding:6px;grid-template-columns:repeat(2,minmax(0,1fr))}
 .trip-report-controls .input,.trip-report-controls .select{font-size:16px;padding-inline:4px}
 .trip-report-controls .btn{gap:4px;padding-inline:7px;min-height:39px}
 .trip-report-table td{font-size:11.5px}
 .trip-report-table td:first-child,.trip-report-table th:first-child{width:15%}
}

/* Daily snapshot: prioritize the vehicle and put all rows on one page scroll. */
.trip-vehicle-identity{display:flex;align-items:baseline;gap:5px;min-width:0}
.trip-vehicle-name,.trip-vehicle-reg{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.trip-vehicle-name{font-weight:750;color:#203b5d}
.trip-vehicle-identity .trip-vehicle-reg{flex:none;max-width:50%;font-size:10px}
.trip-static-table{font-size:13px;line-height:1.25}
.trip-log-table.trip-static-table th,.trip-log-table.trip-static-table td{padding:3px 7px;height:32px;vertical-align:middle}
.trip-log-table.trip-static-table tbody th{font-size:13px}
.trip-log-table.trip-static-table thead th{height:28px}
.trip-static-table tbody tr:nth-child(even){background:#f7faff}
.trip-static-vehicle{width:100%;padding:0;border:0;background:transparent;font:inherit;text-align:left;cursor:pointer;min-height:22px}
.trip-static-vehicle:focus-visible{outline:2px solid #235b9c;outline-offset:1px;border-radius:3px}
/* Expiry status appears only on today's read-only vehicle number buttons. */
.trip-static-vehicle.trip-doc-green,.trip-static-vehicle.trip-doc-orange,.trip-static-vehicle.trip-doc-red{
 display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:27px;
 padding:2px 3px;border:1px solid transparent;border-radius:6px;text-align:center
}
.trip-static-vehicle.trip-doc-green{background:#4ade80;border-color:#16a34a;color:#064e3b;cursor:default}
.trip-static-vehicle.trip-doc-orange{background:#fdba74;border-color:#ea580c;color:#7c2d12}
.trip-static-vehicle.trip-doc-red{background:#fb7185;border-color:#e11d48;color:#881337}
.trip-static-vehicle.trip-doc-green .trip-vehicle-name,.trip-static-vehicle.trip-doc-orange .trip-vehicle-name,.trip-static-vehicle.trip-doc-red .trip-vehicle-name{color:inherit}
.trip-static-vehicle.trip-doc-green .trip-vehicle-identity,.trip-static-vehicle.trip-doc-orange .trip-vehicle-identity,.trip-static-vehicle.trip-doc-red .trip-vehicle-identity{justify-content:center;min-width:0;max-width:100%}
.trip-document-status{display:grid;gap:12px;font-size:13px}
.trip-document-status-label.trip-document-status-red{color:#a5232e}
.trip-document-status-label.trip-document-status-orange{color:#9a5700}
.trip-document-issues{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.trip-document-issue{display:grid;gap:4px;padding:10px 11px;border-left:3px solid;border-radius:5px;background:#fbfcfe}
.trip-document-issue-red{border-color:#d44b58;background:#fff4f4}
.trip-document-issue-orange{border-color:#e6aa39;background:#fff8e9}
.trip-document-issue strong{font-size:12px}
.trip-document-issue span{font-size:12px;color:#43546d}
.trip-static-value{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trip-static-empty{color:#63738a}
.trip-static-notes{margin:5px 0 0;padding:5px 7px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.trip-static-notes div,.trip-row-detail div{display:grid;gap:2px;min-width:0}
.trip-static-notes dt,.trip-row-detail dt{font-size:11px;font-weight:700;color:#37516d}
.trip-static-notes dd,.trip-row-detail dd{margin:0;word-break:normal;overflow-wrap:anywhere;white-space:pre-wrap;font-size:12px}
.trip-static-meta{display:flex;justify-content:flex-end;gap:5px;padding:4px 3px 0;color:#52637b;font-size:10.5px}
.trip-static-meta span:last-child{text-align:right}
.trip-row-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:0}
.trip-swap-form{display:grid;gap:11px;padding:14px 20px 18px;border-top:1px solid #e6ebf1}
.trip-swap-form .select{width:100%;margin-top:4px;min-height:40px}
.trip-swap-preview{min-height:35px;margin:0;color:#415672;font-size:12px;line-height:1.5}
.trip-swap-actions{display:flex;justify-content:flex-end;gap:9px}
.trip-swap-actions .btn{min-height:39px}
.trip-static-table .trip-log-row{cursor:pointer}
@media(hover:hover){
 .trip-static-table .trip-log-row:hover{background:#eef5ff}
}
#trip-report-caption{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
#trip-report-caption strong{font-size:14px;color:#203b5d}
#trip-report-summary .btn{flex:none}
#trip-report-record,#trip-report-month{width:100%;height:40px;min-height:40px;min-width:0}
.trip-cell-driver .select,.trip-cell-driver .trip-static-value{font-weight:750;color:#203b5d}
.trip-driver-inline{display:inline-flex;align-items:center;gap:4px;max-width:100%;min-width:0;vertical-align:middle}
.trip-driver-inline .trip-static-value{display:inline-block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trip-whatsapp-icon{display:inline-grid;place-items:center;flex:0 0 24px;width:24px;height:24px;padding:0;border:0;border-radius:50%;background:transparent;color:#128c7e;cursor:pointer;vertical-align:middle;line-height:1}
.trip-whatsapp-icon svg{display:block;width:19px;height:19px}
.trip-whatsapp-group-icon{color:#178a58;background:#eef9f1}
.trip-whatsapp-group-icon:hover,.trip-whatsapp-group-icon:focus-visible{color:#075e54;background:#d9f4e3}
.trip-whatsapp-icon:hover,.trip-whatsapp-icon:focus-visible{color:#075e54;background:#e8f8ef;outline-offset:2px}
.trip-log-table .trip-money-heading,.trip-log-table .trip-cell-silak,.trip-report-table :is(th,td):last-child{text-align:right}
.trip-cell-silak{font-variant-numeric:tabular-nums}
.trip-cell-silak input{text-align:right;appearance:textfield}
.trip-log-table.trip-edit-table .trip-silak-input{font-size:13px;font-weight:650}
.trip-cell-silak input::-webkit-inner-spin-button,.trip-cell-silak input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.trip-log-totals{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 10px;margin-top:6px;padding:7px 9px;color:#465d77;background:#f3f8ff;font-size:12px}
.trip-log-totals strong{font-variant-numeric:tabular-nums;color:#193653}
.trip-total-amount strong{font-size:15px;margin-inline-start:3px}
.trip-total-legacy{flex-basis:100%;font-size:10.5px;color:#52637b}


@media(max-width:680px){
 /* Keep the Daily Log as a true table even on small phones. */
 .trip-daybar-static{margin-bottom:7px}
 .page-trip-day .header .btn{min-height:40px}
 .trip-heading-full,.trip-log-table .trip-vehicle-reg{display:none}
 .trip-heading-mobile{display:inline}
 .trip-log-table.trip-static-table .trip-vehicle-name{font-size:11.5px;letter-spacing:-.1px}
 .trip-static-table .trip-driver-inline{display:flex;align-items:center;gap:2px;width:100%;max-width:100%}
 .trip-static-table .trip-cell-driver .trip-static-value{
  flex:1 1 auto;min-width:0;white-space:normal;overflow:visible;
  overflow-wrap:anywhere;text-overflow:clip;line-height:1.18;font-size:12px
 }
 .trip-static-table .trip-whatsapp-icon{flex:0 0 23px;width:23px;height:23px}
 .trip-static-table .trip-whatsapp-icon svg{width:18px;height:18px}
 .trip-log-table tbody th,.trip-log-table.trip-static-table tbody th{font-size:12.5px}
 .trip-log-table.trip-static-table :is(th,td){padding:3px 5px}
 .trip-log-table.trip-static-table tbody :is(th,td){height:39px}
 .trip-static-vehicle{min-height:27px}
 .trip-static-table .trip-static-value{font-size:12.5px}
 .trip-log-table .trip-vehicle-name{font-weight:750}
 .trip-log-table .input,.trip-log-table .select{min-height:40px;padding-inline:4px}
 .trip-log-table.trip-edit-table .trip-silak-input{font-size:12.5px}
 .trip-log-table .select{padding-inline:2px}
 .trip-static-notes{margin-top:7px;padding:6px 9px}
 .trip-static-meta{padding-top:5px}

 /* Both monthly reports use the same preview and filter layout. */
 .trip-report-mode .btn{flex:1}
 .trip-log-totals{padding:6px 7px;font-size:11px}
 .trip-total-amount strong{font-size:13px}
 .trip-report-table :is(th,td):last-child{overflow-wrap:anywhere}
 #trip-report-summary .btn{min-height:38px}
}
@media(max-width:390px){
 .trip-notes{grid-template-columns:minmax(0,1fr);gap:7px;padding:7px 9px}
 .trip-log-table.trip-static-table :is(th,td){padding-inline:4px}
}

.trip-master-panel .trip-master-search{padding:6px 8px;gap:6px}
.trip-master-panel .trip-master-search .input{height:36px;min-height:36px;padding-block:4px;border-radius:7px}
@media(max-width:680px){.trip-master-panel .trip-master-search .input{width:100%;font-size:16px}}

.trip-master-panel{border:1px solid #e0e7ef;border-radius:14px;overflow:hidden;box-shadow:0 2px 8px #17365c06}
.trip-master-panel .trip-master-row{padding:10px 12px;border-bottom:1px solid #edf0f5}
.trip-master-panel .trip-master-actions .btn{border:1px solid #e0e7ef;background:#fff;color:#3e5876;border-radius:8px;min-height:36px;min-width:36px;padding:6px;justify-content:center}
.trip-master-panel .trip-master-actions .btn span{display:none}

/* Monthly reports follow the shared compact ERP master/report design. */
.trip-report-panel{border:1px solid #e0e7ef;border-radius:14px;overflow:hidden;box-shadow:0 2px 8px #17365c06}
.trip-report-panel .trip-report-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:6px;padding:0 8px 7px}
.trip-report-panel .trip-report-mode{grid-column:1/-1;display:flex;gap:0;border-bottom:1px solid #e0e7ef}
.trip-report-panel .trip-report-mode .btn{flex:1;min-width:0;min-height:34px;padding:6px 4px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;box-shadow:none;color:#65748a;font-size:12px;font-weight:600}
.trip-report-panel .trip-report-mode .btn[aria-pressed="true"]{border-bottom-color:#2458a2;background:transparent;color:#2458a2}
.trip-report-panel .trip-field{min-width:0;width:100%;display:flex;flex-direction:column;gap:4px;margin:0}
.trip-report-panel .trip-field>span{font-size:11px;font-weight:600;color:#62738a}
.trip-report-panel #trip-report-record,.trip-report-panel #trip-report-month{box-sizing:border-box;display:block;width:100%;max-width:100%;min-width:0;height:36px;min-height:36px;padding:4px 7px;border-radius:7px;font-size:13px;font-weight:500}
.trip-report-panel #trip-report-month::-webkit-date-and-time-value{text-align:left;min-height:0;margin:0}
.trip-report-panel .trip-report-summary{padding:7px 9px;background:#f7f9fc;border-bottom:1px solid #e4eaf1;gap:8px}
.trip-report-panel #trip-report-caption{gap:2px}
.trip-report-panel #trip-report-caption strong{font-size:13px;font-weight:650}
.trip-report-panel #trip-report-caption span{font-size:11px;color:#718096}
.trip-report-panel #trip-report-pdf{min-height:32px;padding:5px 9px;border:1px solid #e0e7ef;border-radius:8px;background:#fff;color:#3e5876;font-size:12px;text-decoration:none}
.trip-report-panel .trip-report-table thead th{background:#f7f9fc;color:#62738a;font-size:11px;font-weight:650;padding:10px 7px;border-bottom:1px solid #e4eaf1}
.trip-report-panel .trip-report-table td{padding:10px 7px;border-bottom:1px solid #edf0f5;vertical-align:top;font-size:12px}
.trip-report-panel .trip-report-table tbody tr:last-child td{border-bottom:0}
.trip-report-panel .trip-report-table tbody tr:nth-child(even){background:#fff}
@media(max-width:680px){
.trip-report-panel .trip-report-controls{gap:5px;padding:0 7px 6px}
.trip-report-panel #trip-report-record,.trip-report-panel #trip-report-month{font-size:16px;font-weight:400;padding-inline:5px}
.trip-report-panel .trip-report-table thead th,.trip-report-panel .trip-report-table td{padding:9px 4px;font-size:11px}
}

/* Native iOS month controls have intrinsic sizing; overlay the picker on a fixed-size field. */
.trip-report-panel .trip-report-controls{align-items:start;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
.trip-report-panel .trip-field{display:grid;grid-template-rows:15px 36px;gap:4px;align-items:center;min-width:0;overflow:hidden}
.trip-report-panel .trip-field>span:first-child{line-height:15px}
.trip-report-panel .trip-month-control{position:relative;display:flex;align-items:center;justify-content:space-between;gap:5px;box-sizing:border-box;width:100%;min-width:0;height:36px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#172b45;padding:0 7px;font-size:13px;font-weight:500;overflow:hidden}
.trip-report-panel .trip-month-control #trip-month-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trip-report-panel .trip-month-control svg{flex-shrink:0}
.trip-report-panel .trip-month-control #trip-report-month{position:absolute;inset:0;opacity:0;appearance:none;-webkit-appearance:none;width:100%;height:100%;min-height:0!important;max-height:100%;margin:0;padding:0;border:0;cursor:pointer;font-size:16px}
.trip-report-panel .trip-month-control:focus-within{outline:2px solid #2458a2;outline-offset:-2px}
.trip-report-panel #trip-report-record{height:36px!important;min-height:36px!important;max-height:36px;line-height:normal;margin:0}
