/* ==========================================================================
   zone.css — account, admin and auth pages, aligned with the homepage look.
   Loaded after app.css (account/admin via layouts/app.php); auth pages link it explicitly.
   ========================================================================== */
:root { --z-muted: #5B6B8A; --z-muted-2: #6B7A99; --z-bg: #F7F9FD; }

/* ---------- App shell ---------- */
.app { background: var(--z-bg); }
.sidebar { padding: 18px 12px 24px; border-right: 1px solid var(--border); }
.sidebar h6 { font-size: .64rem; letter-spacing: .14em; color: var(--z-muted); margin: 16px 12px 6px; font-weight: 700; }
.sidebar h6:first-child { margin-top: 2px; }
.sidebar a { padding: 8px 12px; font-size: .86rem; border-radius: 8px; color: var(--text-2); position: relative; }
.sidebar a svg { width: 17px; height: 17px; opacity: .65; stroke-width: 1.8; }
.sidebar a.active { background: var(--blue-50); color: var(--blue); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue); }
.sidebar a.active svg { opacity: 1; }
.sidebar .plan-box { margin: 18px 6px 0; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: .8rem; box-shadow: var(--shadow-sm); }
.sidebar .plan-box b { display: block; color: var(--navy); font-size: .84rem; }
.sidebar .plan-box .pb-eyebrow { display: block; font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 4px; }
.sidebar .plan-box .pb-bar { height: 5px; background: var(--border); border-radius: 999px; margin: 8px 0 6px; overflow: hidden; }
.sidebar .plan-box .pb-bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.main { padding: 26px 32px 56px; }
.main-head { margin-bottom: 20px; align-items: flex-start; }
.main-head h1 { font-size: 1.45rem; letter-spacing: -.02em; }
.main-head .eyebrow-z, .z-eyebrow { display: block; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); font-weight: 700; margin-bottom: 4px; }
.main-head .small.muted { color: var(--z-muted); margin-top: 2px; }
.main .btn { font-size: .86rem; padding: 8px 14px; border-radius: 7px; }
.main .btn-sm { font-size: .76rem; padding: 5px 10px; }
.main .btn svg { width: 15px; height: 15px; }
.main .breadcrumb { font-size: .76rem; }
.main h2 { font-size: 1.1rem; } .main h3 { font-size: .95rem; }
.main .alert { font-size: .86rem; padding: 10px 14px; border-radius: 8px; }

/* ---------- Tiles ---------- */
.stat-tiles { gap: 14px; margin-bottom: 20px; }
.tile { padding: 14px 16px 14px 18px; border-radius: 10px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue); }
.tile.ok::before { background: var(--ok); } .tile.warn::before { background: var(--warn); } .tile.fail::before { background: var(--fail); }
.tile span { font-size: .66rem; letter-spacing: .1em; color: var(--z-muted); }
.tile b { font-size: 1.5rem; margin-top: 3px; }
.tile b small { font-size: .78rem !important; font-weight: 500 !important; color: var(--z-muted-2); }
.tile .xs { font-size: .72rem; color: var(--z-muted-2); margin-top: 3px; }
.tile .t-ic { position: absolute; right: 14px; top: 12px; width: 30px; height: 30px; border-radius: 8px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; }
.tile .t-ic svg { width: 16px; height: 16px; }
.tile.ok .t-ic { background: var(--ok-bg); color: var(--ok); } .tile.warn .t-ic { background: var(--warn-bg); color: var(--warn); } .tile.fail .t-ic { background: var(--fail-bg); color: var(--fail); }

