/* ══════════════════════════════════════════════════════════════
   Galvaframe — brand skin for the sign-in, sign-up and customer portal.
   Same look as the public website (new logo, Archivo headings, steel-and-mint
   palette, roomy rounded cards) laid over the existing pages. It only changes
   how things LOOK — no page logic. Light and dark mode both keep working.
   ══════════════════════════════════════════════════════════════ */

:root {
  --gf-ink: #0a1714;
  --gf-ink-2: #10231e;
  --gf-paper: #f4f1ea;
  --gf-display: 'Archivo', 'Inter', system-ui, sans-serif;
}

/* ── Logo lockup ─────────────────────────────────────────────── */
.bl { display: inline-flex; align-items: center; gap: 10px; line-height: 1; }
.bl-mark { height: 40px; width: auto; flex-shrink: 0; filter: drop-shadow(0 2px 5px rgba(0,0,0,.28)); }
.bl-text { display: flex; flex-direction: column; }   /* no divider line between the mark and the name */
.bl-name { font-family: var(--gf-display); font-weight: 800; font-size: 22px; letter-spacing: -.035em; }
.bl-name b { font-weight: 800; color: #34d399; }
.bl-sub { margin-top: 5px; font-size: 9px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; opacity: .72; white-space: nowrap; }
.bl-lg .bl-mark { height: 50px; } .bl-lg .bl-name { font-size: 27px; } .bl-lg .bl-sub { font-size: 10px; }
.bl-sm .bl-mark { height: 30px; } .bl-sm .bl-name { font-size: 18px; } .bl-sm .bl-sub { font-size: 8px; }
.bl-dark { color: #fff; }
.bl-auto { color: var(--text); }
html[data-theme="dark"] .bl-auto { color: #fff; }
html:not([data-theme="dark"]) .bl-auto .bl-name b { color: #0b7a57; }
a.bl, a .bl { text-decoration: none; }

/* ── Sign-in & sign-up pages ─────────────────────────────────── */
.auth-wrap { background: var(--bg); }
.auth-visual {
  background:
    linear-gradient(90deg, rgba(7,16,14,.94) 0%, rgba(7,16,14,.82) 45%, rgba(7,16,14,.55) 100%),
    linear-gradient(0deg, rgba(7,16,14,.92) 0%, rgba(7,16,14,0) 45%),
    url('../img/site/own-tile-roof.jpg') center / cover no-repeat !important;
  border-right: 0 !important; color: #fff;
}
.auth-visual::before { background: radial-gradient(60% 50% at 20% 100%, rgba(16,185,129,.22), transparent 70%) !important; }
.auth-visual .av-title { font-family: var(--gf-display); font-weight: 800 !important; font-size: clamp(2.2rem, 3.4vw, 3.3rem) !important; letter-spacing: -.035em !important; line-height: 1.02 !important; color: #fff !important; max-width: 13ch; }
.auth-visual .av-lead { color: #cdddd8 !important; font-size: 17px !important; max-width: 42ch !important; }
.auth-visual .av-feat-name { color: #fff !important; font-weight: 700 !important; }
.auth-visual .av-feat-desc, .auth-visual .av-foot { color: #a9bcb5 !important; }
.auth-visual .af-ico { background: rgba(52,211,153,.14) !important; color: #34d399 !important; border: 1px solid rgba(52,211,153,.28); border-radius: 12px !important; }
.auth-visual .auth-feature { background: rgba(255,255,255,.04) !important; border: 1px solid rgba(255,255,255,.06) !important; box-shadow: none !important; }   /* the photo panel is dark in both themes — the cards look the same in light mode */
.auth-visual .av-brand { color: #fff; }
.auth-visual .av-brand .brand-name, .auth-visual .av-brand .brand-sub { color: inherit !important; }

.auth-form-side { background: var(--surface); }
html:not([data-theme="dark"]) .auth-form-side { background: #fff; }
.auth-card h1 { font-family: var(--gf-display); font-weight: 800; font-size: 30px; letter-spacing: -.03em; }
.auth-sub { font-size: 14.5px; }
.auth-brand { color: var(--text); }
.input-icon input, .input, .auth-card input[type=text], .auth-card input[type=password], .auth-card input[type=email] { border-radius: 11px; border: 1.5px solid var(--border-2); }
.input-icon input:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
.btn-primary, .auth-card .btn-primary { background: var(--accent); color: var(--accent-ink); border-radius: 11px; font-weight: 700; letter-spacing: -.005em; }
.btn-primary:hover { filter: brightness(1.06); }
.auth-alt a, .forgot { color: #0b7a57; }
html[data-theme="dark"] .auth-alt a, html[data-theme="dark"] .forgot { color: var(--accent-2); }

/* ── Customer portal ─────────────────────────────────────────── */
body:has(> .cp-nav) { background: var(--bg); }
html:not([data-theme="dark"]) body:has(> .cp-nav) { --bg: #f4f1ea; }
html:not([data-theme="dark"]) .cp-card, html:not([data-theme="dark"]) .cp-kpi { border-color: #e4dfd3; }

/* the top bar matches the website header: deep green-black, white links, mint active pill */
.cp-nav { background: var(--gf-ink) !important; border-bottom: 0 !important; box-shadow: 0 6px 26px -14px rgba(0,0,0,.6) !important; height: 70px !important; }
.cp-nav .cp-brand { color: #fff; }
.cp-link { color: #cfe0da !important; }
.cp-link:hover { background: rgba(255,255,255,.09) !important; color: #fff !important; }
.cp-link.on { background: var(--accent) !important; color: #04281d !important; }
.cp-navsep { background: rgba(255,255,255,.14) !important; }
.cp-iconbtn { background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.16) !important; color: #e4efeb !important; }
.cp-iconbtn:hover { border-color: var(--accent) !important; color: #fff !important; }
.cp-acct-btn { color: #e4efeb !important; }
.cp-avatar { background: rgba(52,211,153,.16) !important; color: #34d399 !important; border-color: rgba(52,211,153,.35) !important; }
.cp-navtoggle { color: #fff !important; }
.cp-menu { background: var(--surface); }
/* the folded menu (three-line button — customer portal ≤ 1210 px, crew portal ≤ 720 px; phones, tablets, small windows) continues the dark
   top bar in BOTH themes, so the light link colours stay readable (on the old white panel the items were nearly invisible and turned
   white on hover / tap). `.open` only exists while the folded menu is shown, so the wide inline bar is never touched. */
.cp-links.open { background: var(--gf-ink) !important; border-bottom: 1px solid rgba(255,255,255,.08) !important; box-shadow: 0 16px 30px -12px rgba(0,0,0,.55) !important; }
.cp-links.open .cp-link { color: #e4efeb !important; background: transparent !important; opacity: 1 !important; }
.cp-links.open .cp-link i { color: inherit !important; opacity: 1 !important; }
.cp-links.open .cp-link:hover, .cp-links.open .cp-link:focus-visible, .cp-links.open .cp-link:active { background: rgba(255,255,255,.1) !important; color: #fff !important; }
.cp-links.open .cp-link.on, .cp-links.open .cp-link.on:hover { background: var(--accent) !important; color: #04281d !important; }

/* headings carry the display face */
.cp-welcome h1, .cp-main h1, .cp-card-title, .cp-dialog-head h3, .cp-kpi .val, .pd-name, .dh-hero h3, .sp-kpi .val {
  font-family: var(--gf-display); letter-spacing: -.025em;
}
.cp-main h1 { font-weight: 800; }

/* the welcome block becomes the website's hero: photo, dark wash, big white headline */
.cp-welcome {
  position: relative; overflow: hidden; border-radius: 20px; padding: 34px 34px 36px; color: #fff;
  background: linear-gradient(90deg, rgba(7,16,14,.95) 0%, rgba(7,16,14,.8) 50%, rgba(7,16,14,.5) 100%), url('../img/site/own-tile-roof.jpg') center / cover no-repeat;
}
.cp-welcome h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 800; color: #fff; letter-spacing: -.03em; }
.cp-welcome h1 .hl { color: #34d399; }
.cp-welcome p { color: #cdddd8 !important; font-size: 15.5px !important; max-width: 56ch; margin-top: 8px !important; }
.cp-welcome .dh-welcome-ok { background: rgba(52,211,153,.16) !important; color: #6ee7b7 !important; }

/* cards, chips, buttons: roomier and rounder, like the website */
.cp-card, .cp-kpi, .cp-notif, .cp-prod { border-radius: 16px; }
.cp-btn { border-radius: 11px; }
.cp-btn-primary { background: var(--accent); color: #04281d; border-color: var(--accent); }
.cp-chip { border-radius: 99px; padding: 7px 14px; font-weight: 600; }
.cp-chip.on { background: var(--gf-ink); color: #fff; border-color: var(--gf-ink); }
html[data-theme="dark"] .cp-chip.on { background: var(--accent); color: #04281d; border-color: var(--accent); }
.cp-input { border-radius: 11px; border-width: 1.5px; }
.cp-input:focus { box-shadow: 0 0 0 4px var(--accent-soft); }
.cp-dialog { border-radius: 20px; }
.cp-tag, .stocklbl { letter-spacing: .01em; }
.cp-tbl th { letter-spacing: .1em; }

/* breadcrumbs sit on the paper background */
.cp-crumbs { font-size: 13px; }

/* the logo links must not underline their text */
a.auth-brand, a.av-brand, a.cp-brand, a.bl { text-decoration: none !important; }


/* ── No tagline under the name (signed-in portals) ─────────────── */
/* without a tagline the name sits level with the G and S tiles at the base of the mark — it no longer floats mid-air */
.bl-text.bl-solo { align-self: flex-end; margin-bottom: -2px; }
.bl-lg .bl-text.bl-solo { margin-bottom: -2.5px; }
.bl-sm .bl-text.bl-solo { margin-bottom: -1.5px; }

/* ── Admin sidebar — the same dark brand panel as the portals' top bar ──
   Appearance only: the links, order, active state and mobile drawer behave exactly as before. */
#sidebar { background: var(--gf-ink); color: #cfe0da; border-right: 1px solid rgba(255,255,255,.05); }
#sidebar .brand { padding: 6px 8px 20px; justify-content: space-between; }
#sidebar .brand-link { display: inline-flex; text-decoration: none; }
#sidebar .nav-label { color: rgba(207,224,218,.5); }
#sidebar .nav-item { color: #cfe0da; }
#sidebar .nav-item:hover { background: rgba(255,255,255,.09); color: #fff; }
#sidebar .nav-item.active { background: var(--accent); color: #04281d; font-weight: 600; }
#sidebar .gf-nav-close { background: rgba(255,255,255,.08); color: #fff; }

/* ── Phones: the header must fit — keep only the logo mark, tighten the icon cluster ── */
@media (max-width: 640px) {
  .cp-nav { padding: 0 12px !important; }
  .cp-nav-inner { gap: 8px !important; }
  .cp-nav .bl-text { display: none; }
  .cp-nav .bl-mark { height: 28px; }
  .cp-nav .cp-right { gap: 5px; }
  .cp-nav .cp-iconbtn { width: 34px; height: 34px; font-size: 17px; }
  .cp-nav .cp-navtoggle { width: 34px; height: 34px; }
  .cp-nav .cp-avatar { width: 34px; height: 34px; }
  .cp-nav .cp-caret { display: none; }
}

/* ── Admin portal, light mode — same paper background, white cards and soft card shadow as the
   customer and crew portals (so it is no longer too bright, and every box stands out from the page).
   Dark mode is untouched: it already uses the same colours in all three portals. ── */
html:not([data-theme="dark"]) body:has(> #sidebar) {
  --bg: #f4f1ea;
  --shadow: 0 1px 2px rgba(15,23,42,.05), 0 6px 16px rgba(15,23,42,.05);
}
html:not([data-theme="dark"]) body:has(> #sidebar) :is(.card, .stat) {
  box-shadow: 0 0 0 1px #e4dfd3, 0 1px 2px rgba(15,23,42,.05), 0 6px 16px rgba(15,23,42,.05);
}

/* the sidebar is narrow: keep "TRADING & SERVICES" on one line beside the mark */
#sidebar .bl-mark { height: 30px; }
#sidebar .bl-sub { font-size: 7.5px; letter-spacing: .17em; }
#sidebar .bl { gap: 9px; }
