/* Quaylight customer portal: a concept build by Rouge Flamingo. Its own brand, not Rouge Flamingo's. */
:root {
  --navy: #12263f; --navy-2: #1d3a5c; --orange: #e8742c; --orange-2: #fdebdf; --ink: #18212b; --muted: #5f6b78;
  --line: #e2e6ec; --bg: #f3f5f8; --card: #fff; --green: #23784a; --green-2: #e1f1e7; --blue: #2558a8; --blue-2: #e3ecf9; --amber: #92600b; --amber-2: #fbefd6;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.demo-banner { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; align-items: center; padding: 8px 16px; background: #3d1a2b; color: #fbf5f0; font-size: 13px; text-align: center; }
.demo-banner a { color: #f4a6bb; font-weight: 600; }

.bar { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 28px; padding: 0 28px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 18px; line-height: 1; }
.brand small { display: block; font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; margin-top: 3px; }
.brand__mark { width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #ffb27d, var(--orange) 60%); box-shadow: 0 0 0 4px rgba(232, 116, 44, .25); }
.tabs { display: flex; gap: 4px; margin-right: auto; overflow-x: auto; }
.tabs a { padding: 22px 14px; text-decoration: none; color: rgba(255,255,255,.75); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: #fff; }
.tabs a.is-on { color: #fff; border-bottom-color: var(--orange); }
.badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; margin-left: 4px; vertical-align: 1px; }
.badge[hidden] { display: none; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.who small { display: block; opacity: .7; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 28px 24px 70px; outline: none; display: grid; gap: 22px; }
h1 { font-size: 26px; margin: 0; letter-spacing: -0.01em; }
.sub { color: var(--muted); margin: 4px 0 0; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; min-width: 0; }
.card h2 { font-size: 16px; margin: 0 0 14px; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 16px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.btn--primary { background: var(--orange); border-color: var(--orange); color: #fff; }
.btn--primary:hover { background: #d4641e; }
.btn:disabled { opacity: .5; cursor: default; }
.link { color: var(--blue); font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat b { display: block; font-size: 28px; letter-spacing: -0.02em; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 600; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; }
.filters input { min-width: 240px; flex: 1; }
.ship { display: grid; grid-template-columns: 1.1fr 1.6fr 1fr auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ship:last-child { border-bottom: 0; }
.ship:hover .ship__ref { color: var(--orange); }
.ship__ref { font-weight: 800; }
.ship small { display: block; color: var(--muted); font-size: 13px; }
.route { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.route__line { flex: 1; height: 4px; border-radius: 2px; background: var(--line); position: relative; min-width: 40px; }
.route__line i { position: absolute; inset: 0 auto 0 0; background: var(--orange); border-radius: 2px; }
.route__line b { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--orange); transform: translate(-50%, -50%); }
.status { display: inline-block; border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; }
.status--transit { background: var(--blue-2); color: var(--blue); }
.status--customs { background: var(--amber-2); color: var(--amber); }
.status--delivered { background: var(--green-2); color: var(--green); }
.status--booked { background: var(--orange-2); color: #a44d16; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

.detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.facts dt { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-weight: 600; }
.map { width: 100%; height: auto; display: block; margin: 6px 0 4px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.steps li::before { content: ""; position: absolute; left: 12px; top: 22px; bottom: -2px; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 13px; color: #fff; position: relative; z-index: 1; }
.steps .done .dot { background: var(--green); border-color: var(--green); }
.steps .now .dot { background: var(--orange); border-color: var(--orange); box-shadow: 0 0 0 5px var(--orange-2); }
.steps .done::before { background: var(--green); }
.steps strong { display: block; }
.steps small { color: var(--muted); }
.steps .next strong { color: var(--muted); font-weight: 600; }
.back { justify-self: start; }
.alert { background: var(--orange-2); border-radius: 12px; padding: 12px 16px; font-size: 14px; }

form.book { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
form.book label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
form.book .full { grid-column: 1 / -1; }
form.book input, form.book select, form.book textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 400; background: #fff; }
form.book textarea { min-height: 80px; resize: vertical; }
form.book .err { color: #b4413a; font-size: 13px; font-weight: 500; min-height: 1em; }
.quote { position: sticky; top: 16px; display: grid; gap: 10px; }
.quote__price { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; }
.quote ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.quote small { color: var(--muted); }

.docs { width: 100%; border-collapse: collapse; font-size: 14px; }
.docs th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.docs td { padding: 13px 10px; border-bottom: 1px solid var(--line); }
.doc-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--blue-2); color: var(--blue); font-size: 11px; font-weight: 800; margin-right: 10px; vertical-align: middle; }

.thread { display: grid; gap: 12px; max-height: 420px; overflow-y: auto; padding-right: 4px; }
.msg { max-width: 78%; padding: 11px 14px; border-radius: 14px; font-size: 14px; }
.msg small { display: block; opacity: .7; font-size: 12px; margin-top: 4px; }
.msg--them { background: var(--bg); border-top-left-radius: 4px; }
.msg--me { background: var(--navy); color: #fff; justify-self: end; border-top-right-radius: 4px; }
form.reply { display: flex; gap: 10px; margin-top: 14px; }
form.reply input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; opacity: 0; transition: .2s; pointer-events: none; z-index: 30; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 960px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .detail { grid-template-columns: 1fr; } .quote { position: static; } }
@media (max-width: 720px) {
  .bar { flex-wrap: wrap; gap: 6px 16px; padding: 10px 16px 0; }
  .who__text { display: none; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .tabs a { padding: 12px 10px; }
  .wrap { padding: 20px 16px 60px; }
  .ship { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .ship .route { grid-column: 1 / -1; order: 3; }
  .ship .eta { display: none; }
  form.book { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .filters input { min-width: 0; }
  .msg { max-width: 90%; }
}