/* ---------- Panels & tables ---------- */
.panel { border-radius: 10px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.panel-head { padding: 11px 18px; }
.panel-head h3 { font-size: .9rem; }
.panel-head .small, .panel-head a.small { font-size: .78rem; font-weight: 600; }
.panel-body { padding: 16px 18px; }
.panel > .table-wrap .table td, .panel > .table-wrap .table th { padding-left: 18px; padding-right: 18px; }
.main .table th { font-size: .66rem; letter-spacing: .08em; padding: 7px 10px; color: var(--z-muted); background: #FAFBFE; }
.main .table td { padding: 8px 10px; font-size: .84rem; }
.main .table td .xs { color: var(--z-muted-2); }
.main .table td b { color: var(--navy); font-weight: 600; }
.main .table td a b { color: var(--navy); } .main .table td a:hover b { color: var(--blue); }
.main .badge { font-size: .68rem; padding: 1px 8px; }
.main .health { width: 34px; height: 34px; font-size: .8rem; border-width: 2.5px; }
.main .empty { padding: 36px 20px; color: var(--z-muted); font-size: .88rem; }
.main .empty svg { width: 40px; height: 40px; color: var(--blue-200); stroke-width: 1.5; }
.main .empty h3 { margin: 4px 0 6px; font-size: 1rem; }
.main .empty p { max-width: 420px; margin: 0 auto 14px; }
.main .pagination { padding: 10px 18px; } .main .pagination a, .main .pagination span { font-size: .78rem; padding: 4px 9px; }
.main .kv > div { font-size: .84rem; padding: 7px 10px; }
.main label { font-size: .8rem; } .main input, .main select, .main textarea, .main .input { font-size: .88rem; padding: 8px 11px; border-radius: 7px; }
.main .help { font-size: .74rem; }
.main .form-group { margin-bottom: 14px; }
.main .check-detail summary { font-size: .86rem; padding: 10px 18px; }
.main code { font-size: .78rem; }
.main .grid { gap: 18px; }
.main .results { margin-top: 16px; }

/* Domain detail: health ring header */
.z-ring { --v: 0; width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--ring, var(--ok)) calc(var(--v) * 1%), #E2E8F0 0); display: grid; place-items: center; position: relative; flex: none; }
.z-ring::before { content: ''; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.z-ring b { position: relative; font-size: 1.1rem; font-weight: 800; color: var(--navy); }
.z-ring small { position: relative; font-size: .58rem; color: var(--z-muted-2); font-weight: 700; margin-top: -3px; }
.main .score-ring { width: 88px; height: 88px; font-size: 1.5rem; } .main .score-ring::before { inset: 8px; }
.main .chart-bar i { border-radius: 2px 2px 0 0; }
.main .rate { height: 6px; }

/* Dense quick lookup in dashboard */
.main .supertool-form .input { font-size: .9rem; padding: 9px 12px; }

/* Grid children must be allowed to shrink (tables inside .table-wrap scroll instead of widening the page) */
.main { min-width: 0; } .main .grid > * { min-width: 0; } .main .panel { min-width: 0; } .main .supertool-form { flex-wrap: wrap; } .main .supertool-form .input { min-width: 0; flex: 1 1 160px; }
@media (max-width: 1100px) { .main .grid[style*="grid-template-columns"] { grid-template-columns: 1fr !important; } }
@media (max-width: 640px) { .main .form-row[style], .main .stat-tiles[style] { grid-template-columns: 1fr !important; } }
.main .mono, .main pre, .main .check-body { overflow-wrap: anywhere; word-break: break-word; } .main .check-body { overflow-x: auto; }
.diff-box { max-height: 96px; overflow: hidden; position: relative; }
.diff-box.open { max-height: none; }
.diff-box:not(.open)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.diff-toggle { font-size: .74rem; font-weight: 600; cursor: pointer; color: var(--blue); background: none; border: 0; padding: 2px 0; }
/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .sidebar { padding: 8px 10px; gap: 2px; border-right: 0; border-bottom: 1px solid var(--border); }
  .sidebar a { padding: 6px 9px; font-size: .78rem; } .sidebar a svg { display: none; }
  .main { padding: 18px 16px 40px; } .stat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; } .tile b { font-size: 1.25rem; }
}
@media (max-width: 560px) { .stat-tiles { grid-template-columns: 1fr; } }

/* ==========================================================================
   Auth pages — two-column brand layout
   ========================================================================== */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: calc(100vh - 90px); }
