:root {
  --navy: #0b1424;
  --navy-2: #132036;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e5e9f0;
  --gold: #c8a24e;
  --gold-2: #e6c97f;
  --bg: #f5f6f8;
  --danger: #b91c1c;
  --ok: #047857;
  --radius: 14px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
a { color: inherit; }
.hidden { display: none !important; }

/* ── Sign-in: brand panel + form ─────────────────────────────── */
.split { display: flex; min-height: 100vh; }
.brand {
  flex: 1 1 50%; position: relative; overflow: hidden; color: #fff; padding: 48px 56px;
  background: radial-gradient(1200px 600px at 20% 10%, #1d2d4a 0%, var(--navy) 55%), var(--navy);
  display: flex; flex-direction: column; justify-content: space-between;
}
/* Shivora International wordmark (logo-white.png on dark, logo-dark.png on white) */
.brand-logo { width: 230px; height: auto; display: block; position: relative; z-index: 1; }
.top-logo { height: 42px; width: auto; display: block; }
.form-logo { display: none; width: 190px; height: auto; margin: 0 auto 28px; }
.mark { display: flex; align-items: center; gap: 14px; }
.mark .seal {
  width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center;
  font-family: Georgia, 'Times New Roman', serif; font-size: 22px; color: var(--gold-2);
}
.mark .name { font-family: Georgia, 'Times New Roman', serif; letter-spacing: .28em; font-size: 15px; }
.mark .name small { display: block; letter-spacing: .32em; font-size: 10px; color: #94a3b8; margin-top: 3px; }
.brand h1 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 42px; line-height: 1.15; max-width: 440px; }
.brand h1 em { color: var(--gold-2); font-style: italic; }
.brand p { color: #a8b3c7; margin-top: 16px; max-width: 420px; line-height: 1.6; font-size: 15px; }

.pane { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fff; }
.form { width: 100%; max-width: 380px; }
.form h2 { font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.form .sub { color: var(--muted); margin-top: 6px; font-size: 14.5px; }
.field { margin-top: 18px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: #334155; margin-bottom: 6px; }
.input {
  width: 100%; height: 46px; border: 1px solid #d6dce6; border-radius: 10px; padding: 0 14px; font-size: 15px; background: #fff;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(200,162,78,.15); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px;
  border: 1px solid transparent; font-weight: 600; font-size: 14.5px; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; width: 100%; height: 48px; margin-top: 24px; }
.btn-primary:hover { background: var(--navy-2); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #f8fafc; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; }
.msg { margin-top: 14px; font-size: 13.5px; padding: 10px 12px; border-radius: 10px; }
.msg.err { color: var(--danger); background: #fef2f2; border: 1px solid #fecaca; }
.msg.info { color: #92400e; background: #fffbeb; border: 1px solid #fde68a; }
.foot { margin-top: 28px; font-size: 12px; color: #94a3b8; text-align: center; }

/* ── After sign-in: choose a company ─────────────────────────── */
.top {
  background: var(--navy); color: #fff; padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.top .mark .seal { width: 36px; height: 36px; font-size: 17px; }
.top .mark .name { font-size: 13px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #cbd5e1; }
.who .btn { height: 34px; background: transparent; color: #fff; border-color: rgba(255,255,255,.2); }
.who .btn:hover { background: rgba(255,255,255,.08); }
.wrap { max-width: 980px; margin: 0 auto; padding: 48px 24px; }
.hello h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 34px; }
.hello p { color: var(--muted); margin-top: 6px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 30px; }
.co {
  display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  transition: transform .15s, box-shadow .15s, border-color .15s; position: relative; overflow: hidden;
}
.co:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(15,23,42,.10); border-color: #d9c38f; }
.co .mono {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-family: Georgia, serif; font-size: 22px;
  color: var(--gold-2); background: var(--navy);
}
.co h3 { margin-top: 18px; font-size: 20px; }
.co p { color: var(--muted); margin-top: 4px; font-size: 14px; }
.co .go { margin-top: 22px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--navy); }
.co .go::after { content: '→'; transition: transform .15s; }
.co:hover .go::after { transform: translateX(4px); }
.empty { margin-top: 30px; padding: 28px; border: 1px dashed #cbd5e1; border-radius: 16px; color: var(--muted); background: #fff; }

/* ── Admin ───────────────────────────────────────────────────── */
.tabs { display: flex; gap: 6px; margin-top: 24px; border-bottom: 1px solid var(--line); }
.tab { padding: 10px 14px; border: none; background: none; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tab.on { color: var(--ink); border-bottom-color: var(--gold); }
.table { width: 100%; border-collapse: collapse; margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #f8fafc; padding: 11px 14px; }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pill.on { background: #ecfdf5; color: var(--ok); }
.pill.off { background: #f1f5f9; color: var(--muted); }
.pill.gold { background: #fdf6e3; color: #8a6a1f; }
.chip { display: inline-block; font-size: 12px; background: #f1f5f9; padding: 3px 8px; border-radius: 6px; margin: 2px 4px 2px 0; }
.chip b { font-weight: 700; }
.overlay { position: fixed; inset: 0; background: rgba(2,6,23,.55); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.dialog { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; padding: 24px; max-height: 92vh; overflow: auto; }
.dialog h3 { font-size: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 14px; }
.section { margin-top: 20px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row-end { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.row-end .btn-primary { width: auto; margin-top: 0; height: 44px; }

@media (max-width: 820px) {
  .brand { display: none; }
  .form-logo { display: block; }
  .top-logo { height: 34px; }
  .top { padding: 12px 16px; }
  .who span { display: none; }
  .wrap { padding: 32px 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .table { font-size: 13px; }
}

/* ── Sign-in: black stage, the wordmark faint behind, the card on top ── */
.stage {
  min-height: 100vh; background: #000; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; padding: 32px 16px;
}
.stage::before {   /* a soft light behind the card */
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(700px 480px at 50% 50%, rgba(255,255,255,.07), transparent 70%);
}
.stage-mark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(1200px, 120vw); opacity: .32; pointer-events: none; user-select: none;
}
.card-login {
  position: relative; z-index: 1; width: 100%; max-width: 400px; padding: 36px 32px 28px;
  color: #fff;   /* no card: the form sits straight on the black stage */
}
.card-logo { display: block; width: 210px; height: auto; margin: 0 auto 26px; }
.card-login h2 { font-size: 22px; font-weight: 600; text-align: center; letter-spacing: .01em; }
.card-login .sub { color: #a3a3a3; text-align: center; margin-top: 6px; font-size: 14px; }
.card-login .field label { color: #d4d4d4; }
.card-login .input { background: #0a0a0a; border-color: rgba(255,255,255,.22); color: #fff; }
.card-login .input:focus { border-color: rgba(255,255,255,.55); box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.card-login .input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 40px #1a1a1a inset; caret-color: #fff; }
.card-login .btn-primary { background: #fff; color: #000; letter-spacing: .04em; }
.card-login .btn-primary:hover { background: #e5e5e5; }
.card-login .msg.err { background: rgba(185,28,28,.15); border-color: rgba(248,113,113,.35); color: #fecaca; }
.card-login .msg.info { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.15); color: #e5e5e5; }
.card-login .foot { color: #737373; }
@media (max-width: 480px) {
  .card-login { padding: 28px 4px 22px; }
  .card-logo { width: 180px; }
}
/* For screen readers only (the page's heading, now that the wordmark behind says it) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Sign-in fields: icon, text inside the box, thin line, quiet focus ── */
.card-login { display: flex; flex-direction: column; gap: 14px; max-width: 380px; }
.lux-field { position: relative; display: block; }
.lux-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px;
  fill: none; stroke: #7a7a7a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: stroke .15s; pointer-events: none;
}
.lux-input {
  width: 100%; height: 54px; padding: 0 48px 0 48px; border-radius: 12px; outline: none;
  background: #070707; color: #f5f5f5; font-size: 15px; letter-spacing: .01em;
  border: 1px solid rgba(255,255,255,.14); transition: border-color .15s, background .15s;
}
.lux-input::placeholder { color: #6b6b6b; }
.lux-input:hover { border-color: rgba(255,255,255,.24); }
.lux-input:focus { border-color: rgba(255,255,255,.7); background: #0b0b0b; }
.lux-field:focus-within .lux-icon { stroke: #fff; }
.lux-input:-webkit-autofill { -webkit-text-fill-color: #f5f5f5; -webkit-box-shadow: 0 0 0 40px #0b0b0b inset; caret-color: #fff; }
.lux-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
  border: none; background: none; border-radius: 8px; cursor: pointer; display: grid; place-items: center;
}
.lux-eye svg { width: 18px; height: 18px; fill: none; stroke: #7a7a7a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lux-eye:hover svg, .lux-eye.on svg { stroke: #fff; }
.lux-btn {
  height: 54px; margin-top: 6px; border: none; border-radius: 12px; cursor: pointer;
  background: #fff; color: #000; font-size: 13px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  transition: background .15s, transform .05s;
}
.lux-btn:hover { background: #e9e9e9; }
.lux-btn:active { transform: translateY(1px); }
.lux-btn:disabled { opacity: .6; cursor: default; }
.card-login .msg { margin-top: 0; }
.card-login .foot { margin-top: 8px; }
.card-login .foot { position: fixed; left: 0; right: 0; bottom: 18px; margin: 0; text-align: center; }
/* Phone: the wordmark sits above the fields instead of behind them */
@media (max-width: 600px) {
  .stage { flex-direction: column; justify-content: center; gap: 36px; }
  .stage-mark { position: relative; left: auto; top: auto; transform: none; width: 86vw; opacity: .9; }
  .card-login { width: 100%; }
}

/* ── After sign-in: the screen split between the companies ───────────── */
.houses-screen { min-height: 100vh; background: #000; position: relative; }
.houses-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px 28px; background: linear-gradient(180deg, rgba(0,0,0,.3), transparent);
}
.houses-logo { height: 44px; width: auto; display: block; }
.houses-who { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.8); font-size: 13.5px; }
.ghost-btn {
  height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: rgba(0,0,0,.2);
  color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
  backdrop-filter: blur(6px); transition: background .15s, border-color .15s;
}
.ghost-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.55); }
.houses-toast {
  position: absolute; top: 84px; left: 50%; transform: translateX(-50%); z-index: 6; padding: 10px 18px; border-radius: 999px;
  background: rgba(185,28,28,.9); color: #fff; font-size: 13.5px;
}
.houses { display: flex; min-height: 100vh; }
.house {
  flex: 1 1 0; position: relative; display: flex; align-items: center; justify-content: center; text-decoration: none;
  background: var(--house-bg); color: var(--house-ink); overflow: hidden; padding: 110px 32px 60px;
}
/* a soft light that grows when the half is pointed at */
.house::before {
  content: ''; position: absolute; inset: 0; opacity: .5; transition: opacity .35s;
  background: radial-gradient(600px 420px at 50% 50%, rgba(255,255,255,.08), transparent 70%);
}
.house:hover::before { opacity: 1; }
.house + .house { border-left: 1px solid rgba(255,255,255,.12); }
.house-inner { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; }
.house-logo { width: min(var(--logo-w, 300px), 64%); height: auto; transition: transform .4s ease; }
.house:hover .house-logo { transform: scale(1.04); }
.house-name { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; font-size: 44px; letter-spacing: .08em; }
.house-tag:empty { display: none; }
.house-tag { margin-top: 22px; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; opacity: .7; }
.house-go {
  margin-top: 34px; display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 26px; border-radius: 999px;
  border: 1px solid currentColor; font-size: 12.5px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  transition: background .2s, color .2s;
}
.house:hover .house-go { background: var(--house-ink); color: var(--house-bg); }
.house-go span { transition: transform .2s; }
.house:hover .house-go span { transform: translateX(4px); }
.houses-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center;
  color: rgba(255,255,255,.75); font-size: 15px;
}
@media (max-width: 760px) {
  .houses { flex-direction: column; }
  .house { min-height: 50vh; padding: 90px 24px 40px; }
  .house + .house { border-left: none; border-top: 1px solid rgba(255,255,255,.12); }
  .house-logo { width: min(calc(var(--logo-w, 300px) * .75), 62%); }
  .houses-bar { padding: 14px 16px; }
  .houses-logo { height: 34px; }
  .houses-who span { display: none; }
}
