/* =====================================================================
   KTA Soft - base styles. Mobile first, no framework.
   ===================================================================== */

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --text: #1d2330;
    --muted: #6b7280;
    --border: #dfe2e8;
    --primary: #2f5bd3;
    --primary-dark: #2448ad;
    --danger: #c0392b;
    --green: #1e8e4f;
    --amber: #b7791f;
    --nav-bg: #1d2330;
    --nav-text: #c9cfdb;
    --radius: 6px;
    --topbar-h: 52px;
    --nav-w: 210px;
    font-size: 15px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
}

a { color: var(--primary); }
h1 { font-size: 1.45rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
small, .hint { color: var(--muted); font-size: .85rem; }
.muted { color: var(--muted); }
.inline { display: inline; }
.center { text-align: center; }
.req { color: var(--danger); }

/* ---------- Layout ---------- */

.topbar {
    position: fixed; inset: 0 0 auto 0; height: var(--topbar-h);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1rem; background: var(--nav-bg); color: #fff; z-index: 20;
}
.brand { color: #fff; font-weight: 700; text-decoration: none; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .9rem; }
.topbar .btn-ghost { color: #fff; border-color: #4b5563; }
.nav-toggle { background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; padding: .25rem; }

.sidenav {
    position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--nav-w);
    background: var(--nav-bg); overflow-y: auto; z-index: 15;
    transform: translateX(-100%); transition: transform .2s;
}
.sidenav.open { transform: none; box-shadow: 4px 0 20px rgba(0,0,0,.3); }
.sidenav ul { list-style: none; margin: 0; padding: .5rem 0; }
.sidenav a, .sidenav span { display: block; padding: .6rem 1.1rem; color: var(--nav-text); text-decoration: none; }
.sidenav a:hover { background: #2a3242; color: #fff; }
.sidenav a.active { background: var(--primary); color: #fff; }
.nav-heading { padding: 1rem 1.1rem .3rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: #7c8597; }
.nav-soon span { opacity: .4; cursor: default; }

.main { padding: 1rem; max-width: 1300px; }
.has-nav .main { padding-top: calc(var(--topbar-h) + 1rem); }

@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .sidenav { transform: none; }
    .has-nav .main { margin-left: var(--nav-w); padding: calc(var(--topbar-h) + 1.5rem) 2rem 2rem; }
}
@media (max-width: 599px) {
    .hide-sm { display: none; }
}

.page-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: .75rem; margin-bottom: 1rem;
}
.page-head .actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Cards ---------- */

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.1rem; margin-bottom: 1rem;
}
.card.narrow { max-width: 480px; }
.card.center.narrow { margin: 2rem auto; }
.table-card { padding: 0; overflow: hidden; }
.grid-2 { display: grid; gap: 1rem; }
@media (min-width: 900px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.login-wrap { min-height: 90vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 360px; }
.login-card h1 { margin-bottom: 1rem; text-align: center; }

dl.details { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
dl.details dt { color: var(--muted); }
dl.details dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Stats ---------- */

.stat-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1rem; display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-label { color: var(--muted); font-size: .9rem; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-block; padding: .5rem .9rem; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface); color: var(--text);
    font: inherit; text-decoration: none; cursor: pointer; line-height: 1.2; white-space: nowrap;
}
.btn:hover { border-color: #b8bec9; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .3rem .6rem; font-size: .85rem; }
.btn-block { display: block; width: 100%; }

/* ---------- Forms ---------- */

.form-grid { display: grid; gap: 0 1rem; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: .9rem; display: flex; flex-direction: column; gap: .25rem; }
.field-wide { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; }
.field-check label { font-weight: normal; display: flex; align-items: center; gap: .5rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel],
input[type=date], input[type=datetime-local], input[type=search], input[type=url], select, textarea {
    width: 100%; padding: .55rem .65rem; font: inherit;
    border: 1px solid var(--border); border-radius: var(--radius); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
legend { font-weight: 700; margin-bottom: .6rem; font-size: 1.05rem; }

.search-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.search-bar input[type=search] { flex: 1 1 220px; width: auto; }
.search-bar label { display: flex; align-items: center; gap: .35rem; font-size: .9rem; }

/* ---------- Alerts / badges ---------- */

.alert { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; }
.alert-success { background: #e8f6ee; border-color: #a8dcbc; color: #145c34; }
.alert-error   { background: #fdecea; border-color: #f2b8b1; color: #8a2318; }
.alert-info    { background: #eaf0fd; border-color: #b5c7f2; color: #1c3a85; }

.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-green { background: #e0f3e8; color: var(--green); }
.badge-grey  { background: #eceef2; color: var(--muted); }
.badge-red   { background: #fbe3e0; color: var(--danger); }
.badge-amber { background: #fdf0d9; color: var(--amber); }

/* ---------- Tables ---------- */

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { background: #f8f9fb; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tbody tr:hover { background: #fafbfc; }
.table tr.muted td { color: var(--muted); }
.table td.actions { text-align: right; white-space: nowrap; }
.table a.row-link { font-weight: 600; text-decoration: none; }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }

/* On phones, stacked tables turn each row into a card */
@media (max-width: 699px) {
    .table-stack thead { display: none; }
    .table-stack tr { display: block; border-bottom: 1px solid var(--border); padding: .5rem 0; }
    .table-stack td { display: flex; gap: .75rem; border: 0; padding: .25rem .9rem; }
    .table-stack td::before { content: attr(data-label); flex: 0 0 35%; color: var(--muted); font-size: .85rem; }
    .table-stack td.actions { justify-content: flex-start; }
    .table-stack td.actions::before { content: ""; }
}

.pagination { display: flex; gap: .35rem; align-items: center; justify-content: center; padding: .8rem; flex-wrap: wrap; }
.pagination span { color: var(--muted); font-size: .9rem; padding: 0 .5rem; }

/* ---------- Added with kit module ---------- */

.table th.num, .table td.num { text-align: right; white-space: nowrap; }
@media (max-width: 699px) { .table-stack td.num { text-align: left; } }
.table tr.row-parent td { background: #f8f9fb; }
.table td.indent { padding-left: 1.6rem; }
.field label.radio { font-weight: normal; display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .3rem; }
.field label.radio input { margin-top: .2rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: 0 .75rem; align-items: flex-end; }
.inline-form .field { flex: 0 1 150px; }
.inline-form .field.grow { flex: 1 1 220px; }
.error-list { margin: .5rem 0 0; padding-left: 1.2rem; max-height: 320px; overflow-y: auto; }
.columns-help { margin-top: 1rem; }
.columns-help summary { cursor: pointer; color: var(--primary); }
.columns-help .table td { padding: .3rem .5rem; }
code { background: #eef0f4; padding: .05rem .3rem; border-radius: 3px; font-size: .88em; }
.page-head h1 small { font-weight: normal; }

/* ---------- Added with jobs module ---------- */

.badge-blue   { background: #e3ebfc; color: #2448ad; }
.badge-purple { background: #efe6fb; color: #6b35b5; }
.text-red { color: var(--danger); }
.subhead { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .3rem; }
.type-tag { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 3px; white-space: nowrap; }
.type-production { background: #1d2330; color: #fff; }
.type-dry_hire { background: #fff; color: #1d2330; border: 1px solid #1d2330; }

.grid-3 { display: grid; gap: 1rem; }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-3 .card p { margin: 0 0 .5rem; }

.segmented { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.segmented label { display: flex; align-items: center; gap: .4rem; padding: .45rem .8rem; cursor: pointer; font-weight: normal; border-right: 1px solid var(--border); }
.segmented label:last-child { border-right: 0; }
.segmented label:has(input:checked) { background: #eaf0fd; }

details.menu { position: relative; display: inline-block; }
details.menu > summary { list-style: none; }
details.menu > summary::-webkit-details-marker { display: none; }
.menu-body { position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.12); padding: .6rem; min-width: 220px; display: grid; gap: .5rem; }
.menu-form { display: grid; grid-template-columns: 1fr auto; gap: .35rem; align-items: center; }
.menu-form label { grid-column: 1 / -1; font-size: .85rem; color: var(--muted); }

.add-kit { display: flex; gap: .5rem; padding: 1rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.kit-search-wrap { position: relative; flex: 1 1 260px; }
.kit-results { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 10; list-style: none; margin: 0; padding: 0;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.12);
    max-height: 360px; overflow-y: auto; }
.kit-results li { padding: .5rem .7rem; cursor: pointer; border-bottom: 1px solid var(--border); }
.kit-results li .badge { float: right; margin-left: .5rem; }
.kit-results li.active, .kit-results li:hover { background: #eaf0fd; }
.kit-results li.none { color: var(--muted); cursor: default; }

input.qty { width: 5rem; text-align: right; }
input.money-in { width: 6.5rem; text-align: right; }
.lines select { width: auto; padding: .35rem; }
.lines td input, .lines td select { padding: .35rem .45rem; }
.line-note { margin-top: .3rem; font-size: .85rem; }
.table tr.row-short td { background: #fdf2f1; }
.lines-save { padding: .8rem 1rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--border); }
.add-charge { padding: .8rem 1rem; border-top: 1px solid var(--border); }
.add-charge summary { cursor: pointer; color: var(--primary); margin-bottom: .5rem; }

.totals table { width: 100%; border-collapse: collapse; }
.totals td { padding: .3rem 0; }
.totals td:last-child { text-align: right; white-space: nowrap; }
.totals tr.sub td { border-top: 1px solid var(--border); font-weight: 600; }
.totals tr.grand td { border-top: 2px solid var(--text); font-size: 1.15rem; font-weight: 700; padding-top: .5rem; }
.totals tr.muted td { color: var(--muted); }

/* ---------- Diary ---------- */

:root { --c-production: #2f5bd3; --c-dry_hire: #0f8a7e; }
.diary-head h1 { font-size: 1.3rem; margin-left: .5rem; }
.diary-nav { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.view-switch a { padding: .45rem .8rem; text-decoration: none; color: var(--text); border-right: 1px solid var(--border); }
.view-switch a:last-child { border-right: 0; }
.view-switch a.on { background: var(--primary); color: #fff; }
.diary-filters .legend { display: flex; gap: .35rem; flex-wrap: wrap; margin-left: auto; align-items: center; }
.diary-filters .legend .jb { position: static; font-size: .75rem; padding: .15rem .45rem; }

/* Job bar */
.jb { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-decoration: none;
      font-size: .78rem; line-height: 1.25; padding: .12rem .4rem; border-radius: 4px; color: #fff; z-index: 2;
      margin: 1px 2px; border: 1px solid transparent; }
.jb:hover { filter: brightness(1.08); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.jb-production { background: var(--c-production); }
.jb-dry_hire { background: var(--c-dry_hire); }
.jb-prov { background: repeating-linear-gradient(135deg, #fff, #fff 5px, #f1f3f7 5px, #f1f3f7 10px); border-style: dashed; }
.jb-prov.jb-production { color: var(--c-production); border-color: var(--c-production); }
.jb-prov.jb-dry_hire { color: var(--c-dry_hire); border-color: var(--c-dry_hire); }
.jb-done { opacity: .55; }
.jb-cancelled { background: #eceef2; color: var(--muted); text-decoration: line-through; }
.jb.cont-left { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.jb.cont-right { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.jb-num { font-weight: 700; margin-right: .25rem; }
.jb-detail { display: block; font-size: .74rem; opacity: .9; white-space: normal; }

/* Month / week grid */
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8f9fb; border-bottom: 1px solid var(--border); }
.cal-dow div { padding: .35rem .5rem; font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
           grid-template-rows: 1.7rem repeat(var(--lanes), auto) minmax(.6rem, 1fr);
           border-bottom: 1px solid var(--border); }
.cal-week .cal-dow { display: none; } /* dates already show the weekday */
.cal-month .cal-row { min-height: 6.5rem; }
.cal-week .cal-row { min-height: 22rem; }
.cal-week .jb { padding: .3rem .5rem; margin: 2px 3px; }
.cal-row:last-child { border-bottom: 0; }
.cal-day { grid-row: 1 / -1; border-right: 1px solid var(--border); text-decoration: none; color: var(--text); z-index: 1; }
.cal-day:nth-child(7) { border-right: 0; }
.cal-day:hover { background: #f5f8ff; }
.cal-day.wkend, .cal-dow .wkend { background: #fafbfc; }
.cal-day.other-month .cal-date { color: #b5bbc6; }
.cal-date { display: inline-block; padding: .25rem .45rem; font-size: .85rem; font-weight: 600; }
.cal-day.today .cal-date { background: var(--primary); color: #fff; border-radius: 0 0 6px 0; }

@media (max-width: 699px) {
    .cal-month .jb-title { display: none; }
    .cal-month .jb { font-size: .68rem; padding: .1rem .2rem; }
    .cal-month .cal-row { min-height: 4.5rem; }
    .cal-dow div { padding: .3rem .2rem; font-size: .7rem; }
    .cal-week { overflow-x: auto; }
    .cal-week .cal-dow, .cal-week .cal-row { min-width: 700px; }
    .diary-filters .legend { margin-left: 0; }
}

/* Day / list entries */
.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: flex; gap: .75rem; align-items: center; padding: .6rem 1rem; border-bottom: 1px solid var(--border);
         text-decoration: none; color: var(--text); border-left: 4px solid var(--c-production); }
.entry:hover { background: #f8f9fb; }
.entry-dry_hire { border-left-color: var(--c-dry_hire); }
.entry-prov { border-left-style: dashed; }
.entries li:last-child .entry { border-bottom: 0; }
.entry-when { flex: 0 0 9.5rem; font-weight: 600; font-size: .88rem; }
.entry-when.kind-out { color: var(--c-production); }
.entry-when.kind-back { color: var(--green); }
.entry-when.kind-on_hire { color: var(--muted); font-weight: normal; }
.entry-main { flex: 1 1 auto; min-width: 0; }
.entry-main small { display: block; }
.entry-tags { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 599px) {
    .entry { flex-wrap: wrap; }
    .entry-when { flex-basis: 100%; }
    .entry-tags { justify-content: flex-start; }
}
.agenda-date { padding: .6rem 1rem; background: #f8f9fb; border-bottom: 1px solid var(--border); font-weight: 700; display: flex; gap: .5rem; align-items: center; }
.agenda-date a { color: var(--text); text-decoration: none; }
.agenda-date.today { background: #eaf0fd; }

/* Year */
.year-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.mini-month { margin: 0; padding: .8rem; }
.mini-month h2 { font-size: 1rem; margin-bottom: .4rem; }
.mini-month h2 a { color: var(--text); text-decoration: none; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: .78rem; }
.mini-dow { color: var(--muted); font-weight: 700; font-size: .7rem; }
.mini-day { position: relative; display: block; padding: .28rem 0; border-radius: 3px; text-decoration: none; color: var(--text); }
.mini-day:hover { outline: 1px solid var(--primary); }
.mini-day.lvl-1 { background: #dbe5fb; }
.mini-day.lvl-2 { background: #a9c0f2; }
.mini-day.lvl-3 { background: #5f86e0; color: #fff; }
.mini-day.lvl-4 { background: #2448ad; color: #fff; }
.mini-day.has-prov::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); }
.mini-day.today { outline: 2px solid var(--danger); }

/* ---------- Invoices ---------- */
.inv-lines td:first-child input { width: 100%; min-width: 18rem; }
.stat-value.text-red { color: #c62828; }
@media (max-width: 700px) { .inv-lines td:first-child input { min-width: 0; } }

/* ---------- Packing lists ---------- */
.pack-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.scan-form { display: flex; gap: .5rem; flex: 1 1 320px; }
.scan-form input { flex: 1; font-size: 1.1rem; padding: .6rem .75rem; }
.pack-progress { flex: 0 1 220px; }
.pack-progress .bar { height: 8px; background: #e4e7ee; border-radius: 4px; overflow: hidden; margin-bottom: .25rem; }
.pack-progress .bar span { display: block; height: 100%; background: #1e8e4f; }
.unit-chip {
    display: inline-flex; align-items: center; gap: .25rem; margin: 0 .3rem .3rem 0; padding: .15rem .3rem .15rem .55rem;
    border: 1px solid #c9d2e3; border-radius: 999px; background: #f4f7fd; font-size: .85rem; font-family: ui-monospace, Consolas, monospace;
}
.unit-chip.out { background: #fff4e0; border-color: #f0c27a; }
.unit-chip.in { background: #eaf6ee; border-color: #9bd1ad; }
.unit-chip form { display: inline; }
.unit-chip button { border: 0; background: none; cursor: pointer; color: #687389; padding: 0 .2rem; font-size: .8rem; line-height: 1; }
.unit-chip button:hover { color: #c62828; }
.pick-form select { min-width: 9rem; }
.alert.flag { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 699px) {
    /* Packing list: label above the value so chips and long names wrap */
    .table-stack.pack td { display: block; }
    .table-stack.pack td::before { display: block; margin-bottom: .15rem; }
    .table-stack.pack tr.row-parent td::before,
    .table-stack.pack td:empty::before { content: none; }
    .table-stack.pack tr.row-parent { padding: 0; }
    .table-stack.pack tr.row-parent td { padding: .4rem .9rem; font-weight: 600; }
    .table-stack.pack .pick-form select { width: 100%; }
    .scan-form input { min-width: 0; }
}

/* ---------- Crew ---------- */
.tag { display: inline-block; padding: .05rem .45rem; margin: 0 .25rem .2rem 0; border-radius: 4px; background: #eef1f6; font-size: .8rem; color: #3a4357; }
.crew-row { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--border); }
.crew-row.clash { background: #fff5f5; margin: 0 -1rem; padding-left: 1rem; padding-right: 1rem; }
.crew-main { flex: 1 1 280px; min-width: 0; }
.crew-status select { padding: .3rem .5rem; font-size: .9rem; }
.crew-status select.status-accepted { background: #e7f6ec; }
.crew-status select.status-offered { background: #fff4e0; }
.crew-status select.status-declined { background: #fdecec; }
.crew-edit { flex-basis: 100%; }
.crew-edit:not([open]) { flex-basis: auto; }
.crew-edit[open] > summary { margin-bottom: .5rem; }
.crew-edit form + form { margin-top: .4rem; }

/* Crew portal (phone first) */
.portal-list h2 { margin-bottom: .3rem; }
.portal-item { display: flex; gap: .9rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.portal-item:hover { background: #f7f9fc; }
.portal-item .when { flex: 0 0 5.5rem; font-weight: 600; }
.portal-item .what { flex: 1; min-width: 0; }
.portal-item .go { font-size: 1.4rem; color: #8a94a7; }
.portal-you .big { font-size: 1.15rem; font-weight: 600; }
.respond { display: flex; gap: .6rem; flex-wrap: wrap; }
.respond .btn { flex: 1 1 140px; padding: .75rem 1rem; font-size: 1rem; }

/* Packages on the job kit table */
.lines tr.pkg-row td { background: #f4f7fd; }
.lines tr.pkg-content td { font-size: .92em; }
.lines .pkg-indent { color: var(--muted); margin-right: .3rem; }

/* Vehicles */
.reg-plate { display: inline-block; padding: 0 .4rem; border-radius: 3px; background: #f7d117; color: #111; font-weight: 700; font-size: .8rem; letter-spacing: .04em; border: 1px solid #c9a800; white-space: nowrap; }

/* Check-in */
.table tr.row-done td { background: #f3faf5; }
.checkin-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: flex-start; }
.checkin-actions form.inline { display: inline; }
.checkin-problem { display: inline-block; }
.checkin-problem[open] { display: block; flex-basis: 100%; }
.checkin-problem > summary { list-style: none; }
.checkin-problem > summary::-webkit-details-marker { display: none; }
@media (max-width: 760px) { .table-stack.pack td.checkin-actions { display: flex; } }
.small-link { font-size: .8rem; white-space: nowrap; }
