:root{font-family:Arial,Helvetica,sans-serif;color:#17304c;background:#f4f7fb;line-height:1.6}*{box-sizing:border-box}body{margin:0}header{display:flex;justify-content:space-between;gap:20px;padding:20px 5%;background:#10243b;color:#fff;flex-wrap:wrap}header a{color:white;font-weight:800;text-decoration:none;font-size:23px}main{max-width:1050px;margin:32px auto;padding:0 20px}h1{font-size:32px;line-height:1.2}h2{margin-top:0}a{color:#2563eb}.panel{background:white;border:1px solid #dde5ef;border-radius:14px;padding:26px;margin:24px 0}.narrow{max-width:520px;margin:35px auto}label{display:block;font-weight:bold;margin:18px 0 6px}input{font:inherit;padding:10px;border:1px solid #a6b6c9;border-radius:7px;width:100%;color:#17304c}button{font:inherit;font-weight:bold;padding:12px 20px;border:0;border-radius:7px;background:#2563eb;color:white;cursor:pointer;margin-top:16px}.secondary{background:#17304c}.alert,.success,.notice{padding:16px;border-radius:8px}.alert{background:#ffe9e9;color:#832323}.success{background:#e3f5eb;color:#185637}.notice{background:#eaf1ff}.hint{font-size:13px;color:#52657b}.top{display:flex;justify-content:space-between;gap:20px;align-items:center}fieldset{border:1px solid #ccd7e4;border-radius:8px;margin:20px 0;padding:15px}legend{font-weight:bold;padding:0 8px}table{width:100%;border-collapse:collapse;text-align:left}th,td{padding:10px;border-bottom:1px solid #dde5ef}td input{min-width:95px}.scroll{overflow-x:auto}footer{text-align:center;padding:25px;font-size:13px;color:#52657b}:focus-visible{outline:3px solid #82b5ff;outline-offset:3px}@media(max-width:600px){.panel{padding:16px}.top{align-items:start}th,td{padding:6px}h1{font-size:27px}}

.preserve{white-space:pre-wrap;overflow-wrap:anywhere}dt{font-weight:bold;margin-top:14px}dd{margin-left:0;overflow-wrap:anywhere}

.panel h2{overflow-wrap:anywhere}#request-details{scroll-margin-top:20px}

.outbox-booking-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: start;
    column-gap: .6rem;
    scroll-margin-block-start: clamp(1rem, 18vh, 8rem);
}
.outbox-booking-row:target {
    margin: .25rem -.55rem;
    padding: .35rem .55rem;
    border-inline-start: 4px solid #2563eb;
    border-radius: 4px;
    background: #eaf1ff;
}

#request-status,#staff-notes{display:block;width:100%;font:inherit;color:inherit;background:white;border:1px solid #a6b6c9;border-radius:7px;padding:10px}#staff-notes{resize:vertical}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 22px;
}
.admin-nav a {
    padding: 8px 14px;
    border: 1px solid #a6b6c9;
    border-radius: 8px;
    background: #fff;
    font-weight: 700;
}
.admin-nav a[aria-current="page"] {
    background: #17304c;
    border-color: #17304c;
    color: #fff;
}

.driver-assignment {
    margin: 18px 0;
    padding: 16px;
    background: #f4f7fb;
    border: 1px solid #dde5ef;
    border-radius: 10px;
    scroll-margin-top: 16px;
}
.driver-assignment h3 {
    margin: 0;
}
.driver-assignment label {
    margin-top: 10px;
}
.driver-assignment-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}
.driver-assignment-controls select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px;
    border: 1px solid #a6b6c9;
    border-radius: 7px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: max(1rem, 16px);
}
.driver-assignment-controls button {
    min-height: 48px;
    margin: 0;
}
@media (max-width: 600px) {
    .driver-assignment-controls {
        grid-template-columns: minmax(0, 1fr);
    }
}

