:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --brand: #111827;
  --brand-2: #334155;
  --accent: #0f766e;
  --danger: #b91c1c;
  --success: #15803d;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 280px; background: #0f172a; color: #fff; padding: 24px; display: flex; flex-direction: column; position: sticky; top: 0; min-height: 100vh; }
.brand-block { display: flex; gap: 14px; align-items: center; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.12); }
.logo-mark { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, #fff, #cbd5e1); color: #0f172a; display: grid; place-items: center; font-weight: 900; letter-spacing: -1px; }
.logo-mark.large { width: 64px; height: 64px; margin: 0 auto 16px; font-size: 24px; }
.company-name { font-size: 19px; font-weight: 800; letter-spacing: -.3px; }
.company-sub { color: #cbd5e1; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; }
.nav-list { display: grid; gap: 10px; margin-top: 26px; }
.nav-link { padding: 13px 14px; border-radius: 14px; color: #e2e8f0; background: rgba(255,255,255,.04); }
.nav-link:hover { background: rgba(255,255,255,.10); }
.nav-link.primary { background: #fff; color: #0f172a; font-weight: 800; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.user-card { border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 12px; display: grid; gap: 4px; }
.user-card span { color: #cbd5e1; font-size: 13px; }
.logout { color: #cbd5e1; font-size: 14px; }
.main-content { flex: 1; padding: 32px; min-width: 0; }
.page-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 22px; }
h1 { margin: 0; font-size: clamp(26px, 4vw, 40px); letter-spacing: -.04em; }
h2 { margin: 0 0 14px; font-size: 18px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); text-transform: uppercase; font-weight: 800; font-size: 12px; letter-spacing: .14em; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.btn { border: none; background: var(--brand); color: #fff; padding: 12px 17px; border-radius: 14px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.btn:hover { background: var(--brand-2); }
.btn.secondary { background: #0f766e; }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn.wide { width: 100%; }
.small-btn { border: 1px solid rgba(255,255,255,.15); color: #fff; background: rgba(255,255,255,.08); border-radius: 12px; padding: 8px 10px; cursor: pointer; }
.button-row { display: flex; gap: 10px; align-items: center; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); display: grid; gap: 8px; }
.stat-card span { color: var(--muted); font-weight: 700; }
.stat-card strong { font-size: 40px; letter-spacing: -.05em; }
.stat-card.accent { background: #ecfdf5; border-color: #a7f3d0; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.filter-form { display: grid; grid-template-columns: minmax(240px, 1.5fr) 180px 160px 160px auto auto; gap: 12px; align-items: center; }
input, select, textarea { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 12px 13px; background: #fff; color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #0f766e; box-shadow: 0 0 0 4px rgba(15, 118, 110, .12); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th { text-align: left; color: #475569; background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
th, td { padding: 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:hover td { background: #fafafa; }
.status { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.status.checked_in { background: #dcfce7; color: #166534; }
.status.checked_out { background: #e5e7eb; color: #374151; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.actions a, .link-btn { color: #0f766e; font-weight: 800; background: transparent; border: none; padding: 0; cursor: pointer; }
.empty { text-align: center; color: var(--muted); padding: 50px; }
.form-panel { max-width: 1100px; }
.visitor-form { display: grid; gap: 20px; }
.form-section { border: 1px solid var(--border); border-radius: 18px; padding: 18px; background: #fbfdff; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 7px; font-weight: 750; color: #374151; }
label span { font-size: 13px; }
.full { margin-top: 14px; }
.checkbox-line { display: flex; align-items: center; gap: 9px; align-self: end; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.checkbox-line input { width: auto; }
.agreement-box p { line-height: 1.7; color: #475569; }
.form-actions { display: flex; gap: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.detail-item { border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: #fbfdff; display: grid; gap: 7px; }
.detail-item span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.detail-item strong { word-break: break-word; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); background: #fff; padding: 34px; border-radius: 28px; box-shadow: var(--shadow); text-align: center; }
.login-card h1 { font-size: 30px; }
.form-stack { display: grid; gap: 14px; margin-top: 22px; text-align: left; }
.demo-box { margin-top: 20px; border-radius: 16px; background: #f8fafc; border: 1px solid var(--border); padding: 14px; color: #475569; text-align: left; font-size: 13px; line-height: 1.7; }
.flash-wrap { display: grid; gap: 10px; margin-bottom: 16px; }
.flash { padding: 13px 15px; border-radius: 14px; border: 1px solid var(--border); background: #fff; font-weight: 750; }
.flash.success { background: #ecfdf5; border-color: #bbf7d0; color: #166534; }
.flash.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash.info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.flash.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.error-text { color: #991b1b; font-weight: 700; }
.badge-page { display: grid; place-items: center; padding: 20px; }
.visitor-badge { width: 420px; background: #fff; border: 1px solid #cbd5e1; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.badge-header { background: #0f172a; color: #fff; display: flex; gap: 12px; align-items: center; padding: 18px; }
.badge-header span { display: block; color: #cbd5e1; font-size: 12px; letter-spacing: .18em; margin-top: 3px; }
.badge-body { padding: 22px; text-align: center; }
.badge-title { font-size: 42px; font-weight: 950; letter-spacing: .08em; color: #0f172a; }
.badge-name { font-size: 30px; font-weight: 900; margin-top: 12px; }
.badge-company { color: var(--muted); margin-top: 4px; }
.badge-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; text-align: left; }
.badge-meta div { border: 1px solid var(--border); border-radius: 14px; padding: 10px; }
.badge-meta span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.badge-meta strong { display: block; margin-top: 4px; }
.badge-footer { padding: 14px 18px; background: #f8fafc; color: #475569; font-size: 12px; line-height: 1.55; text-align: center; }
@media (max-width: 960px) {
  .app-shell { display: block; }
  .sidebar { width: 100%; min-height: auto; position: static; }
  .main-content { padding: 18px; }
  .page-header, .button-row { align-items: stretch; flex-direction: column; }
  .stats-grid, .grid-2, .detail-grid { grid-template-columns: 1fr; }
  .filter-form { grid-template-columns: 1fr; }
}
@media print {
  body { background: #fff; }
  .no-print, .sidebar, .flash-wrap { display: none !important; }
  .main-content { padding: 0; }
  .visitor-badge { box-shadow: none; margin-top: 0; }
}

.log-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  background: rgba(248, 250, 252, 0.9);
}
.log-box h3 {
  margin: 0 0 10px;
  font-size: 15px;
}
.log-box pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}
.notice-card {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #d8e0ea;
  border-radius: 14px;
  background: #f8fafc;
}
.notice-card h3 { margin: 0 0 8px; }
.notice-card ul { margin-top: 8px; padding-left: 20px; }
.host-add-form input { min-width: 220px; }
.host-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.host-row-form { display: flex; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; }
.host-row-form input { min-width: 220px; }
.link-btn.danger { color: #b42318; }
button:disabled, select:disabled { opacity: 0.6; cursor: not-allowed; }

.version-tag { display: inline-flex; align-items: center; justify-content: center; padding: 4px 8px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: #cbd5e1; font-size: 11px; font-weight: 800; }
.host-row-form select { min-width: 140px; }
.compact-detail { margin-top: 12px; }
.compact-notice { text-align: left; }
.compact-notice p { margin: 6px 0 0; line-height: 1.55; }
.admin-password-form { grid-template-columns: repeat(3, minmax(180px, 1fr)) auto; margin-top: 14px; }
@media (max-width: 960px) { .admin-password-form { grid-template-columns: 1fr; } }

/* Legacy public registration layout retained for compatibility */
.public-shell { display: block; }
.public-shell .main-content { max-width: 1180px; margin: 0 auto; padding: 28px; }
.public-topbar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.public-brand { display: flex; gap: 14px; align-items: center; }
.public-brand .company-name { color: #0f172a; }
.public-brand .company-sub { color: #64748b; }
.public-register-header { margin-top: 4px; }
.public-hero {
  background: linear-gradient(135deg, #0f172a, #115e59);
  color: #fff;
  border-radius: 28px;
  padding: 24px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
}
.public-hero h2 { margin: 0 0 8px; font-size: 24px; }
.public-hero p { margin: 0; color: #dbeafe; line-height: 1.65; }
.public-hero-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  letter-spacing: .02em;
}
.public-form-panel { max-width: 100%; }
@media (max-width: 960px) {
  .public-topbar { align-items: stretch; flex-direction: column; }
  .public-shell .main-content { padding: 18px; }
  .public-hero { align-items: stretch; flex-direction: column; }
}


/* Legacy public one-screen registration styles retained for fallback */
body:has(.public-kiosk) { overflow: hidden; }
.public-shell .main-content:has(.public-kiosk) { max-width: 1480px; padding: 16px 24px 18px; }
.public-topbar:has(+ .main-content .public-kiosk) { max-width: 1480px; padding: 12px 24px 0; }
.public-kiosk {
  height: calc(100vh - 86px);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(360px, 0.82fr) minmax(720px, 1.28fr);
  gap: 16px;
  align-items: stretch;
}
.public-kiosk-left { display: grid; grid-template-rows: auto 1fr; gap: 16px; min-height: 0; }
.kiosk-hero-card,
.public-dashboard-card,
.public-kiosk-form-card {
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 26px;
  box-shadow: var(--shadow);
}
.kiosk-hero-card {
  background: linear-gradient(135deg, #0f172a, #115e59);
  color: #fff;
  padding: 22px;
  overflow: hidden;
}
.kiosk-hero-card h1 { font-size: clamp(32px, 4.2vw, 58px); line-height: .95; }
.kiosk-hero-card p { margin: 10px 0 0; color: #dbeafe; line-height: 1.5; }
.kiosk-rules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.kiosk-rules span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 12px;
  font-weight: 850;
}
.public-dashboard-card { padding: 18px; min-height: 0; display: flex; flex-direction: column; }
.public-dashboard-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.public-dashboard-title h2 { margin: 0; }
.public-stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.public-stat-row div { border: 1px solid var(--border); border-radius: 18px; padding: 13px; background: #f8fafc; display: grid; gap: 4px; }
.public-stat-row div.active { background: #ecfdf5; border-color: #a7f3d0; }
.public-stat-row span { color: var(--muted); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.public-stat-row strong { font-size: 34px; line-height: 1; letter-spacing: -.06em; }
.public-visitor-list { min-height: 0; overflow: hidden; display: grid; gap: 8px; }
.list-title { color: #334155; font-weight: 950; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.public-visitor-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; background: #fff; }
.public-visitor-row strong { display: block; font-size: 14px; }
.public-visitor-row span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }
.public-visitor-row em { flex: 0 0 auto; color: #0f766e; font-style: normal; font-weight: 900; }
.public-empty { color: var(--muted); padding: 28px 12px; text-align: center; border: 1px dashed var(--border); border-radius: 16px; }
.public-kiosk-form-card { padding: 18px; min-width: 0; overflow: hidden; }
.kiosk-form { height: 100%; display: grid; grid-template-rows: auto 1fr auto auto; gap: 12px; min-height: 0; }
.kiosk-form-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.kiosk-form-head h2 { margin: 0; font-size: 22px; }
.required-note { border: 1px solid var(--border); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-size: 12px; font-weight: 850; }
.compact-grid { min-height: 0; align-content: start; }
.compact-grid.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.compact-grid label { gap: 5px; }
.compact-grid label span { font-size: 12px; }
.compact-grid input,
.compact-grid select { padding: 9px 10px; border-radius: 12px; min-height: 38px; }
.compact-agreement { margin-top: 0; }
.compact-checkbox { padding: 10px 12px; line-height: 1.35; }
.compact-checkbox span { font-size: 12px; }
.kiosk-actions { display: grid; grid-template-columns: 1fr 110px; gap: 10px; }
.kiosk-actions .btn { min-height: 42px; }

@media (max-width: 1180px), (max-height: 720px) {
  body:has(.public-kiosk) { overflow: auto; }
  .public-kiosk { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .public-kiosk-left { grid-template-columns: 1fr; }
  .compact-grid.three-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .compact-grid.three-col { grid-template-columns: 1fr; }
  .public-stat-row { grid-template-columns: 1fr; }
  .kiosk-actions { grid-template-columns: 1fr; }
}

/* V1.5 enterprise public registration redesign */
body:has(.public-v15) {
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(20,184,166,.18), transparent 34%),
    radial-gradient(circle at 86% 6%, rgba(59,130,246,.14), transparent 30%),
    linear-gradient(135deg, #eef4f8 0%, #f8fafc 52%, #eef2ff 100%);
}
.public-topbar:has(+ .main-content .public-v15) {
  max-width: 1520px;
  padding: 10px 22px 0;
}
.public-topbar:has(+ .main-content .public-v15) .logo-mark { width: 40px; height: 40px; border-radius: 12px; }
.public-topbar:has(+ .main-content .public-v15) .company-name { font-size: 17px; }
.public-topbar:has(+ .main-content .public-v15) .company-sub { font-size: 11px; }
.public-shell .main-content:has(.public-v15) {
  max-width: 1520px;
  padding: 10px 22px 16px;
}
.public-v15 {
  height: calc(100vh - 70px);
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(360px, .74fr) minmax(720px, 1.26fr);
  gap: 18px;
  align-items: stretch;
}
.v15-status-panel { display: grid; grid-template-rows: auto 1fr; gap: 18px; min-height: 0; }
.v15-hero,
.v15-dashboard-card,
.v15-form-panel {
  border: 1px solid rgba(226,232,240,.88);
  box-shadow: 0 22px 70px rgba(15,23,42,.12);
  backdrop-filter: blur(14px);
}
.v15-hero {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(15,23,42,.98), rgba(15,118,110,.96)),
    radial-gradient(circle at top right, rgba(255,255,255,.22), transparent 38%);
}
.v15-hero::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  right: -90px;
  top: -100px;
  background: rgba(255,255,255,.12);
}
.v15-hero .eyebrow { color: #99f6e4; }
.v15-hero h1 { margin: 0; font-size: clamp(36px, 4.8vw, 64px); line-height: .9; letter-spacing: -.07em; }
.v15-hero-text { max-width: 420px; margin: 12px 0 0; color: #dbeafe; line-height: 1.52; font-size: 15px; }
.v15-step-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; position: relative; z-index: 1; }
.v15-step-strip span {
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.12);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 900;
}
.v15-dashboard-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  padding: 18px;
  background: rgba(255,255,255,.88);
}
.v15-card-title { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.v15-card-title h2 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.v15-live-pill { padding: 6px 10px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 12px; font-weight: 950; }
.v15-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.v15-stat-grid div {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 20px;
  padding: 12px;
  display: grid;
  gap: 3px;
}
.v15-stat-grid div.active { background: linear-gradient(135deg, #ecfdf5, #f0fdfa); border-color: #99f6e4; }
.v15-stat-grid span { color: #64748b; font-size: 11px; font-weight: 950; text-transform: uppercase; letter-spacing: .07em; }
.v15-stat-grid strong { color: #0f172a; font-size: 34px; line-height: .98; letter-spacing: -.06em; }
.v15-onsite-list { min-height: 0; overflow: hidden; display: grid; gap: 8px; }
.v15-onsite-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 10px 12px;
  background: #fff;
}
.v15-onsite-row strong { display: block; font-size: 14px; color: #0f172a; }
.v15-onsite-row span { display: block; color: #64748b; font-size: 12px; margin-top: 2px; }
.v15-onsite-row em { color: #0f766e; font-style: normal; font-weight: 950; }
.v15-form-panel {
  min-width: 0;
  overflow: hidden;
  border-radius: 32px;
  padding: 20px;
  background: rgba(255,255,255,.94);
}
.v15-registration-form { height: 100%; display: grid; grid-template-rows: auto 1fr auto auto; gap: 13px; min-height: 0; }
.v15-form-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding-bottom: 4px; border-bottom: 1px solid #e2e8f0; }
.v15-form-header h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.v15-form-grid { min-height: 0; display: grid; grid-template-columns: 1.12fr .88fr; gap: 10px 12px; align-content: start; }
.v15-form-grid label { gap: 5px; }
.v15-form-grid label span,
.v15-signature span { font-size: 12px; color: #334155; font-weight: 900; }
.v15-form-grid input,
.v15-form-grid select,
.v15-signature input {
  min-height: 40px;
  padding: 9px 12px;
  border-radius: 13px;
  background: #fdfefe;
}
.v15-form-grid input[readonly] { background: #f1f5f9; color: #475569; }
.v15-form-grid .wide-field { grid-column: span 1; }
.v15-safety-box {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, .8fr) auto;
  gap: 12px;
  align-items: stretch;
  padding: 13px;
  border: 1px solid #bfdbfe;
  border-radius: 22px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}
.v15-safety-copy strong { display: block; color: #0f172a; margin-bottom: 4px; }
.v15-safety-copy p { margin: 0; color: #475569; font-size: 12px; line-height: 1.45; }
.v15-signature { align-self: stretch; }
.v15-checkbox { align-self: stretch; min-width: 104px; justify-content: center; background: #fff; }
.v15-checkbox span { white-space: nowrap; font-weight: 950; }
.v15-actions { display: grid; grid-template-columns: minmax(260px, 1fr) 120px; gap: 10px; }
.v15-actions .btn { min-height: 44px; border-radius: 15px; }
@media (max-width: 1180px), (max-height: 740px) {
  body:has(.public-v15) { overflow: auto; }
  .public-v15 { height: auto; min-height: 0; grid-template-columns: 1fr; }
  .v15-status-panel { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .v15-form-grid,
  .v15-safety-box,
  .v15-actions,
  .v15-stat-grid { grid-template-columns: 1fr; }
}

/* ADIMOMO Visitor — accessible, responsive brand layer. */
:root { --accent: #0e7490; --shadow: 0 12px 40px rgba(15,23,42,.055); }
.logo-mark { background: #101827; color: #fff; flex-shrink: 0; font-size: 24px; }
.sidebar .logo-mark, .badge-header .logo-mark { background: #fff; color: #101827; }
.company-name { letter-spacing: .04em; }
.company-sub { font-size: 10px; letter-spacing: .13em; }
.public-links { display: flex; gap: 24px; align-items: center; }
.company-home { font-size: 12px; font-weight: 650; color: #64748b; }
.sidebar .company-home { color: #cbd5e1; }
.logout { border: 0; background: transparent; padding: 0; text-align: left; cursor: pointer; line-height: 1.6; }
a:focus-visible, button:focus-visible { outline: 3px solid #0891b2; outline-offset: 4px; }
button:disabled { opacity: .45; cursor: not-allowed; }
body:has(.public-v15) { overflow: auto; background: #f4f6f8; }
.public-topbar:has(+ .main-content .public-v15) { padding-top: 18px; padding-bottom: 8px; }
.public-v15 { height: auto; min-height: min(730px, calc(100vh - 100px)); grid-template-columns: minmax(300px, .78fr) minmax(0, 1.22fr); }
.v15-status-panel { grid-template-rows: auto 1fr; }
.v15-hero { background: linear-gradient(135deg, #101827, #173b48); padding: 30px; border-radius: 24px; }
.v15-hero h1 { font-size: clamp(40px, 4.5vw, 66px); line-height: 1.02; }
.v15-hero-text { line-height: 1.7; margin-top: 18px; }
.v15-hero .eyebrow { color: #a5d8e3; margin-bottom: 24px; }
.v15-dashboard-card, .v15-form-panel { border-radius: 24px; box-shadow: var(--shadow); }
.v15-dashboard-card { padding: 24px; }
.v15-form-panel { padding: 26px; overflow: visible; }
.v15-registration-form { height: auto; gap: 18px; }
.v15-form-grid { gap: 14px; }
.v15-form-grid input, .v15-form-grid select, .v15-signature input { min-height: 44px; }
.v15-safety-box { grid-template-columns: minmax(0,1fr) auto; }
.v15-safety-copy { grid-column: 1 / -1; }
.v15-safety-copy p { line-height: 1.65; }
.v15-stat-grid strong { font-weight: 700; }
.privacy-note { padding: 20px 0 6px; color: #64748b; line-height: 1.7; font-size: 13px; }
.privacy-note strong { display: block; color: #334155; margin-top: 10px; font-size: 15px; }
.privacy-icon { display: grid; place-items: center; width: 30px; height: 30px; background: #e8f3f5; color: #0e7490; border-radius: 50%; }
.host-help { align-self: center; font-size: 12px; color: #64748b; line-height: 1.6; padding: 12px 0 0; }
.login-page { min-height: calc(100vh - 140px); padding: 16px; }
.visitor-badge { max-width: 100%; }
@media (max-width: 1050px) {
  .public-v15 { grid-template-columns: 1fr; min-height: 0; }
  .v15-status-panel { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .v15-hero h1 { font-size: 42px; }
  .filter-form { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .public-shell .main-content:has(.public-v15) { padding: 10px 14px 22px; }
  .public-topbar:has(+ .main-content .public-v15) { padding: 16px 14px 8px; }
  .public-links { gap: 8px; }
  .public-links .company-home { display: none; }
  .public-links .btn { font-size: 11px; padding: 10px; }
  .public-topbar .company-sub { font-size: 8px; }
  .public-topbar .company-name { font-size: 15px; }
  .v15-status-panel { grid-template-columns: 1fr; }
  .v15-form-panel, .v15-dashboard-card, .v15-hero { padding: 20px; }
  .v15-stat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .v15-form-grid, .v15-safety-box, .v15-actions { grid-template-columns: 1fr; }
  .v15-safety-copy { grid-column: auto; }
  .v15-form-header h2 { font-size: 22px; }
  .required-note { white-space: nowrap; }
  .main-content { padding: 18px; }
  .filter-form, .detail-grid, .admin-password-form { grid-template-columns: 1fr; }
  .page-header, .button-row { flex-wrap: wrap; }
}
@media print { body { background: #fff !important; } .badge-page { padding: 0; } }
