/* OptiVac sign-in look: login.html and account.html (sign-up, verify,
   forgot / reset password, add a device). */
:root {
    --ox-bg: #050e0d;
    --ox-bg-2: #0a1a18;
    --ox-panel: rgba(9, 24, 22, 0.82);
    --ox-line: #12443d;
    --ox-teal: #22e6d8;
    --ox-teal-deep: #0fb5b0;
    --ox-green: #2ee57f;
    --ox-white: #f2f6f6;
    --ox-mute: #8fa9a6;
    --ox-danger: #ff6b6b;
    --ox-font: 'Saira', system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
    --ox-cut: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: var(--ox-font);
    color: var(--ox-white);
    background:
        radial-gradient(1200px 700px at 12% 18%, rgba(34, 230, 216, 0.13), transparent 60%),
        radial-gradient(900px 600px at 92% 88%, rgba(46, 229, 127, 0.10), transparent 60%),
        linear-gradient(160deg, var(--ox-bg-2) 0%, var(--ox-bg) 55%);
    background-color: var(--ox-bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Faint circuit grid behind everything */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 230, 216, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 230, 216, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
    pointer-events: none;
}

.ox-lang {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 5;
    display: flex;
    border: 1px solid var(--ox-line);
    border-radius: 999px;
    overflow: hidden;
    background: rgba(5, 14, 13, 0.7);
}
.ox-lang button {
    background: none;
    border: 0;
    color: var(--ox-mute);
    font: 600 12px/1 var(--ox-font);
    letter-spacing: 0.12em;
    padding: 8px 12px;
    cursor: pointer;
}
.ox-lang button[aria-pressed="true"] {
    background: var(--ox-teal);
    color: #04211f;
}

.ox-shell {
    position: relative;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: 48px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 64px 32px;
}

/* ---------- Brand side ---------- */
.ox-brand-logo {
    display: block;
    width: min(360px, 80%);
    height: auto;
    margin-bottom: 44px;
}

.ox-product {
    font-weight: 800;
    font-size: clamp(54px, 8vw, 96px);
    line-height: 0.95;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.ox-product .ox-opti { color: var(--ox-white); }
.ox-product .ox-vac {
    background: linear-gradient(180deg, #5ff7ec 0%, var(--ox-teal) 45%, var(--ox-teal-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 34px rgba(34, 230, 216, 0.25);
}

.ox-tagline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.32em;
    color: #c9d6d5;
}
.ox-tagline i {
    width: 2px;
    height: 16px;
    background: var(--ox-green);
    box-shadow: 0 0 8px var(--ox-green);
}

.ox-pitch {
    margin-top: 30px;
    max-width: 460px;
    color: var(--ox-mute);
    font-size: 17px;
    line-height: 1.55;
}

.ox-gauge-row {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 40px;
}
.ox-gauge { width: 96px; height: 96px; flex: none; }
.ox-gauge .ox-needle {
    transform-origin: 50px 50px;
    animation: ox-sweep 6s ease-in-out infinite;
}
@keyframes ox-sweep {
    0%, 100% { transform: rotate(-40deg); }
    45% { transform: rotate(38deg); }
    60% { transform: rotate(30deg); }
}
.ox-live {
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ox-mute);
    line-height: 1.8;
}
.ox-live strong {
    display: block;
    color: var(--ox-white);
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 15px;
}
.ox-dots { display: inline-flex; gap: 7px; margin-top: 6px; }
.ox-dots span {
    width: 8px; height: 8px; border-radius: 50%;
    background: #4b5b5a;
}
.ox-dots span:nth-child(2) {
    background: var(--ox-green);
    box-shadow: 0 0 10px var(--ox-green);
    animation: ox-blink 2.4s ease-in-out infinite;
}
@keyframes ox-blink { 50% { opacity: 0.35; } }

/* ---------- Login card (chamfered like the sensor label) ---------- */
.ox-card-wrap {
    position: relative;
    padding: 1.5px;
    background: linear-gradient(140deg, var(--ox-teal) 0%, rgba(34, 230, 216, 0.15) 40%, rgba(46, 229, 127, 0.15) 70%, var(--ox-green) 100%);
    clip-path: polygon(var(--ox-cut) 0, 100% 0, 100% calc(100% - var(--ox-cut)), calc(100% - var(--ox-cut)) 100%, 0 100%, 0 var(--ox-cut));
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.55));
    max-width: 440px;
    width: 100%;
    justify-self: end;
}
.ox-card {
    background: var(--ox-panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    clip-path: polygon(var(--ox-cut) 0, 100% 0, 100% calc(100% - var(--ox-cut)), calc(100% - var(--ox-cut)) 100%, 0 100%, 0 var(--ox-cut));
    padding: 42px 38px 34px;
}

.ox-card h1 {
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.04em;
}
.ox-card .ox-sub {
    margin-top: 6px;
    color: var(--ox-mute);
    font-size: 15px;
}

.ox-error {
    display: none;
    margin-top: 22px;
    padding: 12px 14px;
    border-left: 3px solid var(--ox-danger);
    background: rgba(255, 107, 107, 0.09);
    color: #ffb4b4;
    font-size: 14px;
}
.ox-error.show { display: block; }

form { margin-top: 28px; }

.ox-field { margin-bottom: 20px; }
.ox-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #b8cbc9;
}
.ox-input {
    position: relative;
}
.ox-input input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(2, 9, 8, 0.75);
    border: 1px solid var(--ox-line);
    border-radius: 6px;
    color: var(--ox-white);
    font: 400 16px var(--ox-font);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.ox-input input::placeholder { color: #557471; }
.ox-input input:focus {
    outline: none;
    border-color: var(--ox-teal);
    box-shadow: 0 0 0 3px rgba(34, 230, 216, 0.18);
}
.ox-input input:-webkit-autofill {
    -webkit-text-fill-color: var(--ox-white);
    -webkit-box-shadow: 0 0 0 1000px #061412 inset;
    caret-color: var(--ox-white);
}
.ox-input input[type="password"], .ox-input input.ox-pw { padding-right: 52px; }
.ox-reveal {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    background: none;
    color: var(--ox-mute);
    cursor: pointer;
    border-radius: 4px;
}
.ox-reveal:hover, .ox-reveal:focus-visible { color: var(--ox-teal); outline: none; }
.ox-reveal svg { width: 20px; height: 20px; }

.ox-submit {
    position: relative;
    width: 100%;
    min-height: 52px;
    margin-top: 8px;
    border: 0;
    cursor: pointer;
    color: #03201e;
    font: 700 16px var(--ox-font);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(180deg, #62f6ec 0%, var(--ox-teal) 50%, var(--ox-teal-deep) 100%);
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    transition: filter 0.2s, transform 0.1s;
}
.ox-submit:hover { filter: brightness(1.08) drop-shadow(0 0 14px rgba(34, 230, 216, 0.5)); }
.ox-submit:active { transform: translateY(1px); }
.ox-submit:focus-visible { outline: 2px solid var(--ox-green); outline-offset: 3px; }
.ox-submit[disabled] { cursor: wait; filter: saturate(0.6) brightness(0.85); }
.ox-submit .ox-spin {
    display: none;
    width: 18px; height: 18px;
    margin-right: 10px;
    vertical-align: -3px;
    border: 2px solid rgba(3, 32, 30, 0.3);
    border-top-color: #03201e;
    border-radius: 50%;
    animation: ox-rot 0.8s linear infinite;
}
.ox-submit[disabled] .ox-spin { display: inline-block; }
@keyframes ox-rot { to { transform: rotate(360deg); } }

.ox-help {
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--ox-line);
    color: var(--ox-mute);
    font-size: 14px;
    line-height: 1.6;
}
.ox-help a { color: var(--ox-teal); text-decoration: none; }
.ox-help a:hover { text-decoration: underline; }

.ox-foot {
    position: absolute;
    left: 32px;
    right: 32px;
    bottom: 22px;
    display: flex;
    justify-content: space-between;
    color: #5f7a77;
    font-size: 13px;
    letter-spacing: 0.06em;
}
.ox-foot a { color: inherit; text-decoration: none; }
.ox-foot a:hover { color: var(--ox-teal); }

@media (prefers-reduced-motion: reduce) {
    .ox-gauge .ox-needle, .ox-dots span, .ox-submit .ox-spin { animation: none; }
}

@media (max-width: 900px) {
    .ox-shell {
        grid-template-columns: 1fr;
        gap: 36px;
        padding: 72px 16px 24px;
        align-content: start;
    }
    .ox-brand-logo { width: min(260px, 70%); margin-bottom: 26px; }
    .ox-tagline { font-size: 12px; letter-spacing: 0.24em; gap: 10px; }
    .ox-pitch, .ox-gauge-row { display: none; }
    .ox-card-wrap { justify-self: stretch; max-width: none; }
    .ox-card { padding: 32px 22px 26px; }
    .ox-foot {
        position: static;
        flex-direction: column; align-items: center; gap: 4px;
    }
}

/* ---- account.html (sign-up, verify, forgot / reset, add a device) ---- */
.ox-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.ox-choice label {
    flex: 1 1 140px; display: flex; align-items: center; gap: 10px; cursor: pointer;
    padding: 12px 14px; border: 1px solid var(--ox-line); background: rgba(5, 14, 13, 0.6);
    color: var(--ox-white); font-weight: 500; text-transform: none; letter-spacing: 0;
    font-size: 15px; margin-bottom: 0;
}
.ox-choice input { accent-color: var(--ox-teal); width: 18px; height: 18px; margin: 0; }
.ox-choice label:has(input:checked) { border-color: var(--ox-teal); box-shadow: 0 0 0 1px var(--ox-teal) inset; }
.ox-note { color: var(--ox-mute); font-size: 0.92rem; line-height: 1.55; margin: 0 0 18px; }
.ox-note strong { color: var(--ox-white); }
.ox-ok {
    border-left: 3px solid var(--ox-green); background: rgba(46, 229, 127, 0.08);
    color: var(--ox-white); padding: 14px 16px; margin-bottom: 18px; line-height: 1.55;
}
.ox-ok:empty { display: none; }
.ox-steps { margin: 0 0 20px; padding-left: 20px; color: var(--ox-white); line-height: 1.7; }
.ox-steps code { color: var(--ox-teal); font-family: inherit; font-weight: 600; }
.ox-code-input { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }
.ox-link-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 0.92rem; }
.ox-link-row a { color: var(--ox-teal); text-decoration: none; }
.ox-link-row a:hover { text-decoration: underline; }
a.ox-submit {
    display: flex; align-items: center; justify-content: center; text-align: center;
    text-decoration: none; letter-spacing: 0.08em; line-height: 1.3;
}
[hidden] { display: none !important; }
.ox-field[hidden] { display: none; }
.ox-input select {
    width: 100%; padding: 14px 40px 14px 16px; appearance: none; -webkit-appearance: none;
    background: rgba(2, 9, 8, 0.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2322e6d8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px;
    border: 1px solid var(--ox-line); border-radius: 6px; color: var(--ox-white); font: 400 16px var(--ox-font); cursor: pointer;
}
.ox-input select:focus { outline: none; border-color: var(--ox-teal); box-shadow: 0 0 0 3px rgba(34, 230, 216, 0.18); }
.ox-input select option { background: #061412; color: var(--ox-white); }
