/* Brixora Estate platform pages — sign-in, account, company administration, Super Admin. Same tokens as the Brixora Estate UI. */
:root {
  --nav: #0A1F3C; --accent: #0F3B68; --accent-2: #2F5D8A; --gold: #C69653; --bg: #F3F5F8; --surface: #FFFFFF; --sunk: #EEF1F6;
  --ink: #0F1E33; --muted: #5B6475; --line: #DDE2EA; --good: #2B8A3E; --bad: #B3352F; --warn: #B5761A; --info: #1E5FAF;
  --r: 10px; --shadow: 0 1px 2px rgba(15, 30, 51, .06), 0 8px 24px rgba(15, 30, 51, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 26px; } h2 { font-size: 19px; } h3 { font-size: 15px; }
p { margin: 0 0 .8em; }
.mu { color: var(--muted); } .sm { font-size: 13px; } .mono { font-family: var(--mono); font-size: 13px; }
.hidden { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

/* ---------- forms ---------- */
label.f, .f.fcol { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%; min-width: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=checkbox] { width: 16px; height: 16px; padding: 0; accent-color: var(--accent); }
.code-input { font: 600 24px/1 var(--mono); letter-spacing: .45em; text-align: center; padding: 12px; }
.form { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row > input:not([type=checkbox]), .row > select { width: auto; flex: 1 1 160px; }
.row > .code-input { flex: 0 1 220px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 14px/1 var(--font); padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: #C3CBD8; background: #FAFBFD; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.pri:hover { background: var(--nav); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); } .btn.danger:hover { background: #FDF3F2; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); } .btn.ghost:hover { background: var(--sunk); }
.btn.sm { padding: 6px 10px; font-size: 13px; } .btn.block { width: 100%; padding: 12px 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn .prov { width: 18px; height: 18px; }

.msg { border-radius: 8px; padding: 10px 12px; font-size: 14px; border: 1px solid; }
.msg.err { background: #FDF3F2; color: #8C2621; border-color: #F2C9C6; }
.msg.ok { background: #EFF8F1; color: #1E6B2F; border-color: #C8E6CF; }
.msg.info { background: #EEF4FB; color: #1C4E8C; border-color: #CCDDF2; }
.msg.warn { background: #FDF7EC; color: #7A4F0F; border-color: #EFDDB8; }

.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.pill.good { background: #E8F5EC; color: var(--good); } .pill.bad { background: #FBEAE9; color: var(--bad); } .pill.warn { background: #FBF1E0; color: var(--warn); } .pill.acc { background: #E8EEF7; color: var(--accent); }

/* ---------- auth layout ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-brand { background: radial-gradient(1200px 600px at -10% -20%, #0F3B68 0%, transparent 60%), var(--nav); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand .logo { background: #fff; border-radius: 16px; padding: 16px 20px; width: 220px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.auth-brand .logo img { width: 100%; height: auto; display: block; }
.auth-brand h2 { font-size: 30px; font-weight: 700; max-width: 440px; margin-top: 40px; }
.auth-brand p { color: rgba(255, 255, 255, .78); max-width: 440px; }
.auth-brand ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; color: rgba(255, 255, 255, .88); font-size: 14px; }
.auth-brand li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 10px; vertical-align: middle; }
.auth-brand .foot { font-size: 12px; color: rgba(255, 255, 255, .55); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; } .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mobile-logo { display: none; }
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .mobile-logo { display: block; width: 150px; margin: 0 auto 24px; }
  .auth-main { padding: 28px 16px; align-items: flex-start; }
}

/* ---------- console layout ---------- */
.console { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--nav); color: #fff; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.side .brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; padding: 3px; object-fit: contain; }
.side .brand b { display: block; font-size: 15px; letter-spacing: .04em; } .side .brand small { display: block; font-size: 11px; color: rgba(255, 255, 255, .6); letter-spacing: .06em; text-transform: uppercase; }
.side .sect { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .45); padding: 14px 10px 6px; }
.side button.nav { all: unset; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: rgba(255, 255, 255, .85); cursor: pointer; font-size: 14px; }
.side button.nav:hover { background: rgba(255, 255, 255, .08); } .side button.nav.on { background: rgba(255, 255, 255, .14); color: #fff; font-weight: 600; }
.side button.nav:focus-visible { outline: 2px solid #fff; }
.side .spacer { flex: 1; }
.side .who { border-top: 1px solid rgba(255, 255, 255, .12); padding: 12px 8px 4px; font-size: 13px; color: rgba(255, 255, 255, .8); }
.side .who b { display: block; color: #fff; overflow: hidden; text-overflow: ellipsis; }
.main { padding: 28px 32px 60px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar .eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .console { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-105%); transition: transform .2s; height: 100%; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .main { padding: 16px 16px 60px; }
  .menu-btn { display: inline-flex; }
}
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; min-width: 0; }
.card > h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; } .kpi b { font-size: 24px; }
.tw { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; background: var(--surface); }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FAFBFD; white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td .acts { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.empty { padding: 26px; text-align: center; color: var(--muted); }
.banner { background: #FBF1E0; border-bottom: 1px solid #EFDDB8; color: #6B4510; padding: 10px 16px; font-size: 14px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.matrix th, .matrix td { text-align: center; padding: 6px 8px; } .matrix td:first-child, .matrix th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.matrix tr.off td { opacity: .45; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { all: unset; cursor: pointer; padding: 10px 12px; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--ink); border-color: var(--accent); font-weight: 600; }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; width: 220px; }
.qr img { width: 200px; height: 200px; display: block; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; font: 600 15px var(--mono); background: var(--sunk); border-radius: 8px; padding: 14px 16px; }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(560px, 100%); background: var(--surface); box-shadow: -10px 0 40px rgba(0, 0, 0, .18); z-index: 50; padding: 22px; overflow-y: auto; }
.drawer pre { background: var(--sunk); border-radius: 8px; padding: 12px; font: 12px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; }
.backdrop { position: fixed; inset: 0; background: rgba(15, 30, 51, .35); z-index: 45; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 60; box-shadow: var(--shadow); max-width: 90vw; }
.strength { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; } .strength i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.page404 { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.meter{display:block;width:120px;height:8px;background:var(--line,#d8dde5);border-radius:4px;overflow:hidden}
.meter .bar{display:block;height:100%;background:var(--accent,#0f3b68)}

/* language selector (English · Español) */
.lang-pick { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid rgba(127,127,127,.35); border-radius: 8px; background: transparent; color: inherit; cursor: pointer; max-width: 140px; }
.lang-pick option { color: #111; }
.side-lang { margin-top: 10px; width: 100%; max-width: none; }
.menu-lang { width: calc(100% - 16px); margin: 6px 8px; max-width: none; }

/* 0.6.0 subscription banner */
.banner.bad { background: #FDF3F2; color: #8C2621; border-color: #F2C9C6; }
.banner.info { background: #EEF4FB; color: #1C4E8C; border-color: #CCDDF2; }
.banner .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* Session security dialogs (session warning, session ended, "confirm it is you"): the same modal component as the app (books.css) */
.modal-back { position: fixed; inset: 0; background: rgba(10, 17, 29, .45); z-index: 80; display: grid; place-items: start center; padding: 6vh 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); width: min(860px, 100%); display: flex; flex-direction: column; }
.modal.narrow { width: min(520px, 100%); }
.modal .mh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal .mh h2 { margin: 0; font-size: 18px; }
.modal .mb { padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
[data-session-guard] .mb p { margin: 0; }
.modal .mf { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--sunk); border-radius: 0 0 12px 12px; flex-wrap: wrap; }
[data-session-guard].toast .btn.sm { margin-left: 10px; }
/* white label: a company without an uploaded logo shows its name in the logo box */
.logo-text { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 22px; line-height: 1.15; color: var(--nav); text-align: center; overflow-wrap: anywhere; }
.mobile-logo.logo-text { font-size: 20px; margin: 0 auto 14px; }

/* 045 applications: the applicant page */
.pre-wrap { white-space: pre-wrap; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.card-sub { border: 1px solid var(--line, #d9dde3); border-radius: 10px; padding: 12px 14px; margin: 8px 0 12px; }
.list-row { border: 1px solid var(--line, #d9dde3); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; min-width: 0; }
.list-row .btn { margin-top: 6px; }
.apply-mbrand { display: none; }
@media (max-width: 860px) { .apply-mbrand { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--nav); color: #fff; border-radius: 10px; margin: 0 0 12px; font-size: 16px; } .apply-mbrand:empty { display: none; } .apply-main { flex-direction: column; align-items: stretch; } .apply-mbrand img { height: 32px; width: auto; background: #fff; border-radius: 6px; padding: 2px; } }
