/* GSL Melbourne — client portal. Standalone, light, conventional, professional. */
:root {
    --p-bg: #f4f4f6; --p-surface: #ffffff; --p-border: #e3e3e8;
    --p-text: #1c1c1f; --p-text-2: #55555c; --p-muted: #87878f;
    --p-brand: #d32f2f; --p-brand-strong: #b71c1c; --p-ink: #1a1a1a;
    --p-green: #1b7f3b; --p-green-bg: #e7f4ec;
    --p-amber: #9a6700; --p-amber-bg: #fbf1d8;
    --p-blue: #1456b0; --p-blue-bg: #e6eefb;
    --p-red: #b3261e; --p-red-bg: #fbe9e7;
    --p-grey: #5a5a62; --p-grey-bg: #ececf0;
}
* { box-sizing: border-box; }
body {
    margin: 0; background: var(--p-bg); color: var(--p-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 15px; line-height: 1.55;
}
a { color: var(--p-brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.p-top {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--p-ink); color: #fff; padding: 14px 22px;
}
.p-brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.p-brand:hover { text-decoration: none; }
.p-brand img { height: 26px; width: auto; display: block; }
.p-brand span { font-weight: 600; font-size: 15px; letter-spacing: 0.2px; }
.p-top-right { display: flex; align-items: center; gap: 14px; }
.p-who { color: #c9c9cf; font-size: 13px; }
.p-signout { color: #fff; font-size: 13px; font-weight: 500; }

/* Layout */
.p-main { min-height: 70vh; }
.p-wrap { max-width: 760px; margin: 0 auto; padding: 26px 18px 40px; }
.p-narrow { max-width: 440px; margin: 0 auto; padding: 48px 18px; }
.p-h1 { font-size: 24px; font-weight: 600; margin: 0 0 4px; }
.p-h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.p-muted { color: var(--p-muted); margin: 0 0 18px; }
.p-tiny { font-size: 12px; color: var(--p-muted); margin: 6px 0 0; }
.p-back { display: inline-block; font-size: 13px; margin-bottom: 14px; color: var(--p-text-2); }

/* Cards */
.p-card {
    background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 12px;
    padding: 20px 22px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.p-empty { color: var(--p-muted); text-align: center; padding: 14px 0; margin: 0; }

/* Dashboard grid */
.p-grid { display: grid; gap: 12px; margin-top: 18px; }
.p-booking { display: block; color: inherit; transition: border-color .12s; }
.p-booking:hover { text-decoration: none; border-color: var(--p-brand); }
.p-booking-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.p-booking-title { font-size: 16px; font-weight: 600; }
.p-booking-meta { color: var(--p-text-2); font-size: 13.5px; margin-top: 4px; }
.p-booking-ref { color: var(--p-muted); font-size: 12.5px; margin-top: 2px; }

/* Badges */
.p-badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; white-space: nowrap; }
.p-badge.green { background: var(--p-green-bg); color: var(--p-green); }
.p-badge.amber { background: var(--p-amber-bg); color: var(--p-amber); }
.p-badge.blue  { background: var(--p-blue-bg);  color: var(--p-blue); }
.p-badge.red   { background: var(--p-red-bg);   color: var(--p-red); }
.p-badge.grey  { background: var(--p-grey-bg);  color: var(--p-grey); }

/* Rows (sessions, kv) */
.p-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--p-border); }
.p-row:last-of-type { border-bottom: none; }
.p-row-title { font-weight: 600; font-size: 14.5px; }
.p-row-sub { color: var(--p-text-2); font-size: 13px; margin-top: 2px; }
.p-kv-row { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--p-border); font-size: 14px; }
.p-kv-row:last-child { border-bottom: none; }
.p-kv-row > span:first-child { color: var(--p-text-2); }
.p-link { font-weight: 500; }

/* Files */
.p-files { display: grid; gap: 8px; margin: 6px 0 16px; }
.p-file { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--p-border); border-radius: 8px; color: inherit; }
.p-file:hover { text-decoration: none; background: #fafafb; border-color: var(--p-brand); }
.p-file-name { font-weight: 500; font-size: 13.5px; word-break: break-word; }
.p-upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.p-upload input[type=file] { font-size: 13px; }

/* Forms */
.p-form { display: grid; gap: 10px; margin-top: 18px; }
.p-form label, .p-form2 label { font-size: 12.5px; font-weight: 600; color: var(--p-text-2); }
.p-input {
    width: 100%; font-size: 16px; padding: 11px 12px; border: 1px solid var(--p-border);
    border-radius: 8px; background: #fff; color: var(--p-text); font-family: inherit;
}
.p-input:focus { outline: none; border-color: var(--p-brand); box-shadow: 0 0 0 3px rgba(211,47,47,0.12); }
.p-btn {
    display: inline-block; font-size: 14px; font-weight: 600; padding: 11px 20px; border-radius: 8px;
    border: 1px solid var(--p-border); background: #fff; color: var(--p-text); cursor: pointer; text-align: center;
}
.p-btn:hover { text-decoration: none; background: #fafafb; }
.p-btn-primary { background: var(--p-brand); border-color: var(--p-brand); color: #fff; }
.p-btn-primary:hover { background: var(--p-brand-strong); }

/* Request change disclosure */
.p-request { margin-top: 14px; border-top: 1px solid var(--p-border); padding-top: 12px; }
.p-request > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--p-brand); }
.p-form2 { display: grid; gap: 9px; margin-top: 14px; }
.p-form2-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 9px; }
.p-form2-row label { display: block; margin-bottom: 3px; }

