/* ============================================================
   Hook & Line — base styling.
   Per-customer branding overrides --brand-primary / --brand-accent
   at runtime (see session.js applyTheme). Everything else is the
   shared Hook & Line chrome.
   ============================================================ */

:root {
  /* Hook & Line defaults — overridden per org */
  --brand-primary: #0e3a4f;   /* deep harbor teal */
  --brand-accent:  #d4a017;   /* tackle-box gold  */

  --ink:      #16232b;
  --ink-soft: #5c6b73;
  --line:     #e3e8ea;
  --panel:    #ffffff;
  --bg:       #f4f6f7;
  --danger:   #b3261e;
  --ok:       #1f7a4d;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,42,63,.06), 0 8px 24px rgba(16,42,63,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ---------- centered auth / onboarding card ---------- */
.hl-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hl-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.hl-card.wide { max-width: 560px; }

/* ---------- brand lockup ---------- */
.hl-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--brand-primary);
  font-size: 20px;
  margin-bottom: 4px;
}
.hl-brand .hook { color: var(--brand-accent); }
.hl-sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 24px; }

/* ---------- form bits ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin: 16px 0 6px; }
input[type=text], input[type=email], input[type=password] {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}
input:focus { outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(14,58,79,.12); }

.hl-row { display: flex; gap: 12px; }
.hl-row > * { flex: 1; }

.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type=color] {
  width: 46px; height: 40px; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; cursor: pointer;
}

.btn {
  width: 100%;
  margin-top: 24px;
  padding: 12px 16px;
  border: none;
  border-radius: 10px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--brand-primary); border: 1px solid var(--line); margin-top: 0; width: auto; padding: 8px 14px; }

.hl-toggle {
  display: flex; gap: 4px; background: var(--bg); border-radius: 10px;
  padding: 4px; margin-bottom: 20px;
}
.hl-toggle button {
  flex: 1; border: none; background: transparent; padding: 9px;
  border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer;
  color: var(--ink-soft); font-family: inherit;
}
.hl-toggle button.active { background: #fff; color: var(--brand-primary); box-shadow: var(--shadow); }

.hl-msg { margin-top: 16px; font-size: 14px; min-height: 20px; }
.hl-msg.err { color: var(--danger); }
.hl-msg.ok  { color: var(--ok); }

.hint { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- app shell ---------- */
.hl-topbar {
  background: var(--brand-primary);
  color: #fff;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.hl-topbar .lock { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.hl-topbar img { height: 34px; width: 34px; border-radius: 8px; object-fit: cover; background: #fff; }
.hl-topbar .name { font-size: 17px; letter-spacing: -.01em; }
.hl-topbar .right { display: flex; align-items: center; gap: 14px; }

.chip {
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: rgba(255,255,255,.16);
}
.chip.warn { background: var(--brand-accent); color: #23180a; }
.chip.bad  { background: var(--danger); }

.link-btn { background: none; border: none; color: #fff; opacity: .85; cursor: pointer; font-size: 14px; font-family: inherit; }
.link-btn:hover { opacity: 1; text-decoration: underline; }

.hl-main { max-width: 1000px; margin: 0 auto; padding: 32px 20px 64px; }
.hl-main h1 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 4px; }
.hl-main .lede { color: var(--ink-soft); margin: 0 0 28px; }

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.mod {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px; min-height: 108px;
}
.mod .ic { font-size: 22px; }
.mod .t { font-weight: 700; }
.mod .d { font-size: 13px; color: var(--ink-soft); }
.mod .tag {
  margin-top: auto; align-self: flex-start; font-size: 11px; font-weight: 700;
  color: var(--ink-soft); background: var(--bg); padding: 3px 8px; border-radius: 6px;
}
.mod.soon { opacity: .72; }

/* ---------- lock screen ---------- */
.lockscreen { text-align: center; padding: 48px 24px; }
.lockscreen .big { font-size: 40px; }
.lockscreen h2 { margin: 12px 0 6px; }
.lockscreen p { color: var(--ink-soft); max-width: 380px; margin: 0 auto 20px; }

.center-note { text-align:center; color: var(--ink-soft); padding: 48px; }
