/* ==========================================================================================
   MARINA · work.css — partner work areas, requests, import, berth plan, crew, help.
   Uses the same tokens as the rest of the site (--ink, --line, --mute, --bg, --deep, --brass…).
   ========================================================================================== */

/* ---------- shared bits ---------- */
.linkbtn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline .inp { flex: 1; min-width: 0; }
.row-btn { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.danger { color: var(--danger) !important; }
.dh2 { font-size: 20px; margin: 26px 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.dh2 .muted { font-size: 13px; font-weight: 500; }
.notice { display: flex; gap: 10px; align-items: flex-start; background: #fff7ea; border: 1px solid #f1dfbd; border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-size: 14.5px; line-height: 1.5; }
.notice.ok { background: #eef8f2; border-color: #cfe9da; }
.notice svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; margin-top: 2px; }
.promise { display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin: 14px 0; font-size: 15px; }
.promise.big { padding: 18px 20px; font-size: 17px; }
.promise svg { width: 20px; height: 20px; flex: none; stroke: var(--brass, #b89b5e); fill: none; stroke-width: 2; }
.ok-t { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.sm .chip { font-size: 12px; padding: 4px 10px; }
label.chip { cursor: pointer; user-select: none; }
.trnote { display: block; color: var(--mute); font-size: 12px; margin: -4px 0 10px; }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: mspin 0.8s linear infinite; }
@keyframes mspin { to { transform: rotate(360deg); } }

/* verified badge */
.vbadge { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px 2px 6px; border-radius: 999px; background: #eef8f2; color: var(--ok); font: 600 12px Inter, sans-serif; vertical-align: middle; letter-spacing: 0; text-transform: none; }
.vbadge svg, .vtag svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.6; }
.vtag { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: inline-flex; gap: 4px; align-items: center; padding: 4px 10px 4px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.94); color: var(--ok); font: 600 12px Inter, sans-serif; }

/* ---------- partner type chooser ---------- */
.ptypes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ptype { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; color: var(--ink); }
.ptype:hover, .ptype.on { border-color: var(--ink); box-shadow: 0 6px 20px rgba(1, 32, 60, 0.08); }
.ptype i { grid-row: 1 / 3; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.ptype i svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
.ptype b { font-size: 15px; align-self: end; }
.ptype small { color: var(--mute); font-size: 12.5px; line-height: 1.35; }
.pt-chip { display: inline-flex; gap: 8px; align-items: center; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; margin: -4px 0 14px; cursor: pointer; font: 600 13px Inter, sans-serif; color: var(--ink); }
.pt-chip svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.pt-chip span { color: var(--mute); font-weight: 500; }
.how3 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.how3 li { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.how3 span { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 10px; }
.how3 b { display: block; font-size: 17px; margin-bottom: 6px; }
.how3 p { margin: 0; font-size: 14.5px; line-height: 1.5; }
.why { max-width: 860px; margin: 8px auto 26px; padding: 18px 22px; border-left: 3px solid var(--brass, #b89b5e); background: rgba(255, 255, 255, 0.7); border-radius: 0 14px 14px 0; }
.why p { margin: 0; font-size: 15.5px; line-height: 1.6; color: var(--mute); }
.why b { color: var(--ink); }
.mh-more .why { margin: 0 0 14px; padding: 12px 14px; }
.mh-more .why p { font-size: 14px; }

/* ---------- dashboard chrome ---------- */
.today-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.today-h .pill-btn svg, .pill-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.side .nbadge:not(:empty) { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.gives { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.gives li { display: flex; gap: 8px; align-items: flex-start; font-size: 14.5px; line-height: 1.45; }
.gives svg { width: 16px; height: 16px; flex: none; stroke: var(--ok); fill: none; stroke-width: 2.4; margin-top: 3px; }
.rq-li { text-decoration: none; color: inherit; align-items: center; }
.rq-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--line); }
.rq-dot.requested, .rq-dot.accepted { background: var(--danger); box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.12); }
.rq-dot.quoted { background: var(--warn); }
.rq-dot.confirmed { background: var(--ok); }
.helpfab { position: fixed; right: 20px; bottom: 22px; z-index: 900; display: inline-flex; gap: 6px; align-items: center; padding: 12px 18px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font: 600 14px Inter, sans-serif; box-shadow: 0 10px 30px rgba(1, 32, 60, 0.25); cursor: pointer; }
.helpfab svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }
.helpd .steps li { margin-bottom: 8px; line-height: 1.5; }

/* weather in plain words */
.seaplain { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; margin: 0 0 12px; border: 1px solid var(--line); background: #fff; }
.seaplain i { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.seaplain i svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.4; }
.seaplain.ok i { background: var(--ok); }
.seaplain.warn i { background: #d08a1e; }
.seaplain.bad i { background: var(--danger); }
.seaplain b { font-size: 16px; }
.seaplain p { margin: 2px 0 4px; font-size: 14.5px; line-height: 1.45; }
.seaplain small { color: var(--mute); font-size: 12.5px; }
.wx3s { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.wx3 { border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; padding: 12px 14px; background: #fff; display: flex; flex-direction: column; gap: 3px; }
.wx3.ok { border-left-color: var(--ok); }
.wx3.warn { border-left-color: #d08a1e; }
.wx3.bad { border-left-color: var(--danger); }
.wx3 small { color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.wx3 span { color: var(--mute); font-size: 13px; }
.wx3 em { font-style: normal; font-size: 13px; color: var(--danger); margin-top: 4px; }

/* ---------- requests inbox ---------- */
.rq { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; overflow: hidden; min-height: 520px; }
.rq-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 76vh; }
.rq-i { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.rq-i.on, .rq-i:hover { background: var(--bg); }
.rq-i .grow { min-width: 0; }
.rq-i b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-i small { display: block; color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rq-d { padding: 22px 26px; overflow-y: auto; max-height: 76vh; }
.rq-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.rq-back { display: none; align-items: center; gap: 6px; }
.rq-back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.rq-guest { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--bg); border-radius: 14px; }
.rq-act { border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 12px 0; display: flex; flex-direction: column; gap: 12px; }
.rq-act .inline .inp { max-width: 200px; }
.rq-msgs { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.rq-msgs .msg small { display: block; font-size: 11px; opacity: 0.6; margin-top: 2px; }
.msg.sys { align-self: center; background: transparent; color: var(--mute); font-size: 13px; border: 1px dashed var(--line); }
.chips.qr { margin: 10px 0; }
.chips.qr .chip { font-size: 12.5px; cursor: pointer; }
.feebox { border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 12px 0; font-size: 14px; display: flex; flex-direction: column; gap: 6px; }
.feebox > div { display: flex; justify-content: space-between; gap: 10px; }
.feebox .tot { border-top: 1px solid var(--line); padding-top: 8px; font-size: 15.5px; }
.feebox small { color: var(--mute); font-size: 12.5px; line-height: 1.45; }
.fitbox { background: #eef8f2; border: 1px solid #cfe9da; border-radius: 16px; padding: 12px 14px; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.fitbox .chip { cursor: pointer; background: #fff; }
.fitbox .chip.on { background: var(--ink); color: #fff; }
.rq-steps { display: flex; gap: 6px; margin: 14px 0; flex-wrap: wrap; }
.rq-steps span { flex: 1; min-width: 90px; text-align: center; padding: 8px 6px; border-radius: 10px; background: var(--bg); color: var(--mute); font-size: 13px; font-weight: 600; }
.rq-steps span.on { background: var(--ink); color: #fff; }

/* ---------- verification ---------- */
.docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.doc { border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.doc .row3 { gap: 8px; }
.drop.sm { padding: 16px; }
.drop.sm b { display: inline-flex; gap: 8px; align-items: center; }
.drop.sm svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ---------- import ---------- */
.impgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.impc { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #fff; cursor: pointer; color: inherit; text-decoration: none; }
.impc:hover { border-color: var(--ink); }
.impc i { width: 44px; height: 44px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; }
.impc i svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
.impc b { font-size: 16px; }
.impc small { color: var(--mute); font-size: 13px; line-height: 1.4; flex: 1; }
.impbusy { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px; border: 1px dashed var(--line); border-radius: 18px; }
.impres { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #fff; }
.imptbl td { vertical-align: top; }
.imptbl .inp { padding: 8px 10px; font-size: 14px; min-width: 0; }
.imptbl td:nth-child(3) .inp { min-width: 220px; }
.imptbl img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.impgo { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.toggle-line { display: flex; gap: 8px; align-items: center; font-size: 14px; }

/* ---------- integrations ---------- */
.ints { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.int { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.int h3 { font-size: 17px; margin: 0; display: flex; gap: 8px; align-items: center; }
.int h3 svg { width: 20px; height: 20px; stroke: var(--ink); fill: none; stroke-width: 1.8; flex: none; }
.int p { margin: 0; font-size: 14px; line-height: 1.5; }
.int .code { font: 12.5px ui-monospace, Menlo, monospace; }
.qrbox svg { width: 150px; height: 150px; }
.tariffs { margin-top: 22px; }
.tariffs summary { cursor: pointer; font-weight: 700; padding: 10px 0; }

/* ---------- berth plan ---------- */
.bp-leg { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0 16px; font-size: 13px; }
.bp-leg span:not(.muted) { padding: 4px 10px; border-radius: 8px; font-weight: 600; }
.bp-pon { margin-bottom: 18px; }
.bp-pon h3 { font-size: 16px; margin: 0 0 8px; }
.bp-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.bp { border: 1px solid var(--line); border-radius: 10px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; font: 12px Inter, sans-serif; color: var(--ink); min-height: 62px; }
.bp b { font-size: 13px; }
.bp small { color: var(--mute); }
.bp em { font-style: normal; font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp.free, .bp-leg .free { background: #eef8f2; border-color: #cfe9da; }
.bp.reserved, .bp-leg .reserved { background: #fff4e0; border-color: #f1d9a8; }
.bp.occupied, .bp-leg .occupied { background: #e8eef7; border-color: #c9d6ea; }
.bp.blocked, .bp-leg .blocked { background: #f3f3f4; border-color: #ddd; color: #999; text-decoration: line-through; }

/* ---------- public lists: berths, crew, jobs ---------- */
.bfind { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 16px; }
.bfind .field { margin: 0; }
.bres { display: flex; flex-direction: column; gap: 10px; }
.bcard { display: flex; justify-content: space-between; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; background: #fff; }
.bcard > div:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bprice { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; flex: none; }
.bprice b { font-size: 20px; }
.bprice small { color: var(--mute); font-size: 12.5px; }
.bprice .btn { margin-top: 6px; }

/* ---------- setup assistant ---------- */
.chatbot { display: flex; flex-direction: column; gap: 12px; }
.cb-h { display: flex; gap: 12px; align-items: center; }
.cb-h small { display: block; }
.cb-log { display: flex; flex-direction: column; gap: 8px; max-height: 48vh; min-height: 180px; overflow-y: auto; padding: 6px 2px; }
.cb-log .msg { max-width: 86%; line-height: 1.45; }
.cb-act .chip { cursor: pointer; font-size: 14px; padding: 8px 14px; }

/* ---------- phones: the work area stays fast with one thumb ---------- */
@media (max-width: 1100px) {
  .impgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ptypes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .side { position: sticky; top: var(--mh-top, 57px); z-index: 20; scrollbar-width: none; }
  .side::-webkit-scrollbar { display: none; }
  .side a { padding: 9px 12px; font-size: 14px; }
  .side a svg { width: 18px; height: 18px; }
  .rq { grid-template-columns: 1fr; border-radius: 16px; min-height: 0; }
  .rq.has .rq-list { display: none; }
  .rq:not(.has) .rq-d { display: none; }
  .rq-list, .rq-d { max-height: none; border-right: 0; }
  .rq-d { padding: 16px; }
  .rq-back { display: inline-flex; }
  .rq-act .row-btn .btn { flex: 1; justify-content: center; }
  .gives, .docs, .ints, .how3 { grid-template-columns: 1fr; }
  .wx3s { grid-template-columns: 1fr; }
  .ptypes { grid-template-columns: 1fr; }
  .bfind { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bfind .btn { grid-column: 1 / -1; }
  .bcard { flex-direction: column; align-items: stretch; }
  .bprice { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; text-align: left; }
  .bprice .btn { width: 100%; justify-content: center; }
  .impgrid { grid-template-columns: 1fr; }
  .imptbl thead { display: none; }
  .imptbl tr { display: grid; grid-template-columns: 30px 64px 1fr; gap: 6px 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .imptbl td { display: block; border: 0; padding: 0; }
  .imptbl td:nth-child(n + 4) { grid-column: 3; }
  .imptbl td:nth-child(3) .inp { min-width: 0; width: 100%; }
  .helpfab { bottom: 84px; right: 14px; padding: 11px 14px; }
  .helpfab span { display: none; }
  .today-h h1 { font-size: 26px !important; }
  .promise { font-size: 14px; }
}
@media (max-width: 820px) {
  .dmain .tabs { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .dmain .tabs::-webkit-scrollbar { display: none; }
  .dmain .tabs a { white-space: nowrap; padding: 12px 12px !important; }
}
@media (max-width: 820px) {
  .dmain .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
  .dmain .kpi { padding: 12px 14px !important; min-height: 0 !important; }
  .dmain .kpi small { font-size: 12px; }
  .dmain .kpi b { font-size: 24px !important; margin-top: 2px; }
  .dmain .sec-h { flex-wrap: wrap; gap: 10px; }
  .dmain .sec-h .row-btn .btn { padding: 10px 14px; font-size: 14px; }
}
@media (max-width: 820px) {
  #saveAcc .inline { flex-wrap: wrap; }
  #saveAcc .inline .inp { flex: 1 1 100%; }
  #saveAcc .inline .btn { width: 100%; justify-content: center; }
  .rq-steps span { min-width: 0; font-size: 12px; padding: 8px 4px; }
}
