/* pages-rental.css – bookings, booking form, rental file, calendar (Belegungsplan), planner, fleet & pricing lists. Tokens only. */
.rs { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--radius-pill); font-size: 11.5px; font-weight: 650; white-space: nowrap;
  color: var(--c, var(--text-2)); background: color-mix(in srgb, var(--c, var(--text-3)) 13%, transparent); vertical-align: middle; }
.rs::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rs-request { --c: var(--st-request); } .rs-reserved { --c: var(--st-reserved); } .rs-confirmed { --c: var(--st-confirmed); } .rs-active { --c: var(--st-active); }
.rs-returned { --c: var(--st-returned); } .rs-closed { --c: var(--st-closed); } .rs-cancelled { --c: var(--st-cancelled); } .rs-overdue { --c: var(--st-overdue); }
[data-mode="dark"] .rs-confirmed { --c: #a5b4fc; } [data-mode="dark"] .rs-reserved { --c: #fbbf24; }
.plate { display: inline-flex; align-items: center; height: 22px; padding: 0 7px 0 12px; border: 1.5px solid var(--text); border-radius: 4px; font-weight: 700; font-size: 12px; letter-spacing: .04em;
  background: linear-gradient(90deg, #1d4ed8 0 7px, var(--surface) 7px); color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
a .plate { color: var(--text); }
.ok-t { color: var(--success); font-weight: 600; } .err-t { color: var(--danger); font-weight: 600; }
.input-suffix { position: relative; display: flex; align-items: center; } .input-suffix .input { padding-right: 46px; }
.input-suffix span { position: absolute; right: 12px; color: var(--text-3); font-size: var(--fs-sm); pointer-events: none; }
.form-sec { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--border); }
.form-grid > .form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.page-head.sub-head { margin: 4px 0 12px; } .page-head.sub-head h2 { font-size: var(--fs-lg); }
.price-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--primary-soft); margin: 0 0 12px; }
.price-total span { font-size: var(--fs-sm); color: var(--text-2); font-weight: 600; } .price-total b { font-size: 26px; letter-spacing: -.02em; color: var(--primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mt { margin-top: var(--gap); }
.kpi.warn-k { background: var(--warning-bg); border-color: transparent; }
.stack > .card + .card, .stack > section + section { margin-top: var(--gap); }

/* driver checks */
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.checks li, .checks.ok { display: flex; flex-direction: row; align-items: center; gap: 6px; } .checks li.error { color: var(--danger); font-weight: 600; } .checks li.warn { color: var(--warning); } .checks.ok { color: var(--success); font-weight: 600; }

/* files */
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.file-it { position: relative; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; }
.file-it img { width: 100%; height: 110px; object-fit: cover; display: block; } .file-it .file-ic { height: 110px; display: grid; place-items: center; color: var(--text-3); } .file-ic .icon { width: 34px; height: 34px; }
.file-it > div { padding: 8px 10px; } .file-it [data-rm] { position: absolute; top: 6px; right: 6px; background: var(--surface); }

/* ---------- booking form ---------- */
.bk { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.bk-main { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.bk-side { position: sticky; top: calc(var(--topbar-h) + 12px); }
.bk-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.bk-cust { display: flex; gap: 8px; } .bk-cust .fl-search { flex: 1; } .bk-cust .fl-search .input { padding-left: 34px; }
.bk-results { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.bk-res { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.bk-res:hover { border-color: var(--primary); background: var(--primary-soft); } .bk-res .small { margin-left: auto; }
.bk-cust-card { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--primary); border-radius: var(--radius); background: var(--primary-soft); }
.bk-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.bk-class { display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.bk-class:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.bk-class.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); } .bk-class.off { opacity: .6; }
.bk-cn, .bk-cp { display: flex; flex-direction: column; gap: 2px; } .bk-cp { align-items: flex-end; text-align: right; } .bk-cp b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; }
.bk-pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.bk-pkg { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.bk-pkg.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); } .bk-pkg .bk-pp { font-weight: 650; color: var(--primary); font-size: var(--fs-sm); }
.bk-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.bk-extra { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; border: 1px solid var(--border); border-radius: 10px; }
.bk-extra .qty { display: inline-flex; align-items: center; gap: 8px; } .bk-extra .qty b { min-width: 16px; text-align: center; }
.bk-lines { list-style: none; margin: 0 0 6px; padding: 0; } .bk-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: var(--fs-sm); }
.bk-lines li b { font-variant-numeric: tabular-nums; white-space: nowrap; } .bk-lines li:last-child { border-bottom: 0; }
@media (max-width: 1100px) { .bk { grid-template-columns: 1fr; } .bk-side { position: static; } }

/* ---------- rental file ---------- */
.rv-period { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.rv-period > div:not(.rv-arrow) { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.rv-period b { font-size: var(--fs-md); } .rv-arrow { display: flex; flex-direction: column; align-items: center; color: var(--text-3); }
.rv-driver { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); } .rv-driver > div { flex: 1; min-width: 0; } .rv-driver:last-of-type { margin-bottom: 10px; }
@media (max-width: 560px) { .rv-period { grid-template-columns: 1fr; } .rv-arrow { flex-direction: row; gap: 8px; } }

/* ---------- planner ---------- */
.pl-list .pl-it { display: flex; align-items: center; gap: 10px; padding: 10px 16px; }
.pl-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: var(--text); text-decoration: none !important; }
.pl-time { font-weight: 750; font-variant-numeric: tabular-nums; font-size: var(--fs-md); min-width: 48px; color: var(--primary); }
.pl-t { display: flex; flex-direction: column; min-width: 0; flex: 1; } .pl-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-v { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.card-head h2 .icon { display: inline-block; vertical-align: -3px; color: var(--primary); }
@media (max-width: 560px) { .pl-list .pl-it { flex-wrap: wrap; } .pl-list .pl-it > .btn { margin-left: 60px; } }

/* ---------- calendar ---------- */
.cal-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: var(--fs-xs); color: var(--text-2); margin-left: auto; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg-request { background: var(--st-request); } .lg-reserved { background: var(--st-reserved); } .lg-confirmed { background: var(--st-confirmed); } .lg-active { background: var(--st-active); }
.lg-overdue { background: var(--st-overdue); } .lg-returned { background: var(--st-returned); } .lg-maintenance { background: var(--st-maintenance); }
.cal-card { overflow: hidden; } .cal-scroll { overflow: auto; max-height: calc(100vh - 230px); }
.cal-inner { position: relative; }
.cal-head { display: flex; position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--border); }
.cal-days { display: flex; } .cal-day { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 46px; border-left: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); }
.cal-day b { color: var(--text-2); font-size: 12px; } .cal-day.we { background: var(--surface-2); } .cal-day.today { background: var(--primary-soft); } .cal-day.today b, .cal-day.today span { color: var(--primary); font-weight: 700; }
.cal-veh { position: sticky; left: 0; z-index: 3; width: 170px; flex: none; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 0 12px; background: var(--surface); border-right: 1px solid var(--border); min-width: 0; }
.cal-corner { font-size: var(--fs-xs); color: var(--text-3); font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.cal-body { position: relative; background-image: linear-gradient(to right, var(--border) 1px, transparent 1px); background-size: var(--day) 100%; background-position: 170px 0; }
.cal-row { display: flex; border-bottom: 1px solid var(--border); position: relative; } .cal-row.drop .cal-lane { background: var(--primary-soft); }
.cal-row.cal-unassigned .cal-veh { background: var(--warning-bg); } .cal-row.cal-unassigned { background: color-mix(in srgb, var(--warning-bg) 40%, transparent); }
.cal-lane { position: relative; flex: none; cursor: copy; }
.cal-group { position: sticky; left: 0; padding: 6px 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-bar-it { position: absolute; height: 28px; border-radius: 8px; padding: 0 8px; display: flex; align-items: center; gap: 6px; overflow: hidden; color: #fff; font-size: 12px; cursor: pointer;
  background: var(--c); box-shadow: 0 1px 2px rgba(15, 23, 42, .18); z-index: 2; user-select: none; touch-action: none; }
.cal-bar-it:hover { filter: brightness(1.06); box-shadow: 0 3px 10px rgba(15, 23, 42, .22); }
.cal-bar-it.drag { cursor: grab; } .cal-bar-it.dragging { cursor: grabbing; opacity: .85; z-index: 10; box-shadow: var(--shadow-lg); }
.cal-t { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .cal-s { opacity: .8; font-size: 11px; white-space: nowrap; }
.cal-rs { position: absolute; right: 0; top: 0; bottom: 0; width: 9px; cursor: ew-resize; background: rgba(255, 255, 255, .25); }
.st-request { --c: var(--st-request); } .st-reserved { --c: var(--st-reserved); } .st-confirmed { --c: var(--st-confirmed); } .st-active { --c: var(--st-active); } .st-overdue { --c: var(--st-overdue); }
.st-returned { --c: var(--st-returned); } .st-closed { --c: var(--st-closed); } .st-cancelled { --c: var(--st-cancelled); }
.st-request.cal-bar-it { background: repeating-linear-gradient(135deg, var(--st-request) 0 8px, color-mix(in srgb, var(--st-request) 80%, #fff) 8px 16px); }
.st-reserved.cal-bar-it { color: #1f1300; }
.cal-buf { position: absolute; height: 28px; border-radius: 0 8px 8px 0; background: repeating-linear-gradient(135deg, var(--surface-3) 0 5px, transparent 5px 10px); border: 1px dashed var(--border-strong); border-left: 0; z-index: 1; }
.cal-blk { position: absolute; top: 8px; height: 28px; border-radius: 8px; padding: 0 8px; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #fff; overflow: hidden; white-space: nowrap;
  background: repeating-linear-gradient(135deg, var(--st-maintenance) 0 8px, color-mix(in srgb, var(--st-maintenance) 80%, #000) 8px 16px); z-index: 1; }
.cal-blk.st-block { background: var(--st-block); }
.cal-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 5; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
@media (max-width: 720px) { .cal-veh { width: 112px; padding: 0 8px; } .cal-body { background-position: 112px 0; } .cal-legend { margin-left: 0; } .cal-scroll { max-height: none; } }

/* quotes */
.q-items td { padding: 6px 8px; } .q-items .input.sm { min-width: 0; }
.veh-diagram { max-width: 420px; margin: 0 auto; }