.auth-brand { position: relative; overflow: hidden; background: linear-gradient(160deg, #0B1F4B 0%, #143A8C 100%); color: #DCE4F5; padding: 56px 56px 40px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand::before { content: ''; position: absolute; right: -80px; bottom: -40px; width: 680px; height: 440px; background: url('/assets/img/world-dots.svg') no-repeat center / contain; opacity: .55; filter: brightness(2.4); pointer-events: none; }
.auth-brand > * { position: relative; }
.auth-brand .eyebrow { color: #93B4FF; font-size: .68rem; letter-spacing: .14em; margin-bottom: 12px; }
.auth-brand h2 { color: #fff; font-size: 1.9rem; letter-spacing: -.025em; line-height: 1.15; margin-bottom: 12px; max-width: 460px; }
.auth-brand p { color: #B6C2DC; font-size: .92rem; max-width: 440px; }
.auth-brand ul { list-style: none; padding: 0; margin: 22px 0 0; }
.auth-brand li { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; color: #E2E8F0; padding: 6px 0; }
.auth-brand li i { width: 18px; height: 18px; border-radius: 50%; background: rgba(147,180,255,.2); color: #93B4FF; display: grid; place-items: center; flex: none; margin-top: 1px; }
.auth-brand li i svg { width: 10px; height: 10px; stroke-width: 3; }
.auth-brand .legal { font-size: .72rem; color: #8FA0C4; margin-top: 40px; }
.auth-brand .legal b { color: #C7D2E8; font-weight: 600; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: var(--z-bg); }
.auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 30px 30px 26px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.45rem; letter-spacing: -.02em; margin-bottom: 4px; }
.auth-card .sub { color: var(--z-muted); font-size: .88rem; margin-bottom: 18px; }
.auth-card label { font-size: .8rem; } .auth-card input:not([type=checkbox]) { padding: 9px 12px; font-size: .92rem; border-radius: 7px; }
.auth-card .form-group { margin-bottom: 14px; } .auth-card .help { font-size: .74rem; }
.auth-card .btn-lg { padding: 11px 20px; font-size: .95rem; border-radius: 8px; }
.auth-card .foot { text-align: center; font-size: .82rem; color: var(--z-muted); margin: 16px 0 0; }
.auth-card .alert { font-size: .84rem; padding: 9px 12px; }
.auth-card .checkbox { display: block; font-size: .84rem; line-height: 1.5; font-weight: 500; } .auth-card .checkbox input { display: inline; vertical-align: middle; margin: 0 6px 0 0; }
.auth-card .btn-block.btn-outline { margin-top: 8px; }
.auth-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; min-height: 0; } .auth-brand { padding: 32px 24px; } .auth-brand h2 { font-size: 1.5rem; } .auth-brand .legal { margin-top: 22px; } .auth-form { padding: 24px 16px 40px; } .auth-card { padding: 22px 18px; } }

/* ---------- App-shell header (account & admin) ----------
   The zone layout is full-bleed, so the header stretches with it instead of sitting
   in the narrow marketing container: the logo takes the sidebar column (sharing its
   divider) and the actions line up with the right edge of .main. */
.header-app .container { max-width: none; padding: 0 32px 0 0; gap: 0; }
.header-app .logo { flex: none; width: 248px; align-self: stretch; padding: 0 20px 0 24px; border-right: 1px solid var(--border); }
.header-app .nav { margin-left: 20px; gap: 2px; }
.header-app .nav > li > a { font-size: .86rem; }
.header-app .header-actions { gap: 12px; }
.header-app .header-actions .btn { font-size: .82rem; padding: 6px 14px; }
@media (max-width: 900px) {
  .header-app .container { padding: 0 16px; }
  .header-app .logo { width: auto; align-self: center; padding: 0; border-right: 0; }
  .header-app .nav { margin-left: 0; }
}