/* Pending requests */
.p-pending { margin-top: 14px; background: var(--p-amber-bg); border-radius: 8px; padding: 12px 14px; }
.p-pending-head { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--p-amber); margin-bottom: 6px; }
.p-pending-item { font-size: 13px; color: var(--p-text); margin-bottom: 4px; }

/* Alerts */
.p-ok { background: var(--p-green-bg); color: var(--p-green); border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; }
.p-alert { background: var(--p-red-bg); color: var(--p-red); border-radius: 8px; padding: 12px 16px; margin: 0 0 14px; font-size: 14px; }

/* Login */
.p-login { text-align: center; padding: 32px 28px; }
.p-login h1 { font-size: 22px; }
.p-login .p-form { text-align: left; }
.p-login-icon { font-size: 34px; margin-bottom: 8px; }

/* Footer */
.p-foot { text-align: center; color: var(--p-muted); font-size: 12.5px; padding: 26px 18px 36px; }
.p-foot p { margin: 3px 0; }

@media (max-width: 520px) {
    .p-form2-row { grid-template-columns: 1fr; }
}

/* Friendlier request card */
.p-reqform { display: grid; gap: 18px; margin-top: 4px; }
.p-reqfield label { font-size: 14.5px; font-weight: 600; color: var(--p-text); display: block; }
.p-reqfield .p-tiny { margin: 3px 0 7px; }
.p-reqfield textarea { resize: vertical; min-height: 64px; }
.p-pending-tag {
    display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
    background: #fff; color: var(--p-amber); border: 1px solid #e7d9ad; border-radius: 5px; padding: 1px 6px; margin-right: 6px;
}

/* Structured per-session change controls */
.p-sess { padding: 14px 0; border-bottom: 1px solid var(--p-border); }
.p-sess:first-of-type { padding-top: 4px; }
.p-sess-date { font-weight: 600; font-size: 14.5px; margin-bottom: 9px; }
.p-sess-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; }
.p-sess-grid label, .p-add label { display: block; font-size: 12px; font-weight: 600; color: var(--p-text-2); }
.p-sess-grid select, .p-sess-grid input, .p-add select, .p-add input { margin-top: 4px; }
.p-remove { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 13px; font-weight: 500; color: var(--p-text-2); cursor: pointer; }
.p-remove input { width: 16px; height: 16px; }
.p-add { margin: 4px 0 8px; }
.p-add > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--p-brand); }
.p-reqform { display: block; }
.p-reqform .p-reqfield { margin-top: 16px; }
.p-reqform > .p-btn-primary { margin-top: 16px; }
@media (max-width: 560px) { .p-sess-grid { grid-template-columns: 1fr 1fr; } }

/* Request-changes table */
.p-tablewrap { overflow-x: auto; margin: 6px 0 4px; }
.p-rt { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-rt th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--p-muted); padding: 6px 8px; border-bottom: 2px solid var(--p-border); white-space: nowrap; }
.p-rt td { padding: 8px; border-bottom: 1px solid var(--p-border); vertical-align: middle; }
.p-rt tbody tr:last-child td { border-bottom: none; }
.p-rt-date { font-weight: 600; white-space: nowrap; }
.p-rt-rm { text-align: center; width: 66px; }
.p-rt .p-input { font-size: 14px; padding: 8px 9px; min-width: 108px; }
.p-rt-rm input[type=checkbox] { width: 18px; height: 18px; }

