/* The sign-in pages: login, no_password, forgot_password, new_password, sign_up (page/auth_top.php) */
:root { --at-bg:#fff; --at-text:#071437; --at-muted:#59637C; --at-field:#fff; --at-line:#8A94AA; --at-rule:#E3E7EF; --at-action:#176AC5; --at-action-h:#12579F; --at-link:#1463BA; --at-panel:#EAF2FE; --at-soft:#EEF4FD; --at-bad:#A8143A; --at-bad-bg:#FFEEF3; --at-good:#0B6B30; --at-good-bg:#E5F8EC; --at-shadow:0 24px 60px rgba(7,20,55,.16); color-scheme:light; }
[data-bs-theme="dark"] { --at-bg:#0F1014; --at-text:#F5F5F5; --at-muted:#A3ABB9; --at-field:#15171C; --at-line:#646C7D; --at-rule:#26272F; --at-action:#1F6FD6; --at-action-h:#175FBD; --at-link:#78ABFF; --at-panel:#141B2A; --at-soft:#161D2B; --at-bad:#FF96AD; --at-bad-bg:#2C1A20; --at-good:#58D488; --at-good-bg:#11261A; --at-shadow:0 24px 60px rgba(0,0,0,.55); color-scheme:dark; }

html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--at-bg); }
.at { min-height:100vh; min-height:100dvh; background:var(--at-bg); color:var(--at-text); font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif; font-size:15px; line-height:1.5; -webkit-font-smoothing:antialiased; }
.at, .at *, .at *::before, .at *::after { box-sizing:border-box; }
.at h1, .at h2, .at p, .at ol { margin:0; }
.at a { color:var(--at-link); font-weight:600; text-decoration:none; }
.at a:hover { text-decoration:underline; }
.at :focus-visible { outline:2px solid var(--at-link); outline-offset:2px; }
.at [hidden] { display:none !important; }

/* Frames */
.at-split { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); }
.at-col { display:flex; flex-direction:column; min-height:100vh; min-height:100dvh; padding:28px 40px; min-width:0; }
.at-top { display:flex; align-items:flex-start; justify-content:space-between; }
.at-body { flex:1; display:flex; align-items:center; justify-content:center; padding:32px 0; }
.at-form { width:100%; max-width:400px; margin:0; display:flex; flex-direction:column; gap:24px; }
.at-foot { color:var(--at-muted); font-size:13px; text-align:center; }
.at .at-foot a { color:var(--at-muted); text-decoration:underline; font-weight:500; }
.at-logo { display:block; line-height:0; }
.at-logo img { width:84px; height:auto; }
.at-dk, [data-bs-theme="dark"] .at-lt { display:none; }
[data-bs-theme="dark"] .at-dk { display:block; }

/* Text */
.at-head { display:flex; flex-direction:column; gap:6px; }
.at-head h1 { font-size:30px; line-height:1.2; font-weight:600; letter-spacing:-.025em; text-wrap:balance; }
.at-head p { color:var(--at-muted); text-wrap:pretty; }
.at-strong { color:var(--at-text); font-weight:600; overflow-wrap:anywhere; }

/* Fields */
.at-fields { display:flex; flex-direction:column; gap:16px; }
.at-two { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.at-field { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; align-items:baseline; }
.at-field > label { grid-row:1; font-size:14px; font-weight:600; }
.at-field > .at-side { grid-row:1; grid-column:2; font-size:14px; }
.at-in { grid-column:1 / -1; position:relative; display:block; }
.at-in input { display:block; width:100%; height:48px; margin:0; padding:0 14px; border:1px solid var(--at-line); border-radius:8px; background:var(--at-field); color:var(--at-text); font:500 16px/1.4 Inter,system-ui,sans-serif; -webkit-appearance:none; appearance:none; }
.at-in input::placeholder { color:var(--at-muted); opacity:1; font-weight:400; }
.at-in input:focus { outline:2px solid var(--at-link); outline-offset:-1px; border-color:transparent; }
.at-in input:-webkit-autofill { -webkit-text-fill-color:var(--at-text); box-shadow:inset 0 0 0 60px var(--at-field); caret-color:var(--at-text); }
.at-in input::-ms-reveal { display:none; }
.at-in.has-eye input { padding-right:54px; }
.at-in input[aria-invalid="true"] { border-color:var(--at-bad); outline-color:var(--at-bad); }
.at-err { grid-column:1 / -1; color:var(--at-bad); font-size:14px; font-weight:500; }
.at-eye { position:absolute; right:2px; top:2px; width:44px; height:44px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--at-muted); display:grid; place-items:center; cursor:pointer; }
.at-eye:hover { color:var(--at-text); }
.at-eye span { line-height:0; }
.at-eye .at-eye-on, .at-eye[aria-pressed="true"] .at-eye-off { display:none; }
.at-eye[aria-pressed="true"] .at-eye-on { display:block; }
.at-check { display:flex; gap:12px; align-items:flex-start; font-size:14px; color:var(--at-muted); line-height:1.5; cursor:pointer; }
.at-check input { width:20px; height:20px; margin:1px 0 0; flex:none; accent-color:var(--at-action); }
.at-check input[aria-invalid="true"] { outline:2px solid var(--at-bad); outline-offset:1px; border-radius:4px; }
.at-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; padding:0; margin:-1px; }

