:root {
  --fjord: #164c5b;
  --fjord-dark: #0d3540;
  --sea: #eaf4f4;
  --sand: #f7f3ea;
  --accent: #d98b3a;
  --text: #19343a;
  --muted: #62767b;
  --border: #cfdddf;
  --white: #fff;
  --danger: #a7352c;
  --success: #2f7555;
  --shadow: 0 18px 50px rgba(13, 53, 64, .12);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--sand);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: linear-gradient(145deg, #eef7f5 0%, var(--sand) 48%, #f3eadc 100%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, .service-option, .timing-option, .boat-option { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; transform: none !important; box-shadow: none !important; }
.hidden { display: none !important; }
.portal-group-hidden { display: none !important; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(18px, 4vw, 54px); color: white; background: rgba(13, 53, 64, .96); backdrop-filter: blur(12px); }
.brand { display: flex; gap: 12px; align-items: center; font-weight: 800; letter-spacing: .01em; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent); font-size: 20px; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.language-switch { display: flex; padding: 3px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; }
.lang-btn { min-width: 70px; border: 0; border-radius: 999px; padding: 6px 11px; color: white; background: transparent; font-weight: 800; }
.lang-btn.active { color: var(--fjord-dark); background: white; }
.mode { border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 7px 12px; font-size: 12px; }
.shell { width: min(1160px, calc(100% - 28px)); margin: 28px auto 60px; }
.hero { display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: stretch; margin-bottom: 22px; }
.hero-copy, .security-card, .card { border: 1px solid rgba(207,221,223,.9); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.hero-copy { padding: clamp(24px, 4vw, 44px); background: linear-gradient(145deg, white 0%, #f7fbfa 100%); }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 12px; }
h1 { margin: 0; font-size: clamp(32px, 6vw, 60px); line-height: 1; color: var(--fjord-dark); letter-spacing: -.045em; }
.lead { max-width: 690px; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.security-card { padding: 24px; color: white; border: 0; background: linear-gradient(160deg, var(--fjord) 0%, var(--fjord-dark) 100%); }
.security-card h2 { margin: 12px 0 10px; font-size: 21px; }
.security-card p { margin: 0; line-height: 1.55; color: #d9e9e8; }
.lock { font-size: 28px; }
.login-card { width: min(520px, 100%); margin: 36px auto; padding: clamp(24px, 5vw, 40px); }
.login-card h2, .card h2 { margin: 0 0 7px; color: var(--fjord-dark); }
.sub { color: var(--muted); line-height: 1.5; margin: 0 0 22px; }
.field { display: grid; gap: 7px; margin: 15px 0; }
.phone-input-group { display: grid; grid-template-columns: minmax(98px, .42fr) minmax(150px, 1fr); gap: 8px; }
.phone-input-group .custom-code { grid-column: 1 / -1; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.4; }
label { font-weight: 750; font-size: 14px; }
input, select, textarea { width: 100%; min-height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; color: var(--text); background: white; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(217,139,58,.2); border-color: var(--accent); }
input[readonly] { cursor: not-allowed; color: #53686d; border-style: dashed; background: #f0f4f3; }
.locked-field label::after { content: " 🔒"; font-size: 12px; }
.emergency-contact-card { margin: 12px 0 18px; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #f7fbfa; }
.emergency-contact-card legend { padding: 0 7px; color: var(--fjord-dark); font-weight: 850; }
.emergency-contact-card > .field-help { display: block; margin: 0 0 4px; }
.emergency-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.emergency-grid .span-2 { grid-column: 1 / -1; }
.btn { min-height: 48px; border: 0; border-radius: 12px; padding: 12px 17px; font-weight: 800; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--fjord); box-shadow: 0 8px 18px rgba(22,76,91,.2); }
.btn-accent { color: white; background: var(--accent); }
.btn-quiet { color: var(--fjord); border: 1px solid var(--border); background: white; }
.btn-danger { color: var(--danger); border: 1px solid #e9c4c1; background: #fff7f6; }
.wide { width: 100%; }
.note { margin: 16px 0 0; padding: 12px; border-radius: 10px; color: #6b5726; background: #fff7df; font-size: 13px; line-height: 1.45; }
.portal-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin: 14px 0 22px; }
.portal-head h1 { font-size: clamp(30px, 5vw, 48px); }
.booking-pill { flex: 0 0 auto; padding: 10px 14px; border-radius: 999px; color: var(--fjord); background: var(--sea); font-weight: 800; }
.task-center { margin-bottom: 18px; }
.task-center-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.status-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 850; white-space: nowrap; }
.status-chip.success { color: #20563f; background: #e4f4eb; }
.next-action { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 18px 0; padding: 17px; border-radius: 16px; color: white; background: linear-gradient(135deg, var(--fjord-dark), var(--fjord)); }
.next-action-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--fjord-dark); background: white; font-size: 22px; font-weight: 900; }
.next-action small, .next-action strong { display: block; }
.next-action small { margin-bottom: 3px; color: #bcd7d7; font-weight: 750; }
.next-action strong { font-size: 18px; }
.next-action p { margin: 4px 0 0; color: #dcebea; font-size: 13px; line-height: 1.45; }
.next-action .btn { color: var(--fjord-dark); background: white; box-shadow: none; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-action { display: flex; gap: 10px; align-items: center; min-height: 70px; padding: 12px; text-align: left; color: var(--text); border: 1px solid var(--border); border-radius: 13px; background: white; }
.quick-action:hover { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,139,58,.1); }
.quick-action > span:first-child { font-size: 22px; }
.quick-action > span:last-child { display: grid; gap: 3px; }
.quick-action small { color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.booking-chooser { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; padding: 16px 20px; }
.booking-chooser p { margin: 4px 0 0; }
.booking-chooser select { display: none; }
.booking-card-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; width: 100%; }
.booking-card { display: grid; gap: 5px; min-height: 96px; padding: 14px; text-align: left; color: var(--text); border: 1px solid var(--border); border-radius: 14px; background: white; }
.booking-card strong { color: var(--fjord-dark); }
.booking-card small { color: var(--muted); line-height: 1.4; }
.booking-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,139,58,.14); background: #fffaf4; }
.portal-status { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; margin-bottom: 18px; padding: 14px 17px; border: 1px solid #9bcbb1; border-radius: 14px; color: #20563f; background: #eef8f2; }
.portal-status.pending { color: #70520e; border-color: #e8c58f; background: #fff9ef; }
.portal-status.error { color: #67231e; border-color: #e9b6b1; background: #fff5f4; }
.portal-status > span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: white; background: currentColor; font-weight: 900; }
.portal-status > span::first-line { color: white; }
.portal-status p { margin: 3px 0 0; line-height: 1.45; }
.past-booking-notice { display: grid; gap: 5px; margin-bottom: 18px; padding: 15px 18px; border: 1px solid #d7c79b; border-left: 5px solid #9b7417; border-radius: 14px; color: #5e4711; background: #fff9e8; }
.past-booking-notice strong { font-size: 17px; }
.past-booking-notice span { line-height: 1.5; }
.metric { padding: 18px; border-radius: 16px; color: white; background: var(--fjord); }
.metric:nth-child(2) { background: #397468; }
.metric:nth-child(3) { color: var(--text); background: #f2d9b8; }
.metric:nth-child(4) { color: var(--text); background: var(--white); border: 1px solid var(--border); }
.metric small { display: block; opacity: .76; margin-bottom: 6px; }
.metric strong { font-size: 20px; }
.payment-overview .payment-open-row strong { color: var(--danger); font-size: 20px; }
.payment-overview.settled .payment-open-row strong { color: var(--success); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { padding: clamp(20px, 3vw, 28px); }
.card.full { grid-column: 1 / -1; }
.checklist { display: grid; gap: 10px; margin-top: 16px; }
.check { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: #f4f9f8; }
.check span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: white; background: var(--success); font-size: 13px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.summary { display: grid; gap: 10px; margin: 18px 0; }
.row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 9px; border-bottom: 1px solid #edf1f1; }
.row span { color: var(--muted); }
.availability { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--sea); line-height: 1.5; }
.availability.ok { color: var(--success); background: #e9f6ef; }
.availability.no { color: var(--danger); background: #fff0ef; }
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.section-head h3 { margin: 0; color: var(--fjord-dark); }
.order-history, .message-history { margin-top: 24px; padding-top: 4px; border-top: 1px solid var(--border); }
.timeline-list { display: grid; gap: 10px; margin-top: 12px; }
.timeline-item { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: 13px; background: #fbfdfc; }
.timeline-item.answered, .timeline-item.confirmed { border-left-color: var(--success); }
.timeline-item.cancelled { border-left-color: var(--danger); opacity: .75; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--muted); font-size: 12px; }
.timeline-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.timeline-actions .btn { min-height: 40px; padding: 8px 12px; font-size: 13px; }
.comparison-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.comparison-card { padding: 15px; border: 1px solid var(--border); border-radius: 13px; background: white; }
.comparison-card.new { border-color: #9bcbb1; background: #f3faf6; }
.comparison-card h3 { margin: 0 0 10px; color: var(--fjord-dark); font-size: 16px; }
.comparison-card dl { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; margin: 0; }
.comparison-card dt { color: var(--muted); }
.comparison-card dd { margin: 0; font-weight: 800; text-align: right; }
.fee-box { margin-top: 14px; padding: 14px; border-left: 4px solid var(--accent); background: #fff8ee; }
.change-form { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #f9fcfb; }
.boat-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.boat-option { display: flex; gap: 12px; align-items: center; min-height: 76px; padding: 14px; border: 1px solid var(--border); border-radius: 13px; background: white; cursor: pointer; }
.boat-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,139,58,.14); }
.boat-option.unavailable { opacity: .55; cursor: not-allowed; background: #f3f5f5; }
.boat-option input { width: 22px; min-height: 22px; margin: 0; }
.boat-option span { display: grid; gap: 4px; }
.boat-option small { color: var(--muted); }
.service-form { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #f9fcfb; }
.service-choice { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0 0 14px; padding: 0; border: 0; }
.service-choice legend { grid-column: 1 / -1; margin-bottom: 8px; font-weight: 800; }
.service-option { display: flex; gap: 10px; align-items: center; min-height: 70px; margin: 0; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.service-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,139,58,.14); }
.service-option input { flex: 0 0 auto; width: 22px; min-height: 22px; margin: 0; }
.service-option span { display: grid; gap: 4px; }
.service-option small { color: var(--muted); line-height: 1.4; }
.service-clear { width: auto; min-height: 42px; margin-top: 10px; padding: 9px 13px; border: 1px solid var(--border); color: var(--fjord); background: #f6faf9; font-size: 13px; font-weight: 800; }
.service-clear:hover { background: var(--sea); }
.fuel-option { margin: 0 0 8px; }
.service-request-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0 14px; }
.service-details { display: grid; grid-template-columns: minmax(180px, .4fr) minmax(0, 1fr); gap: 14px; align-items: end; }
.service-details .field { margin-top: 0; }
.service-details .service-timing { min-width: 0; }
.service-timing { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--sea); }
.service-timing legend { width: 100%; padding: 0; font-weight: 800; }
.timing-option { display: flex; gap: 8px; align-items: center; min-height: 44px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: white; }
.timing-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,139,58,.14); }
.timing-option input { width: 20px; min-height: 20px; margin: 0; }
.timing-date { flex: 1 1 210px; width: auto; }
.live-calculation { display: flex; gap: 9px; align-items: center; margin-top: 8px; padding: 11px 13px; border-radius: 11px; color: var(--fjord); background: var(--sea); font-size: 13px; font-weight: 750; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(47,117,85,.13); }
.fishreg-access { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--sea); }
.fishreg-request { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin: 16px 0; padding: 18px; border: 1px solid #9bcbb1; border-radius: 16px; background: #eef7f2; }
.fishreg-request p { margin: 0; line-height: 1.55; }
.fishreg-request .btn { flex: 0 0 auto; }
.fishreg-code { display: block; margin-top: 5px; color: var(--fjord-dark); font-size: clamp(30px, 6vw, 46px); letter-spacing: .14em; }
.fishreg-link-group { display: grid; gap: 8px; justify-items: end; }
.fishreg-link-group code { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.fishreg-warning { margin: 18px 0; padding: 17px; border: 1px solid #e9b6b1; border-left: 5px solid var(--danger); border-radius: 12px; color: #67231e; background: #fff5f4; line-height: 1.55; }
.fishreg-warning > strong { display: block; margin-bottom: 8px; font-size: 17px; }
.fishreg-warning p { margin: 8px 0 0; }
.text-link { color: var(--fjord); font-weight: 800; text-underline-offset: 3px; }
.faq-question-form { padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: #f9fcfb; }
.faq-question-form .field { margin-top: 0; }
.faq-results { display: grid; gap: 11px; margin-top: 18px; }
.faq-results h3 { margin: 0 0 2px; color: var(--fjord-dark); font-size: 17px; }
.faq-match { padding: 15px 17px; border: 1px solid var(--border); border-left: 5px solid var(--success); border-radius: 13px; background: #f4faf7; }
.faq-match strong { display: block; margin-bottom: 6px; color: var(--fjord-dark); }
.faq-match p { margin: 0; color: var(--text); line-height: 1.55; }
.faq-legal-source { display: inline-block; margin-top: 10px; color: var(--fjord); font-size: 13px; font-weight: 800; text-underline-offset: 3px; }
.faq-send-panel { margin-top: 14px; padding: 15px 17px; border: 1px solid #e8c58f; border-left: 5px solid var(--accent); border-radius: 13px; background: #fff9ef; }
.faq-send-panel p { margin: 0 0 12px; line-height: 1.5; }
.faq-source-link { display: inline-block; margin-top: 16px; }
.section-title { margin: 24px 0 12px; color: var(--fjord-dark); font-size: 17px; }
.cancellation-current { padding: 18px; border: 1px solid #edd0cd; border-radius: 14px; color: var(--text); background: #fff8f7; }
.cancellation-current strong { display: block; margin-bottom: 6px; color: var(--danger); font-size: 18px; }
.cancellation-schedule { display: grid; gap: 10px; }
.cancellation-period { display: grid; grid-template-columns: minmax(190px, .75fr) 1fr; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: white; }
.cancellation-period span { color: var(--muted); }
.cancellation-period strong { color: var(--fjord-dark); }
.danger-zone { border-color: #e5c8c5; }
.mobile-portal-nav { display: none; }
.fineprint { color: var(--muted); font-size: 12px; line-height: 1.55; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 390px; padding: 15px 18px; border-radius: 14px; color: white; background: var(--fjord-dark); box-shadow: var(--shadow); z-index: 30; }
.portal-loading { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 14px; color: white; background: rgba(13,53,64,.82); backdrop-filter: blur(5px); }
.loading-spinner { width: 46px; height: 46px; border: 5px solid rgba(255,255,255,.3); border-top-color: white; border-radius: 50%; animation: portal-spin .8s linear infinite; }
@keyframes portal-spin { to { transform: rotate(360deg); } }
@media (max-width: 820px) {
  .hero, .grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .card.full { grid-column: auto; }
  body.portal-active { padding-bottom: 82px; }
  body.portal-active .hero { display: none; }
  .quick-actions { grid-template-columns: 1fr 1fr; }
  .mobile-portal-nav:not(.hidden) { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; padding: 7px; border: 1px solid rgba(207,221,223,.95); border-radius: 18px; background: rgba(255,255,255,.97); box-shadow: 0 12px 40px rgba(13,53,64,.24); backdrop-filter: blur(14px); }
  .mobile-nav-btn { display: grid; gap: 2px; place-items: center; min-width: 0; min-height: 54px; padding: 6px 3px; color: var(--muted); border: 0; border-radius: 12px; background: transparent; }
  .mobile-nav-btn > span { font-size: 20px; line-height: 1; }
  .mobile-nav-btn small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 10px; font-weight: 800; white-space: nowrap; }
  .mobile-nav-btn.active { color: white; background: var(--fjord); }
}
@media (max-width: 560px) {
  .topbar { padding: 12px 14px; }
  .brand span:last-child { display: none; }
  .mode { display: none; }
  .lang-btn { min-width: 62px; padding-inline: 8px; font-size: 12px; }
  .shell { width: min(100% - 18px, 1160px); margin-top: 14px; }
  .portal-head { align-items: flex-start; flex-direction: column; }
  .portal-head h1 { font-size: 30px; }
  .portal-head .action-row { width: 100%; justify-content: space-between; }
  .booking-chooser { align-items: stretch; flex-direction: column; }
  .booking-chooser select { width: 100%; }
  .task-center-head { flex-direction: column; gap: 8px; }
  .next-action { grid-template-columns: auto 1fr; }
  .next-action .btn { grid-column: 1 / -1; width: 100%; }
  .quick-actions { grid-template-columns: 1fr; }
  .metrics, .form-grid { grid-template-columns: 1fr; }
  .emergency-grid { grid-template-columns: 1fr; }
  .emergency-grid .span-2 { grid-column: auto; }
  .phone-input-group { grid-template-columns: minmax(92px, .44fr) minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .metric { padding: 15px; }
  .service-choice { grid-template-columns: 1fr; }
  .service-request-grid, .service-details { grid-template-columns: 1fr; }
  .boat-option-grid { grid-template-columns: 1fr; }
  .fishreg-access { align-items: stretch; flex-direction: column; }
  .fishreg-request { align-items: stretch; flex-direction: column; }
  .fishreg-link-group { justify-items: stretch; }
  .fishreg-link-group .btn { text-align: center; }
  .cancellation-period { grid-template-columns: 1fr; gap: 4px; }
  .comparison-grid { grid-template-columns: 1fr; }
  .action-row .btn { width: 100%; }
  .toast { left: 12px; right: 12px; bottom: 84px; max-width: none; }
}