/* Request history */
.p-hist { padding: 13px 0; border-bottom: 1px solid var(--p-border); }
.p-hist:last-child { border-bottom: none; }
.p-hist:first-child { padding-top: 2px; }
.p-hist-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.p-hist-when { font-size: 12px; color: var(--p-muted); }
.p-hist-detail { font-size: 14px; }
.p-hist-outcome { font-size: 13px; color: var(--p-green); margin-top: 5px; }
.p-hist-note { font-size: 13px; color: var(--p-text-2); margin-top: 6px; background: #f7f7f8; border-radius: 6px; padding: 8px 11px; }

/* ── Wide layout with a side menu ─────────────────────────────
   The booking page carries a lot now (dates, equipment, requests,
   details, money, files), so it runs at 85% of the window with a
   sticky section menu down the left. */
.p-wide { width: 85%; max-width: 1520px; margin: 0 auto; padding: 26px 0 44px; }
.p-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 22px; align-items: start; }
.p-side { position: sticky; top: 18px; display: grid; gap: 14px; }
.p-sidenav {
    background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 12px;
    padding: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.p-sidenav a {
    display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 8px;
    color: var(--p-text-2); font-size: 14px; font-weight: 500; line-height: 1.3;
}
.p-sidenav a:hover { text-decoration: none; background: #f6f6f8; color: var(--p-text); }
.p-sidenav a.on { background: #f1f1f4; color: var(--p-text); font-weight: 600; }
.p-sidenav-ico { width: 18px; text-align: center; flex: none; font-size: 14px; }
.p-sidenav-count {
    margin-left: auto; font-size: 11px; font-weight: 700; color: var(--p-muted);
    background: #f1f1f4; border-radius: 99px; padding: 1px 7px;
}
.p-sidenav a.on .p-sidenav-count { background: #e4e4e9; }
.p-sidehelp {
    background: var(--p-surface); border: 1px solid var(--p-border); border-radius: 12px;
    padding: 14px 15px; font-size: 12.5px; color: var(--p-text-2); line-height: 1.5;
}
.p-sidehelp strong { display: block; color: var(--p-text); font-size: 13px; margin-bottom: 5px; }
.p-sidehelp a { font-weight: 500; }

/* Stack the menu above the content on narrow screens */
@media (max-width: 1000px) {
    .p-wide { width: 100%; padding: 22px 16px 40px; }
    .p-shell { grid-template-columns: 1fr; gap: 14px; }
    .p-side { position: static; }
    .p-sidenav { display: flex; gap: 4px; overflow-x: auto; padding: 6px; }
    .p-sidenav a { white-space: nowrap; padding: 8px 12px; }
    .p-sidenav-ico, .p-sidenav-count { display: none; }
    .p-sidehelp { display: none; }
}

/* ── Explainer / guidance blocks ──────────────────────────── */
.p-note {
    border: 1px solid var(--p-border); border-left: 3px solid var(--p-brand);
    background: #fbfbfc; border-radius: 8px; padding: 13px 16px; margin: 0 0 16px;
    font-size: 13.5px; color: var(--p-text-2); line-height: 1.6;
}
.p-note strong { color: var(--p-text); }
.p-note p { margin: 0 0 9px; }
.p-note p:last-child { margin-bottom: 0; }
.p-note ul { margin: 0 0 9px; padding-left: 19px; }
.p-note li { margin-bottom: 5px; }
.p-note-head { font-weight: 600; color: var(--p-text); font-size: 14px; margin: 0 0 7px; }

/* ── Equipment table ──────────────────────────────────────── */
.p-eq { width: 100%; border-collapse: collapse; font-size: 14px; }
.p-eq th {
    text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.4px; color: var(--p-muted); padding: 6px 8px;
    border-bottom: 2px solid var(--p-border); white-space: nowrap;
}
.p-eq td { padding: 9px 8px; border-bottom: 1px solid var(--p-border); vertical-align: middle; }
.p-eq tbody tr:last-child td { border-bottom: none; }
.p-eq-name { font-weight: 500; }
.p-eq-qty { width: 88px; }
.p-eq-qty .p-input { font-size: 14px; padding: 7px 8px; text-align: center; }
.p-eq-rm { text-align: center; width: 76px; }
.p-eq-rm input[type=checkbox] { width: 18px; height: 18px; }
.p-eq-num { text-align: right; white-space: nowrap; }
.p-eq-kids td { color: var(--p-text-2); font-size: 13px; }
.p-eq-kid-name { padding-left: 26px; }
.p-eq-toggle {
    background: none; border: none; cursor: pointer; color: var(--p-muted);
    font-size: 15px; font-family: inherit; line-height: 1;
    /* Real tap target, not just a tiny glyph — the icon stays small, the
       clickable area around it doesn't. */
    width: 32px; height: 32px; margin: -8px 0 -8px -8px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; border-radius: 6px;
}
.p-eq-toggle:hover, .p-eq-toggle:focus-visible { background: var(--p-hover, rgba(0,0,0,.05)); color: var(--p-text, #333); }
.p-eq-sub { font-size: 12px; color: var(--p-muted); font-weight: 400; }
.p-eq-included { font-size: 12px; color: var(--p-muted); }

/* ── Details form ─────────────────────────────────────────── */
.p-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.p-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--p-text-2); margin-bottom: 4px; }
.p-field .p-input { font-size: 15px; }
.p-field-wide { grid-column: 1 / -1; }
.p-field-static {
    padding: 11px 12px; border: 1px solid var(--p-border); border-radius: 8px;
    background: #f6f6f8; color: var(--p-text-2); font-size: 15px;
}
@media (max-width: 700px) { .p-fields { grid-template-columns: 1fr; } }

/* ── Request history: our reply ───────────────────────────── */
.p-hist-reply {
    margin-top: 8px; background: #f7f7f8; border-radius: 8px; padding: 10px 13px;
    font-size: 13.5px; color: var(--p-text); line-height: 1.55;
}
.p-hist-reply-who {
    display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.4px; color: var(--p-muted); margin-bottom: 4px;
}
.p-hist-yours { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--p-muted); margin-bottom: 3px; }
.p-hist-await { margin-top: 8px; font-size: 13px; color: var(--p-amber); }