/* Password rule */
.at-rule { grid-column:1 / -1; display:flex; align-items:center; gap:8px; font-size:14px; color:var(--at-muted); }
.at-rule svg { flex:none; }
.at-rule .at-tick { display:none; }
.at-rule.is-ok { color:var(--at-good); font-weight:500; }
.at-rule.is-ok .at-tick { display:inline; }
.at-rule.is-bad { color:var(--at-bad); font-weight:500; }
.at-bars { grid-column:1 / -1; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px; }
.at-bars i { height:4px; border-radius:2px; background:var(--at-rule); }
.at-bars i.on { background:var(--at-good); }

/* Buttons */
.at-btn { width:100%; min-height:48px; margin:0; padding:10px 18px; border-radius:8px; border:1px solid transparent; font:600 16px/1.3 Inter,system-ui,sans-serif; display:flex; align-items:center; justify-content:center; gap:10px; cursor:pointer; text-align:center; }
.at .at-btn.pri { background:var(--at-action); color:#fff; }
.at .at-btn.pri:hover { background:var(--at-action-h); text-decoration:none; }
.at .at-btn.sec { background:transparent; color:var(--at-text); border-color:var(--at-line); }
.at .at-btn.sec:hover { background:var(--at-soft); text-decoration:none; }
.at-btn[aria-disabled="true"] { cursor:progress; opacity:.75; }
.at-btn[aria-disabled="true"]::before { content:""; width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:at-spin .8s linear infinite; }
@keyframes at-spin { to { transform:rotate(360deg); } }
.at-acts { display:flex; flex-direction:column; gap:12px; }
.at-or { display:flex; align-items:center; gap:14px; color:var(--at-muted); font-size:13px; }
.at-or::before, .at-or::after { content:""; flex:1; height:1px; background:var(--at-rule); }
.at-back { display:inline-flex; align-items:center; gap:8px; align-self:flex-start; min-height:44px; }

/* Cloudflare's check takes no room unless it has something to show (assets/js/auth.js adds .on) */
.at-cf { height:0; margin-bottom:-24px; }
.at-cf.on { height:auto; margin-bottom:0; }

/* Messages */
[data-auth-msg]:empty { display:none; }
.at-msg { display:flex; gap:12px; padding:14px 16px; border-radius:8px; font-size:14px; line-height:1.5; }
.at-msg svg { flex:none; margin-top:1px; }
.at-msg.bad { background:var(--at-bad-bg); color:var(--at-bad); }
.at-msg.good { background:var(--at-good-bg); color:var(--at-good); }
.at-msg.info { background:var(--at-soft); color:var(--at-text); }
.at-msg.info svg { color:var(--at-link); }
.at .at-msg.bad a { color:var(--at-bad); text-decoration:underline; }
.at-msg b { font-weight:600; display:block; }
.at-mark { width:52px; height:52px; border-radius:14px; background:var(--at-soft); color:var(--at-link); display:grid; place-items:center; }

/* Side panel */
.at-panel { background:var(--at-panel); overflow:hidden; display:flex; flex-direction:column; justify-content:center; gap:40px; padding:64px 0 64px 64px; min-width:0; }
.at-panel h2 { font-size:38px; line-height:1.12; font-weight:600; letter-spacing:-.035em; max-width:500px; padding-right:40px; text-wrap:balance; }
.at-shot { width:max(900px, 100%); aspect-ratio:2240 / 1400; flex:none; border-radius:12px 0 0 12px; box-shadow:var(--at-shadow); background:var(--at-field) url('../media/auth/app-inventory.png') left top / 100% auto no-repeat; }
[data-bs-theme="dark"] .at-shot { background-image:url('../media/auth/app-inventory-dark.png'); }
.at-steps { list-style:none; padding:0 64px 0 0; display:flex; flex-direction:column; gap:22px; max-width:560px; }
.at-steps li { display:flex; gap:16px; }
.at-steps .n { flex:none; width:32px; height:32px; border-radius:50%; border:1.5px solid var(--at-link); color:var(--at-link); font-weight:600; font-size:14px; display:grid; place-items:center; }
.at-steps .n.on { background:var(--at-action); border-color:var(--at-action); color:#fff; }
.at-steps b { display:block; font-weight:600; font-size:16px; line-height:32px; }
.at-steps .d { color:var(--at-muted); }
.at-quote { margin:0; padding-right:64px; max-width:520px; display:flex; flex-direction:column; gap:8px; }
.at-quote p { font-size:20px; line-height:1.4; font-weight:500; letter-spacing:-.01em; }
.at-quote footer { color:var(--at-muted); font-size:14px; }
.at .at-narrow { display:none; }

@media (max-width:991px) {
  .at-split { grid-template-columns:minmax(0,1fr); }
  .at-panel { display:none; }
  .at .at-narrow { display:block; }
}
@media (max-width:575px) {
  .at-col { padding:20px 20px 24px; }
  .at-body { align-items:flex-start; padding:36px 0 32px; }
  .at-head h1 { font-size:28px; }
  .at-two { gap:12px; }
}
@media (prefers-reduced-motion:reduce) {
  .at-btn[aria-disabled="true"]::before { animation-duration:3s; }
}

/* New account pages: verify_email, set_plan, set_up */
.at-nav { display:flex; align-items:center; gap:20px; font-size:14px; margin-top:-6px; }
.at .at-nav a { color:var(--at-muted); padding:10px 0; }
.at-mid { max-width:560px; }
.at-wide { max-width:1040px; }
.at-part { display:flex; flex-direction:column; gap:24px; }
.at-mid { position:relative; }
.at-part.at-away { position:absolute; left:0; top:0; width:100%; height:0; overflow:hidden; visibility:hidden; }
.at-progress { list-style:none; padding:0; display:flex; flex-wrap:wrap; gap:8px 20px; font-size:13px; color:var(--at-muted); }
.at-progress li { display:flex; align-items:center; gap:8px; }
.at-progress .n { width:24px; height:24px; border-radius:50%; border:1.5px solid var(--at-line); display:grid; place-items:center; font-size:12px; font-weight:600; flex:none; }
.at-progress .on { color:var(--at-text); font-weight:600; }
.at-progress .on .n { background:var(--at-action); border-color:var(--at-action); color:#fff; }
.at-progress .done .n { background:var(--at-good-bg); border-color:var(--at-good-bg); color:var(--at-good); }
/* No room for every name in a narrow form: only the current step's */
.at-form:not(.at-mid):not(.at-wide) .at-progress { gap:8px; }
.at-form:not(.at-mid):not(.at-wide) .at-progress li:not(.on) .t { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.at-three { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; }
.at-req::after { content:" *"; color:var(--at-bad); }
.at-hint { grid-column:1 / -1; color:var(--at-muted); font-size:13px; }
.at-link { border:0; background:none; padding:0; color:var(--at-link); font:600 14px/1.5 Inter,system-ui,sans-serif; cursor:pointer; }
.at-link:hover { text-decoration:underline; }
.at-in select { display:block; width:100%; height:48px; margin:0; padding:0 40px 0 14px; border:1px solid var(--at-line); border-radius:8px; background:var(--at-field); color:var(--at-text); font:500 16px/1.4 Inter,system-ui,sans-serif; -webkit-appearance:none; appearance:none; text-overflow:ellipsis; }
.at-in select:focus { outline:2px solid var(--at-link); outline-offset:-1px; border-color:transparent; }
.at-in select[aria-invalid="true"] { border-color:var(--at-bad); }
.at-select::after { content:""; position:absolute; right:17px; top:18px; width:8px; height:8px; border:solid var(--at-muted); border-width:0 2px 2px 0; transform:rotate(45deg); pointer-events:none; }
.at-in input[type="date"] { min-width:0; text-align:left; }
.at-sign { height:152px; border:1px solid var(--at-line); border-radius:8px; background:#fff; overflow:hidden; color:#071437; touch-action:none; cursor:crosshair; }
.at-sign[aria-invalid="true"] { border-color:var(--at-bad); }
.at-sign canvas { display:block; margin:0 !important; }
/* Dark: the white canvas is turned over to light ink on black, and the black lets the field's own colour through */
[data-bs-theme="dark"] .at-sign { background:var(--at-field); isolation:isolate; }
[data-bs-theme="dark"] .at-sign canvas { filter:invert(1) hue-rotate(180deg); mix-blend-mode:screen; }
.at-acts-narrow { width:100%; max-width:400px; margin:0 auto; }
.at-acts-row { flex-direction:row; }
.at-acts-row .at-btn.sec { width:auto; min-width:110px; }

.at-plans { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:stretch; }
.at-plan { position:relative; border:1px solid var(--at-rule); border-radius:12px; padding:20px; display:flex; flex-direction:column; gap:18px; }
.at-plan:hover { border-color:var(--at-line); }
.at-plan:has(input:checked) { border-color:var(--at-action); box-shadow:inset 0 0 0 1px var(--at-action); }
.at-plan:has(input:focus-visible) { outline:2px solid var(--at-link); outline-offset:3px; }
.at-plan-top { display:flex; flex-direction:column; gap:6px; cursor:pointer; }
.at-plan-top::after { content:""; position:absolute; inset:0; border-radius:12px; }
.at-plan-name { display:flex; align-items:center; gap:10px; font-size:18px; font-weight:600; }
.at-plan-name input { width:20px; height:20px; margin:0; flex:none; accent-color:var(--at-action); outline:none !important; }
.at-badge { margin-left:auto; padding:3px 10px; border-radius:99px; background:var(--at-good-bg); color:var(--at-good); font-size:12px; font-weight:600; }
.at-price { color:var(--at-muted); font-size:14px; }
.at-price b { color:var(--at-text); font-size:30px; font-weight:600; letter-spacing:-.025em; }
.at-plan-note { color:var(--at-good); font-size:14px; font-weight:600; }
.at-plan-for { color:var(--at-muted); font-size:14px; }
.at-plan ul { list-style:none; margin:0; padding:18px 0 0; border-top:1px solid var(--at-rule); display:flex; flex-direction:column; gap:9px; font-size:14px; }
.at-plan li { display:flex; gap:10px; align-items:flex-start; }
.at-plan li svg { flex:none; margin-top:2px; color:var(--at-good); }
.at-plan li.no { color:var(--at-muted); }
.at-plan li.no svg { color:var(--at-muted); }

@media (max-width:991px) {
  /* One under the other: only the picked plan lists what's in it */
  .at-plans { grid-template-columns:minmax(0,1fr); }
  .at-plan:not(:has(input:checked)) ul { display:none; }
}
@media (max-width:575px) {
  .at-three, .at-stack { grid-template-columns:minmax(0,1fr); gap:16px; }
  .at-nav { gap:14px; }
  .at-progress { gap:8px; }
  .at-progress li:not(.on) .t { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
}

/* The theme menu: the app's own, at its sizes and colours (page/nav.php, Metronic) */
.at-theme { position:relative; margin:0 -6px 0 0; }
.at-theme-btn { position:relative; width:35px; height:35px; padding:0; border:0; border-radius:6.2px; background:transparent; color:#99A1B7; display:grid; place-items:center; cursor:pointer; }
.at-theme-btn::after { content:""; position:absolute; inset:-5px; }
.at-theme-btn svg { display:block; width:22.75px; height:22.75px; }
.at-theme-btn:hover, .at-theme-btn[aria-expanded="true"] { background:#F9F9F9; color:#1B84FF; }
.at-theme-menu { position:absolute; right:0; top:100%; z-index:107; width:150px; padding:13px 0; display:flex; flex-direction:column; border-radius:6.2px; background:#fff; box-shadow:0 0 50px 0 rgba(82,63,105,.15); animation:at-menu-in .3s ease, at-menu-up .3s ease; }
/* Bridges the gap to the button while the mouse moves down */
.at-theme-menu::before { content:""; position:absolute; left:0; right:0; top:-10px; height:10px; }
.at-theme-menu button { width:calc(100% - 19.5px); margin:1.95px 9.75px; padding:6.5px 9.75px; border:0; border-radius:6.2px; background:transparent; color:#4B5675; display:flex; align-items:center; font:500 13px/1.5 Inter,system-ui,sans-serif; text-align:left; cursor:pointer; }
.at-theme-menu button span { width:26px; margin-right:6.5px; color:#99A1B7; display:grid; place-items:center; flex:none; }
.at-theme-menu svg { display:block; width:19.5px; height:19.5px; }
.at-theme-menu button:hover, .at-theme-menu button:hover span, .at-theme-menu button[aria-pressed="true"], .at-theme-menu button[aria-pressed="true"] span { color:#1B84FF; }
.at-theme-menu button[aria-pressed="true"] { background:#F9F9F9; }
[data-bs-theme="dark"] .at-theme-btn { color:#636674; }
[data-bs-theme="dark"] .at-theme-btn:hover, [data-bs-theme="dark"] .at-theme-btn[aria-expanded="true"] { background:#1B1C22; color:#006AE6; }
[data-bs-theme="dark"] .at-theme-menu { background:#1C1D22; box-shadow:0 0 30px rgba(0,0,0,.3); }
[data-bs-theme="dark"] .at-theme-menu button { color:#9A9CAE; }
[data-bs-theme="dark"] .at-theme-menu button span { color:#636674; }
[data-bs-theme="dark"] .at-theme-menu button:hover, [data-bs-theme="dark"] .at-theme-menu button:hover span, [data-bs-theme="dark"] .at-theme-menu button[aria-pressed="true"], [data-bs-theme="dark"] .at-theme-menu button[aria-pressed="true"] span { color:#006AE6; }
[data-bs-theme="dark"] .at-theme-menu button[aria-pressed="true"] { background:#1B1C22; }
@keyframes at-menu-in { from { opacity:0; } to { opacity:1; } }
@keyframes at-menu-up { from { margin-top:9.75px; } to { margin-top:0; } }

/* Error pages: 404, 500 and permission. Each has a dashboard instrument (.nf-dash) over its message. */
.nf { width:100%; max-width:460px; display:flex; flex-direction:column; align-items:center; gap:28px; text-align:center; }
.nf .at-head { align-items:center; }
.nf .at-acts { width:100%; max-width:320px; }
.nf-dash { display:flex; align-items:center; justify-content:center; border-radius:14px; background:#12151C; color:#A3ABB9; box-shadow:inset 0 0 0 1px rgba(255,255,255,.08), var(--at-shadow); }
/* Odometer, stopped at 404 */
.nf-odo { gap:4px; padding:10px; }
.nf-odo i { position:relative; width:46px; height:68px; overflow:hidden; border-radius:7px; background:linear-gradient(#06080C, #2B303B 50%, #06080C); color:#F5F7FA; font:600 40px/68px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-style:normal; }
.nf-odo i.last { background:linear-gradient(#8D0F2F, #D7264F 50%, #8D0F2F); }
.nf-odo i span { display:block; animation:nf-roll 1.1s cubic-bezier(.2,.8,.2,1) both; }
.nf-odo i span b { display:block; height:68px; font-weight:600; }
.nf-odo em { padding:0 8px 0 6px; font:600 14px/1 Inter,system-ui,sans-serif; font-style:normal; }
@keyframes nf-roll { from { transform:translateY(0); } to { transform:translateY(var(--nf-to)); } }
/* Check engine light */
.nf-light { flex-direction:column; gap:14px; width:210px; padding:30px 24px 24px; color:#FFB224; }
.nf-light svg { width:112px; height:auto; display:block; filter:drop-shadow(0 0 10px rgba(255,170,30,.55)); }
.nf-light b { font:700 13px/1 Inter,system-ui,sans-serif; letter-spacing:.16em; }
.nf-light svg, .nf-light b { animation:nf-start 1.1s linear both, nf-glow 2.6s ease-in-out 1.1s infinite; }
@keyframes nf-start { 0%, 18% { opacity:.12; } 20%, 34% { opacity:1; } 36%, 48% { opacity:.12; } 50%, 100% { opacity:1; } }
@keyframes nf-glow { 0%, 100% { opacity:1; } 50% { opacity:.72; } }
/* Temperature gauge, in the red */
.nf-gauge { padding:22px 26px 16px; }
.nf-gauge svg { width:240px; max-width:100%; height:auto; display:block; }
.nf-gauge .needle { transform-origin:120px 120px; transform:rotate(68deg); animation:nf-heat 1.6s cubic-bezier(.3,.7,.2,1) both; }
@keyframes nf-heat { from { transform:rotate(-70deg); } 80% { transform:rotate(73deg); } to { transform:rotate(68deg); } }
@media (max-width:420px) { .nf-odo i { width:40px; height:60px; font-size:34px; line-height:60px; } .nf-odo i span b { height:60px; } .nf-odo em { padding:0 4px 0 2px; } }
@media (max-width:340px) { .nf-odo i { width:34px; } }
@media (prefers-reduced-motion:reduce) { .nf-odo i span { animation:none; transform:translateY(var(--nf-to)); } .nf-light svg, .nf-light b, .nf-gauge .needle { animation:none; } }
