/* =====================================================================
   TANTRIKX Admin — sign-in pages (login.aspx, setup_owner.aspx) · v2
   Self-contained: works on its own, without admin.css.
   ===================================================================== */

:root {
    --tx-ink: #1B2E25;
    --tx-leaf: #2F5D46;
    --tx-gold: #9A5B12;
    --tx-gold-dark: #7E4A0E;
    --tx-gold-light: #E9C58A;
    --tx-bg: #F3F5F1;
    --tx-border: #E2E7E0;
    --tx-border-strong: #C7D1C4;
    --tx-muted: #57645D;
    --tx-faint: #7B877F;
    --tx-sb-text: #D5E0D8;
    --tx-sb-muted: #8EA496;
    --tx-ok-bg: #E4F2E8;
    --tx-ok: #1E5B35;
    --tx-info-bg: #E5EFF8;
    --tx-info: #1F4E79;
    --tx-bad-bg: #F8E6E6;
    --tx-bad: #8A2A2A;
    --tx-font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --tx-font-display: 'Marcellus', Georgia, 'Times New Roman', serif;
    --tx-ring: 0 0 0 3px rgba(154, 91, 18, .18);
    --tx-ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--tx-bg);
    color: var(--tx-ink);
    font-family: var(--tx-font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2 {
    font-family: var(--tx-font-display);
    font-weight: 400;
    margin: 0;
    line-height: 1.12;
    letter-spacing: .2px;
}

p {
    margin: 0;
}

a {
    color: var(--tx-leaf);
    text-underline-offset: 2px;
}

    a:hover {
        color: var(--tx-gold);
    }

:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--tx-gold);
    outline-offset: 2px;
    border-radius: 4px;
}

i[class^="ri-"] {
    line-height: 1;
}

/* ---------- page grid ---------- */
.auth {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(420px, 46%) minmax(0, 1fr);
    margin: 0;
}

/* ---------- left: brand panel ---------- */
.auth-brand {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: radial-gradient(90% 70% at 10% 0%, rgba(58, 111, 85, .55), transparent 60%), radial-gradient(70% 60% at 100% 100%, rgba(154, 91, 18, .22), transparent 60%), var(--tx-ink);
    color: var(--tx-sb-text);
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
}

    /* concentric rings, like ripples on oil */
    .auth-brand::before,
    .auth-brand::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
        z-index: -1;
    }

    .auth-brand::before {
        right: -180px;
        bottom: -180px;
        width: 520px;
        height: 520px;
        border: 1px solid rgba(233, 197, 138, .20);
        box-shadow: 0 0 0 70px rgba(233, 197, 138, .035), 0 0 0 140px rgba(233, 197, 138, .025), inset 0 0 0 70px rgba(233, 197, 138, .03);
    }

    .auth-brand::after {
        left: -120px;
        top: 38%;
        width: 240px;
        height: 240px;
        border: 1px solid rgba(255, 255, 255, .06);
    }

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
}

.auth-logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    flex: none;
    background: linear-gradient(145deg, #3A6F55, var(--tx-leaf));
    color: var(--tx-gold-light);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 10px 24px -10px rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .auth-logo-mark i {
        font-size: 24px;
    }

.auth-logo-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1;
}

.auth-logo-name {
    font-family: var(--tx-font-display);
    font-size: 26px;
    letter-spacing: 3.5px;
    color: #fff;
}

.auth-logo-sub {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--tx-gold-light);
    opacity: .9;
}

.auth-pitch {
    max-width: 470px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--tx-gold-light);
    margin-bottom: 18px;
}

    .auth-eyebrow::before {
        content: "";
        width: 24px;
        height: 1px;
        background: currentColor;
        opacity: .7;
    }

.auth-pitch h2 {
    font-size: 44px;
    color: #fff;
    margin-bottom: 16px;
}

.auth-pitch p {
    font-size: 16px;
    color: var(--tx-sb-text);
    max-width: 420px;
}

.auth-features {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .auth-features li {
        display: flex;
        align-items: center;
        gap: 14px;
        font-size: 15px;
        font-weight: 600;
        color: #fff;
    }

    .auth-features i {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        flex: none;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, .07);
        border: 1px solid rgba(255, 255, 255, .08);
        color: var(--tx-gold-light);
        font-size: 18px;
    }

.auth-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--tx-sb-muted);
}

    .auth-foot i {
        color: var(--tx-gold-light);
    }

/* ---------- right: form side ---------- */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    background: radial-gradient(60% 50% at 100% 0%, rgba(233, 197, 138, .14), transparent 70%), var(--tx-bg);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--tx-border);
    border-radius: 24px;
    box-shadow: 0 1px 2px rgba(27, 46, 37, .04), 0 30px 60px -30px rgba(27, 46, 37, .28);
    animation: auth-in .45s var(--tx-ease) both;
}

@keyframes auth-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.auth-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

    .auth-head .auth-mobile-logo {
        display: none;
    }

    .auth-head h1 {
        font-size: 34px;
        color: var(--tx-ink);
    }

    .auth-head .lead {
        color: var(--tx-muted);
        font-size: 15px;
    }

/* ---------- fields ---------- */
.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--tx-ink);
}

.field .hint {
    font-size: 12.5px;
    color: var(--tx-muted);
}

.control {
    position: relative;
}

    .control > i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
        color: var(--tx-faint);
        pointer-events: none;
        transition: color .15s;
    }

    .control:focus-within > i {
        color: var(--tx-gold);
    }

