/* public.css — Tara Barko Maritime Services public portal.
   Loaded after styles.css, which supplies the brand palette, buttons, tables,
   form fields, modal and toast. Only the outward-facing shell lives here. */

body.portal{ background:var(--bg); display:flex; flex-direction:column; min-height:100%; }

/* ---------- top bar ---------- */
.p-top{
  position:sticky; top:0; z-index:40;
  background:#fff;
  border-bottom:1px solid var(--border);
  box-shadow:0 1px 3px rgba(13,33,102,.06);
}
.p-top-in{
  max-width:1140px; margin:0 auto; padding:10px 22px;
  display:flex; align-items:center; gap:18px;
}
.p-brand{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.p-logo{ width:46px; height:46px; flex:none; display:block; }
.p-brand-txt strong{
  display:block; font-size:15px; line-height:1.1; letter-spacing:.06em;
  color:var(--tb-blue); font-weight:800;
}
.p-brand-txt span{
  display:block; font-size:10.5px; letter-spacing:.14em;
  color:var(--tb-orange); font-weight:700;
}

.p-nav{ display:flex; gap:6px; margin-left:auto; }
.p-nav a{
  color:var(--tb-blue); text-decoration:none; font-size:14px; font-weight:700;
  padding:10px 20px; border-radius:8px; white-space:nowrap;
  border:2px solid transparent;
}
.p-nav a:hover{ background:var(--tb-blue-soft); }
.p-nav a.active{ background:var(--tb-blue); color:#fff; }
.p-nav a[data-p="enroll"]{ color:var(--tb-orange); }
.p-nav a[data-p="enroll"]:hover{ background:var(--tb-orange-soft); }
.p-nav a[data-p="enroll"].active{ background:var(--tb-orange); color:#fff; }

/* ---------- page frame ---------- */
.p-wrap{ max-width:1140px; width:100%; margin:0 auto; padding:26px 22px 70px; flex:1; }
.p-narrow{ max-width:820px; margin:0 auto; }
.p-flex{ flex:1; }

.btn-lg{ padding:12px 26px; font-size:14.5px; }
.btn-onblue{
  background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.42);
}
.btn-onblue:hover{ background:rgba(255,255,255,.24); }

/* ---------- section heads ---------- */
.p-sec-head{ margin:30px 0 12px; }
.p-sec-head h2{ margin:0; font-size:19px; color:var(--tb-blue-900); letter-spacing:-.01em; }
.p-sec-head p{ margin:4px 0 0; font-size:13px; color:var(--muted); }
.p-sec-center{ text-align:center; margin:22px 0 18px; }

.p-group{
  margin:22px 0 10px; font-size:11px; font-weight:800;
  letter-spacing:.11em; text-transform:uppercase; color:var(--tb-orange);
  padding-bottom:6px; border-bottom:2px solid var(--tb-orange-soft);
}
.p-note-inline{ margin:-4px 0 12px; font-size:12px; color:var(--muted); }
.p-note-inline.ok{ color:var(--ok); font-weight:600; }

/* ---------- schedule rows ---------- */
.p-sched{
  display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding:14px 16px; border:1px solid var(--border); border-radius:10px;
  background:var(--surface); margin-bottom:9px;
}
.p-pick{ cursor:pointer; }
.p-pick input{ width:auto; margin:0; flex:none; accent-color:var(--tb-orange); }
.p-sched.chosen{ border-color:var(--tb-orange); box-shadow:0 0 0 2px var(--tb-orange-soft); }
.p-when{ font-weight:600; color:var(--tb-blue-900); min-width:210px; font-size:13.5px; }
.p-when b{ color:var(--tb-blue); }
.p-when small{ display:block; font-weight:500; color:var(--muted); font-size:11.5px; margin-top:2px; }
.p-seats{ font-size:12px; color:var(--text-2); white-space:nowrap; }
.p-seats b{ color:var(--ok); font-size:14px; }
.p-seats b.low{ color:var(--tb-orange); }
.p-seats-fee b{ color:var(--tb-blue); font-size:15px; }

/* ---------- segmented sub-tabs (Enroll Now) ---------- */
.p-seg{
  display:flex; gap:4px; background:var(--surface); padding:5px;
  border:1px solid var(--border); border-radius:11px; margin-bottom:20px;
  box-shadow:var(--shadow);
}
.p-seg-btn{
  flex:1; text-align:center; padding:11px 14px; border-radius:8px;
  font-size:13.5px; font-weight:700; color:var(--text-2); text-decoration:none;
}
.p-seg-btn:hover{ background:var(--surface-2); color:var(--tb-blue); }
.p-seg-btn.on{ background:var(--tb-blue); color:#fff; }

/* ---------- wizard ---------- */
.p-steps{ display:flex; margin-bottom:20px; }
.p-step{
  flex:1; min-width:0; padding:11px 14px; font-size:12.5px; font-weight:700;
  color:var(--muted); background:var(--surface-2);
  border:1px solid var(--border); border-right:0;
  display:flex; align-items:center; gap:8px;
}
.p-step:first-child{ border-radius:9px 0 0 9px; }
.p-step:last-child{ border-right:1px solid var(--border); border-radius:0 9px 9px 0; }
.p-step .n{
  display:inline-grid; place-items:center; width:21px; height:21px; border-radius:50%;
  background:var(--border-strong); color:#fff; font-size:11px; flex:none;
}
.p-step.on{ color:var(--tb-blue-900); background:var(--surface); border-color:var(--tb-orange); }
.p-step.on .n{ background:var(--tb-orange); }
.p-step.done{ color:var(--ok); background:var(--ok-bg); }
.p-step.done .n{ background:var(--ok); }

.p-panel{
  background:var(--surface); border:1px solid var(--border);
  border-radius:12px; padding:24px 26px; box-shadow:var(--shadow);
}
.p-panel h2{ margin:0 0 4px; font-size:18px; color:var(--tb-blue-900); }
.p-lead{ margin:0 0 18px; font-size:13px; color:var(--muted); }
.p-center{ text-align:center; margin-bottom:18px; }
.p-acts{
  display:flex; gap:10px; justify-content:space-between; align-items:center;
  margin-top:22px; padding-top:18px; border-top:1px solid var(--border); flex-wrap:wrap;
}
.p-acts-right{ display:flex; gap:10px; }
/* A row with nothing on the left — "Back to Courses" went with the catalogue —
   would leave its only button stranded on the left by space-between. */
.p-acts-end{ justify-content:flex-end; }
.p-req{ color:var(--tb-orange); font-weight:800; }
.fld.bad input, .fld.bad select, .fld.bad textarea{ border-color:var(--bad); background:var(--bad-bg); }
.p-consent{
  display:flex; gap:10px; align-items:flex-start; margin-top:18px;
  font-size:12.5px; cursor:pointer; background:var(--surface-2);
  border:1px solid var(--border); border-radius:9px; padding:13px 15px;
}
.p-consent input{ width:auto; margin:2px 0 0; flex:none; accent-color:var(--tb-orange); }

/* ---------- terms and conditions ---------- */
.p-terms{
  border:1px solid var(--border-strong); border-radius:10px;
  background:var(--surface); margin-top:18px; overflow:hidden;
}
.p-terms-head{
  display:flex; align-items:baseline; gap:12px; flex-wrap:wrap;
  padding:12px 16px; background:var(--tb-blue-900); color:#fff;
}
.p-terms-head h4{
  margin:0; font-size:12.5px; font-weight:800; letter-spacing:.18em;
}
.p-terms-ver{ margin-left:auto; font-size:10.5px; color:#9fb0dd; font-family:var(--mono); }
.p-terms-body{
  max-height:300px; overflow-y:auto; padding:16px 18px;
  font-size:12.5px; line-height:1.6; color:var(--text-2);
}
.p-terms-body:focus{ outline:2px solid var(--tb-blue); outline-offset:-2px; }
.p-terms-sec + .p-terms-sec{ margin-top:16px; }
.p-terms-sec h5{
  margin:0 0 5px; font-size:13px; color:var(--tb-blue-900); font-weight:700;
}
.p-terms-n{ color:var(--tb-orange); font-weight:800; margin-right:7px; }
.p-terms-sec p{ margin:0 0 6px; }
.p-terms-sec ul{ margin:4px 0 0; padding-left:18px; }
.p-terms-sec li{ margin-bottom:2px; }

.p-agree{
  border:1px solid var(--border-strong); border-top:0;
  border-radius:0 0 10px 10px; margin-top:-1px;
  padding:14px 16px 12px; background:var(--surface-2);
}
.p-agree.bad{ border-color:var(--bad); background:var(--bad-bg); }
.p-agree-lead{ margin:0 0 10px; font-size:12.5px; font-weight:700; color:var(--tb-blue-900); }
.p-agree-box{
  display:flex; gap:10px; align-items:flex-start; cursor:pointer;
  font-size:12.5px; padding:6px 0;
}
.p-agree-box input{ width:auto; margin:1px 0 0; flex:none; accent-color:var(--tb-orange); }

.p-total{ display:flex; justify-content:flex-end; }
.p-total table{ width:340px; }
.p-total-row td{
  font-weight:800; border-top:2px solid var(--border-strong); padding-top:8px;
  color:var(--tb-blue); font-size:15px;
}

/* ---------- review & slip ---------- */
.p-review{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:0 28px; }
.p-ok-mark{
  width:60px; height:60px; border-radius:50%; background:var(--ok-bg); color:var(--ok);
  display:grid; place-items:center; font-size:32px; margin:0 auto 14px;
}
.p-ref{
  font-family:var(--mono); font-size:32px; font-weight:800; letter-spacing:.18em;
  color:var(--tb-blue-900); background:var(--tb-orange-soft);
  border:2px dashed var(--tb-orange);
  padding:12px 20px; border-radius:10px; display:inline-block; margin:18px 0 6px;
}
.p-appno{ font-size:12px; margin:0; }

.p-slip{ border:2px solid var(--tb-blue); border-radius:12px; padding:24px 26px; background:var(--surface); }
.p-slip-head{
  display:flex; gap:16px; align-items:flex-start;
  border-bottom:3px solid var(--tb-orange); padding-bottom:14px; margin-bottom:16px;
}
.p-slip-logo{ width:62px; height:62px; flex:none; }
.p-slip-org{ flex:1; font-size:12px; }
.p-slip-name{ font-size:15px; font-weight:800; color:var(--tb-blue); margin-bottom:2px; }
.p-slip-no{ text-align:right; font-size:12px; }
.p-slip-kind{ font-size:10px; letter-spacing:.16em; color:var(--tb-orange); font-weight:800; }
.p-slip-num{ font-size:15px; font-weight:700; color:var(--tb-blue-900); }
.p-slip-note{ margin-top:14px; margin-bottom:0; }

/* Requirements still owed after submitting. Inside the slip, so the screenshot
   the applicant sends carries the list back to them. */
.p-reqs{
  margin-top:16px; padding:14px 16px;
  border:1px dashed var(--tb-orange); border-radius:10px;
  background:var(--tb-orange-soft);
}
.p-reqs h5{
  margin:0 0 8px; font-size:12.5px; font-weight:800; color:var(--tb-blue-900);
  letter-spacing:.02em; line-height:1.4;
}
.p-reqs-page{
  margin:-4px 0 9px; font-size:12.5px; font-weight:700; color:var(--tb-orange-600);
  font-family:var(--mono);
}
.p-reqs ul{ margin:0; padding-left:20px; }
.p-reqs li{
  font-size:13px; color:var(--text); margin-bottom:4px; font-weight:600;
}
.p-reqs li:last-child{ margin-bottom:0; }
.p-reqs li::marker{ color:var(--tb-orange); }

/* ---------- tracker ---------- */
/* SRN and last name on the tracker. Upper-cased on screen only — the stored
   value keeps whatever the applicant typed, and matching is case-insensitive. */
.p-caps{ text-transform:uppercase; font-weight:600; letter-spacing:.03em; }
.p-caps::placeholder{ text-transform:none; font-weight:400; letter-spacing:0; }

.p-others{ margin-top:14px; }
.p-other-row{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  padding:10px 0; border-bottom:1px solid var(--border); font-size:13px;
}
.p-other-row:last-child{ border-bottom:0; }
.p-other-row b{ color:var(--tb-blue-900); }
.p-other-row small{ display:block; color:var(--muted); font-size:11.5px; margin-top:1px; }
.p-track-err{ margin-top:16px; margin-bottom:0; }
.p-track-res{ margin-top:18px; }
.p-track-head{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:flex-start; }
.p-track-head h2{ margin:0; }
.p-flush{ margin-bottom:0; }
.p-hint{
  margin-top:16px; text-align:center; font-size:12.5px; color:var(--muted);
  padding:0 20px;
}

.p-time{ list-style:none; margin:0; padding:0; }
.p-time li{ position:relative; padding:0 0 22px 30px; border-left:2px solid var(--border); }
.p-time li:last-child{ border-left-color:transparent; padding-bottom:0; }
.p-time li::before{
  content:''; position:absolute; left:-7px; top:2px; width:12px; height:12px;
  border-radius:50%; background:var(--border-strong); border:2px solid var(--surface);
}
.p-time li.hit::before{ background:var(--tb-blue); }
.p-time li.hit:last-child::before{ background:var(--ok); }
.p-time li.closed::before{ background:var(--bad); }
.p-time .t-when{ font-size:11.5px; color:var(--muted); font-family:var(--mono); }
.p-time .t-what{ font-weight:700; color:var(--tb-blue-900); font-size:13.5px; }
.p-time li.closed .t-what{ color:var(--bad); }
.p-time .t-note{ font-size:12.5px; color:var(--text-2); }

/* styles.css ships .note, .note.warn and .note.bad — the portal also needs a
   positive one for "you are enrolled". */
.note.ok{ background:var(--ok-bg); border-left-color:var(--ok); }

/* ---------- footer ---------- */
.p-foot{ background:var(--tb-blue-900); color:#9fb0dd; font-size:12.5px; padding:28px 22px; }
.p-foot-in{ max-width:1140px; margin:0 auto; display:flex; gap:24px; flex-wrap:wrap; }
.p-foot-col{ flex:1; min-width:210px; }
.p-foot b{ color:#fff; display:block; margin-bottom:5px; font-size:13px; }
.p-staff{ margin-top:10px; }
.p-staff a{ color:var(--tb-orange); text-decoration:none; font-weight:700; }
.p-staff a:hover{ text-decoration:underline; }

@media print{
  .p-top, .p-foot, .p-acts, .p-seg, .no-print{ display:none !important; }
  .p-wrap{ padding:0; max-width:none; }
  .p-slip{ border-width:1px; box-shadow:none; }
}
@media (max-width:820px){
  .p-hero{ padding:28px 22px; }
  .p-hero h1{ font-size:23px; }
  .p-hero-stats{ width:100%; }
  .p-hero-stats div{ flex:1; }
}
@media (max-width:640px){
  .p-top-in{ flex-wrap:wrap; gap:10px; padding:10px 16px; }
  .p-nav{ width:100%; margin-left:0; }
  .p-nav a{ flex:1; text-align:center; padding:10px 8px; }
  .p-wrap{ padding:18px 14px 50px; }
  .p-panel{ padding:18px 16px; }
  .p-step .l{ display:none; }
  .p-step{ justify-content:center; padding:11px 6px; }
  .p-ref{ font-size:25px; letter-spacing:.13em; }
  .p-slip{ padding:18px 16px; }
  .p-slip-head{ flex-wrap:wrap; }
  .p-slip-no{ text-align:left; }
  .p-acts{ flex-direction:column; align-items:stretch; }
  .p-acts .btn, .p-acts-right{ width:100%; }
  .p-acts-right .btn{ flex:1; }
}

/* Typed in capitals, the way the papers are written. The value is uppercased
   again when the form is read, because this only changes how it looks — a
   pasted or autofilled value would otherwise be stored as it came. */
.caps{text-transform:uppercase}