.admin-page-top form { flex-shrink: 0; }
.admin-page-top button { white-space: nowrap; }
.booking-summary-name { margin-bottom: 0; }
.booking-summary-reference { margin: 2px 0 14px; color: #52657b; }
.booking-summary, .dashboard-queues {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.booking-summary > div, .dashboard-queues a {
    background: #f4f7fb;
    border: 1px solid #dde5ef;
    border-radius: 8px;
    padding: 10px 12px;
}
.booking-summary dt { margin: 0; font-size: .875rem; }
.booking-summary dd { font-weight: 700; }
.dashboard-queues a { display: grid; align-content: start; }
.dashboard-queues span { color: #17304c; }
.dashboard-search { display: flex; gap: 8px; }
.dashboard-search input { min-width: 0; }
.dashboard-search button { margin: 0; }
@media (max-width: 600px) {
    .admin-page-top { gap: 10px; align-items: center; }
    .admin-page-top button { margin: 0; padding-inline: 12px; }
    .admin-nav { gap: 6px; }
    .admin-nav a { padding-inline: 8px; font-size: .875rem; }
    .dashboard-queues { grid-template-columns: minmax(0, 1fr); }
}

.admin-accounts .admin-permission-list {
    min-width: 0;
    display: grid;
    gap: 4px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-accounts .admin-permission-list label {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    margin: 0;
    padding: 9px 0;
    min-height: 44px;
}
.admin-accounts .admin-permission-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 4px 0 0;
    padding: 0;
}
.admin-account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.admin-account-actions button { margin: 0; }
@media (max-width: 600px) {
    .admin-accounts .admin-permission-list {
        grid-template-columns: minmax(0, 1fr);
    }
    .admin-account-actions button { width: 100%; }
}

.booking-field { display: none; }
select[name="approval"] { max-width: 100%; min-width: 0; }
@media (max-width: 600px) {
    .booking-list, .booking-list tbody { display: block; }
    .booking-list thead {
        position: absolute; width: 1px; height: 1px;
        overflow: hidden; clip-path: inset(50%);
    }
    .booking-list tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas: "ref date" "status price" "customer customer" "route route";
        gap: 8px 12px;
        padding: 14px 0;
        border-top: 1px solid #dde5ef;
    }
    .booking-list td { border: 0; padding: 0; min-width: 0; overflow-wrap: anywhere; }
    .booking-list td:nth-child(1) { grid-area: ref; }
    .booking-list td:nth-child(2) { grid-area: customer; }
    .booking-list td:nth-child(3) { grid-area: date; }
    .booking-list td:nth-child(4) { grid-area: route; }
    .booking-list td:nth-child(5) { grid-area: status; }
    .booking-list td:nth-child(6) { grid-area: price; }
    .booking-field { display: block; color: #52657b; font-size: .875rem; }
}

.follow-up-check {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: baseline;
    gap: 10px;
    align-content: center;
    min-height: 44px;
    margin: 6px 0;
    cursor: pointer;
}
.follow-up-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;
    align-self: start;
    margin-top: 3px;
}

/* Give native menu controls the same readable touch target as text inputs. */
form select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #a6b6c9;
    border-radius: 7px;
    background-color: white;
    color: #17304c;
    font: inherit;
    font-size: max(1rem, 16px);
}

.testimonial-entry { margin-top: 18px; padding-top: 16px; border-top: 1px solid #dde5ef; overflow-wrap: anywhere; }
.testimonial-entry figure, .testimonial-entry blockquote { margin: 8px 0; }
.testimonial-entry blockquote p { margin: 0; white-space: pre-line; }
.testimonial-entry figcaption { color: #52657b; }
.testimonial-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.testimonial-actions a { display: inline-flex; align-items: center; min-height: 44px; }
.testimonial-actions button { margin: 0; }
#testimonial-quote { display: block; width: 100%; resize: vertical; font: inherit; color: inherit; padding: 10px; border: 1px solid #a6b6c9; border-radius: 7px; }

.booking-document-list { list-style: none; margin: 1rem 0; padding: 0; }
.booking-document-list li { padding: 1rem 0; border-top: 1px solid #dde5ef; }
.booking-document-list h3 { margin: 0; font-size: 1rem; }
.booking-document-list li p { margin: 0 0 .75rem; color: #52657b; font-size: .875rem; }
.booking-document-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.booking-document-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: .6rem 1rem;
    border: 1px solid #a6b6c9;
    border-radius: 9px;
    background: #fff;
    color: #194bae;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}
.booking-document-actions a:first-child { background: #2563eb; border-color: #2563eb; color: #fff; }
.booking-document-actions a:hover { text-decoration: underline; }
.booking-document-actions a:focus-visible,
.booking-help-links a:focus-visible { outline: 3px solid #17304c; outline-offset: 3px; }
.booking-next-actions:empty { display: none; }
.booking-next-actions p[role="status"] { flex-basis: 100%; margin: 0; }
.booking-totals { max-width: 32rem; margin: 1rem 0; }
.booking-totals > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .4rem 0;
    border-bottom: 1px solid #dde5ef;
}
.booking-totals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.booking-totals > div:first-child { font-weight: 700; }
.booking-help-links { display: grid; justify-items: start; gap: .25rem; }
.booking-help-links a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    color: #194bae;
    text-underline-offset: .18em;
}
@media (max-width: 520px) {
    .booking-document-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .booking-document-actions a { padding: .6rem .35rem; }
    .booking-next-actions { grid-template-columns: 1fr; }
}

.review-facts { margin: 16px 0 20px; }
.review-action { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:10px 18px; margin:4px 12px 10px 0; border-radius:8px; background:#2563eb; color:#fff; font-weight:700; text-decoration:none; }
.review-action:hover { background:#184cc2; }
.review-calendar { display:inline-block; padding:10px 0; }

.date-reply-list { width: 100%; border-collapse: collapse; }
.date-reply-list th, .date-reply-list td { text-align: left; vertical-align: top; overflow-wrap: anywhere; padding: .7rem .6rem; }
.date-reply-list tbody th { font-weight: 600; }
.date-reply-list small { display: block; color: #536378; font-weight: 400; }
.date-reply-list td small:not(:first-child) { margin-top: .45rem; }
.date-reply-list td a { display: block; }
@media (max-width: 700px) {
    .date-reply-list, .date-reply-list tbody { display: block; }
    .date-reply-list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .date-reply-list tr { display: grid; grid-template-columns: 1fr; gap: .35rem; padding: .85rem 0; border-top: 1px solid #dce4ef; }
    .date-reply-list tbody th, .date-reply-list td { display: block; padding: 0; border: 0; }
}

.weekly-booking-figures{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9rem),1fr));gap:12px}
.weekly-booking-figures div{padding:12px 16px;border:1px solid #dde5ef;border-radius:8px}
.weekly-booking-figures dt{font-weight:600}
.weekly-booking-figures dd{margin:0;font-size:1.7rem;font-weight:bold}
.weekly-booking-weeks{display:flex;gap:20px;flex-wrap:wrap}
.weekly-booking-weeks a{display:inline-block;padding:8px 0}

.weekly-unpaid-tile{position:relative}
.weekly-unpaid-tile a::after{content:"";position:absolute;inset:0;border-radius:8px}
.weekly-unpaid-tile:focus-within{outline:2px solid #2563eb;outline-offset:2px}
.weekly-follow-ups{list-style:none;padding:0}
.weekly-follow-ups li{border-top:1px solid #dde5ef;padding:14px 0;overflow-wrap:anywhere}
.weekly-follow-ups span{display:block}
.weekly-follow-ups a{display:inline-block;padding:7px 0;margin-right:16px}

.weekly-follow-up-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 12px;margin-top:10px}
.weekly-follow-up-form label{margin:0}
.weekly-follow-up-form input[type=date]{display:block;max-width:100%}
.weekly-follow-up-form button{margin:0}

.queue-navigation, .queue-search { margin: 12px 0; }
.queue-navigation summary, .queue-search summary { padding: 10px 0; color: #174cb8; cursor: pointer; }
@media (max-width: 600px) {
    .review-queue tbody tr { grid-template-areas: "customer reference" "move route" "status price"; }
    .review-queue td:nth-child(1) { grid-area: move; }
    .review-queue td:nth-child(3) { grid-area: route; }
    .review-queue td:nth-child(4) { grid-area: reference; }
    .review-queue tbody tr td a { display: inline-flex; align-items: center; min-height: 44px; }
}
