:root {
    --auth-bg-1: #f7fbf8;
    --auth-bg-2: #deeee7;
    --auth-brand-1: #0a5a43;
    --auth-brand-2: #117052;
    --auth-ink: #16322b;
    --auth-muted: #5c726b;
    --auth-error-bg: #fdecef;
    --auth-error-ink: #b22e45;
    --auth-error-border: #efbcc6;
    --auth-ok-bg: #e8f7ef;
    --auth-ok-ink: #198754;
    --auth-ok-border: #b8dfca;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Cairo", Arial, sans-serif;
    color: var(--auth-ink);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 12% 12%, #f1faf5 0%, transparent 28%),
        radial-gradient(circle at 90% 85%, #d2ece0 0%, transparent 30%),
        linear-gradient(150deg, var(--auth-bg-1) 0%, var(--auth-bg-2) 100%);
    padding: 24px 12px;
}

.auth-shell {
    width: min(860px, 96%);
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    background: #ffffff;
    border: 1px solid #dfece6;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(17, 45, 37, 0.14);
}

.auth-aside {
    position: relative;
    padding: 30px 28px;
    background: linear-gradient(180deg, #0a5a43 0%, #0f6a4e 100%);
    color: #effaf5;
}

.auth-aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.16) 0%, transparent 30%),
        radial-gradient(circle at 84% 82%, rgba(255, 255, 255, 0.12) 0%, transparent 33%);
    pointer-events: none;
}

.auth-aside > * {
    position: relative;
    z-index: 1;
}

.brand-logo-wrap {
    width: 192px;
    height: 192px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.24);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    overflow: hidden;
}

.brand-logo-wrap.no-logo::before {
    content: "LOGO";
    font-weight: 800;
    letter-spacing: 1px;
    color: #d7f2e4;
    font-size: 13px;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.brand-tag {
    display: inline-block;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    font-size: 12px;
    font-weight: 800;
}

.auth-aside h2 {
    margin: 14px 0 10px;
    font-size: 28px;
    line-height: 1.35;
}

.auth-aside p {
    margin: 0;
    color: #d9f2e7;
    line-height: 1.9;
    font-size: 14px;
}

.auth-card {
    padding: 26px 24px;
}

.auth-card h1 {
    margin: 2px 0 10px;
    font-size: 30px;
    line-height: 1.3;
}

.auth-card p.sub {
    margin: 0 0 16px;
    color: var(--auth-muted);
    line-height: 1.9;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #d6e5de;
    margin-bottom: 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--auth-ink);
    background: #fbfdfc;
}

select {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid #d6e5de;
    margin-bottom: 10px;
    font-family: inherit;
    font-size: 14px;
    color: var(--auth-ink);
    background: #fbfdfc;
}

input:focus {
    outline: none;
    border-color: #76b99d;
    box-shadow: 0 0 0 3px rgba(27, 123, 89, 0.14);
}

select:focus {
    outline: none;
    border-color: #76b99d;
    box-shadow: 0 0 0 3px rgba(27, 123, 89, 0.14);
}

.field-label {
    display: block;
    margin: 2px 0 7px;
    color: #36574c;
    font-size: 13px;
    font-weight: 700;
}

input[name="otp_code"] {
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
}

button {
    width: 100%;
    border: none;
    border-radius: 12px;
    padding: 13px;
    background: linear-gradient(130deg, var(--auth-brand-1) 0%, var(--auth-brand-2) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(16, 90, 66, 0.2);
}

.flash {
    padding: 11px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-align: center;
    font-weight: 700;
    line-height: 1.8;
    font-size: 13px;
}

.flash.error {
    background: var(--auth-error-bg);
    color: var(--auth-error-ink);
    border: 1px solid var(--auth-error-border);
}

.flash.success {
    background: var(--auth-ok-bg);
    color: var(--auth-ok-ink);
    border: 1px solid var(--auth-ok-border);
}

.helper,
.auth-link {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--auth-muted);
    text-align: center;
}

.auth-link a,
a.nav-link {
    color: var(--auth-brand-1);
    text-decoration: none;
    font-weight: 800;
}

.auth-link a:hover,
a.nav-link:hover {
    text-decoration: underline;
}

@media (max-width: 860px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-aside {
        padding: 22px 20px;
    }

    .brand-logo-wrap {
        width: 132px;
        height: 132px;
    }

    .auth-aside h2 {
        font-size: 24px;
    }

    .auth-card {
        padding: 22px 18px;
    }

    .auth-card h1 {
        font-size: 26px;
    }
}