.input {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--tx-border-strong);
    border-radius: 14px;
    background: #fff;
    color: var(--tx-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    box-shadow: inset 0 1px 1px rgba(27, 46, 37, .03);
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}

    .input::placeholder {
        color: var(--tx-faint);
    }

    .input:hover {
        border-color: #AEBBAA;
    }

    .input:focus {
        outline: none;
        border-color: var(--tx-gold);
        box-shadow: var(--tx-ring);
    }

    .input:-webkit-autofill {
        -webkit-box-shadow: 0 0 0 40px #fff inset;
        -webkit-text-fill-color: var(--tx-ink);
    }

    .input.has-toggle {
        padding-right: 52px;
    }

.pw-toggle {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--tx-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .pw-toggle i {
        font-size: 19px;
    }

    .pw-toggle:hover {
        color: var(--tx-ink);
        background: var(--tx-bg);
    }

/* caps lock warning (shown by script) */
.caps-note {
    display: none;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--tx-gold-dark);
    align-items: center;
    gap: 6px;
}

    .caps-note.is-on {
        display: flex;
    }

/* password rules on setup page — script adds .is-met */
.pw-rules {
    list-style: none;
    margin: 2px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    font-size: 12.5px;
    color: var(--tx-muted);
}

    .pw-rules li {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

        .pw-rules li::before {
            content: "";
            width: 14px;
            height: 14px;
            border-radius: 50%;
            border: 1.5px solid var(--tx-border-strong);
            background: #fff;
            flex: none;
            transition: background .15s, border-color .15s;
        }

        .pw-rules li.is-met {
            color: var(--tx-ok);
            font-weight: 700;
        }

            .pw-rules li.is-met::before {
                border-color: var(--tx-ok);
                background: var(--tx-ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat;
            }

/* ---------- button ---------- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: var(--tx-gold);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(126, 74, 14, .25), 0 10px 24px -12px rgba(154, 91, 18, .7);
    transition: background .15s var(--tx-ease), transform .08s var(--tx-ease), box-shadow .15s;
}

    .btn:hover {
        background: var(--tx-gold-dark);
        color: #fff;
    }

    .btn:active {
        transform: translateY(1px);
    }

    .btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--tx-gold);
    }

    .btn .btn-arrow {
        transition: transform .15s var(--tx-ease);
    }

    .btn:hover .btn-arrow {
        transform: translateX(3px);
    }

    .btn.is-loading {
        color: transparent;
        pointer-events: none;
    }

        .btn.is-loading::after {
            content: "";
            position: absolute;
            inset: 0;
            margin: auto;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, .45);
            border-top-color: #fff;
            animation: auth-spin .7s linear infinite;
        }

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- messages ---------- */
.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    border: 1px solid transparent;
    animation: auth-in .3s var(--tx-ease) both;
}

    .alert::before {
        font-family: 'remixicon';
        font-size: 18px;
        line-height: 1.2;
        font-weight: 400;
    }

.alert-error {
    background: var(--tx-bad-bg);
    color: var(--tx-bad);
    border-color: #EFD0D0;
}

    .alert-error::before {
        content: "\eca1";
    }

.alert-ok {
    background: var(--tx-ok-bg);
    color: var(--tx-ok);
    border-color: #CDE6D5;
}

    .alert-ok::before {
        content: "\eb81";
    }

.alert-info {
    background: var(--tx-info-bg);
    color: var(--tx-info);
    border-color: #CFE0F0;
}

    .alert-info::before {
        content: "\ee59";
    }

/* ---------- small print ---------- */
.auth-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--tx-muted);
}

    .auth-meta a {
        font-weight: 700;
    }

.auth-secure {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid var(--tx-border);
    font-size: 12.5px;
    color: var(--tx-faint);
}

    .auth-secure i {
        color: var(--tx-leaf);
        font-size: 16px;
    }

.auth-setup {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #FBF4E8;
    border: 1px solid #F0DCBC;
    color: var(--tx-gold-dark);
    font-size: 13.5px;
    font-weight: 600;
}

    .auth-setup i {
        font-size: 20px;
    }

a.auth-setup {
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

    a.auth-setup:hover {
        background: #F7EBD6;
        border-color: #E6C99B;
        color: var(--tx-gold-dark);
    }

.auth-setup strong {
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
    .auth {
        grid-template-columns: minmax(360px, 42%) minmax(0, 1fr);
    }

    .auth-brand {
        padding: 40px;
    }

    .auth-pitch h2 {
        font-size: 36px;
    }
}

@media (max-width: 860px) {
    .auth {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        display: none;
    }

    .auth-main {
        align-items: flex-start;
        padding: 28px 16px 40px;
        background: radial-gradient(120% 40% at 50% 0%, rgba(47, 93, 70, .14), transparent 70%), var(--tx-bg);
    }

    .auth-card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .auth-head .auth-mobile-logo {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 14px;
        font-family: var(--tx-font-display);
        font-size: 20px;
        letter-spacing: 3px;
        color: var(--tx-ink);
    }

        .auth-head .auth-mobile-logo .auth-logo-mark {
            width: 40px;
            height: 40px;
            border-radius: 12px;
        }

            .auth-head .auth-mobile-logo .auth-logo-mark i {
                font-size: 20px;
            }

    .auth-head h1 {
        font-size: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
