/* DeciNova auth — login / register / forgot password */
:root {
    --dn-navy: #050a1e;
    --dn-navy-mid: #0f1d3a;
    --dn-orange: #f97316;
    --dn-primary: #4a5afe;
    --dn-primary-end: #7c3aed;
    --dn-text: #0f172a;
    --dn-muted: #64748b;
    --dn-border: #e2e8f0;
    --dn-input-bg: #f8fafc;
    --dn-radius: 12px;
    --dn-shadow: 0 8px 40px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

.dn-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.875rem;
    color: var(--dn-text);
    background: #eef1f8;
}

.dn-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.dn-auth-card {
    display: flex;
    width: 100%;
    max-width: 1080px;
    min-height: 620px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--dn-shadow);
    overflow: hidden;
}

/* —— Brand panel (left) —— */
.dn-auth-panel {
    flex: 0 0 44%;
    padding: 2rem 2.25rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.dn-auth-panel--login,
.dn-auth-panel--forgot {
    background: linear-gradient(165deg, #050a1e 0%, #0f1d3a 45%, #1e3a8a 100%);
    color: #fff;
}

.dn-auth-panel--register {
    background: linear-gradient(165deg, #f8fafc 0%, #eef2ff 55%, #f1f5f9 100%);
    color: var(--dn-text);
}

.dn-auth-panel-art {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    pointer-events: none;
    opacity: 0.9;
}

.dn-auth-panel--login .dn-auth-panel-art,
.dn-auth-panel--forgot .dn-auth-panel-art {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cpath fill='%23ffffff' fill-opacity='0.06' d='M0 200 L100 80 L180 120 L260 50 L400 100 L400 200 Z'/%3E%3Ccircle cx='300' cy='55' r='28' fill='%234a5afe' fill-opacity='0.25'/%3E%3Cpath fill='%23ffffff' fill-opacity='0.85' d='M288 52 L300 35 L312 52 L306 52 L306 72 L294 72 L294 52 Z'/%3E%3Cpath fill='%23ffffff' fill-opacity='0.75' d='M292 72 L292 92 Q300 96 308 92 L308 72 Z'/%3E%3C/svg%3E") no-repeat center bottom / cover;
}

.dn-auth-panel--register .dn-auth-panel-art {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 200'%3E%3Cpath fill='%2394a3b8' fill-opacity='0.2' d='M0 200 L80 130 L160 150 L240 90 L320 110 L400 80 L400 200 Z'/%3E%3Ccircle cx='120' cy='100' r='3' fill='%234a5afe'/%3E%3Ccircle cx='180' cy='80' r='3' fill='%234a5afe'/%3E%3Ccircle cx='240' cy='95' r='3' fill='%234a5afe'/%3E%3Ccircle cx='300' cy='70' r='3' fill='%23f97316'/%3E%3C/svg%3E") no-repeat center bottom / cover;
}

.dn-auth-brand {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.dn-auth-logo-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dn-auth-logo-boxes {
    display: flex;
    gap: 3px;
}

.dn-auth-logo-boxes span {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.dn-auth-logo-boxes .t { background: var(--dn-primary); }
.dn-auth-logo-boxes .d { background: var(--dn-orange); }
.dn-auth-logo-boxes .a { background: #1e40af; }

.dn-auth-logo-img {
    height: 36px;
    width: auto;
}

.dn-auth-brand-name {
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.dn-auth-panel--login .dn-auth-brand-name,
.dn-auth-panel--forgot .dn-auth-brand-name {
    color: #fff;
}

.dn-auth-brand-name .dn-accent {
    color: var(--dn-orange);
}

.dn-auth-tagline {
    font-size: 0.65rem;
    opacity: 0.75;
    margin-top: 0.15rem;
}

.dn-auth-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--dn-orange);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.65rem;
    position: relative;
    z-index: 1;
}

.dn-auth-panel--register .dn-auth-eyebrow {
    color: var(--dn-orange);
}

.dn-auth-headline {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.85rem;
    position: relative;
    z-index: 1;
    letter-spacing: -0.02em;
}

.dn-auth-panel--login .dn-auth-headline,
.dn-auth-panel--forgot .dn-auth-headline {
    color: #fff;
}

.dn-auth-headline .dn-accent {
    color: var(--dn-orange);
}

.dn-auth-lead {
    font-size: 0.8rem;
    line-height: 1.55;
    opacity: 0.85;
    margin-bottom: 1.75rem;
    position: relative;
    z-index: 1;
    max-width: 320px;
}

.dn-auth-panel--register .dn-auth-lead {
    color: var(--dn-muted);
    opacity: 1;
}

.dn-auth-features {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.85rem;
}

.dn-auth-panel--login .dn-auth-features,
.dn-auth-panel--forgot .dn-auth-features {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.dn-auth-feature {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.dn-auth-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.dn-auth-panel--login .dn-auth-feature-icon,
.dn-auth-panel--forgot .dn-auth-feature-icon {
    background: rgba(255, 255, 255, 0.12);
    color: #93c5fd;
}

.dn-auth-panel--register .dn-auth-feature-icon {
    background: #fff;
    border: 1px solid var(--dn-border);
    color: var(--dn-primary);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.dn-auth-feature strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.dn-auth-feature span {
    font-size: 0.68rem;
    opacity: 0.8;
    line-height: 1.4;
}

.dn-auth-panel--register .dn-auth-feature span {
    color: var(--dn-muted);
    opacity: 1;
}

/* —— Form side (right) —— */
.dn-auth-form-wrap {
    flex: 1;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    background: #fff;
}

.dn-auth-form-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.dn-auth-form-decor::before,
.dn-auth-form-decor::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 1px solid #e8ecf4;
}

.dn-auth-form-decor::before {
    width: 120px;
    height: 120px;
    top: -30px;
    right: 40px;
    opacity: 0.6;
}

.dn-auth-form-decor::after {
    width: 60px;
    height: 60px;
    bottom: 80px;
    left: 20px;
    background: radial-gradient(circle, #eef0ff 0%, transparent 70%);
}

.dn-auth-form-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.dn-auth-lang {
    border: 1px solid var(--dn-border);
    border-radius: 8px;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    color: var(--dn-muted);
    background: #fff;
}

.dn-auth-form-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.dn-auth-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.dn-auth-form-sub {
    color: var(--dn-muted);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.dn-auth-alert {
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.dn-auth-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.dn-auth-alert--success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.dn-auth-field {
    margin-bottom: 1rem;
}

.dn-auth-field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--dn-text);
}

.dn-auth-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.dn-auth-field-row label {
    margin-bottom: 0;
}

.dn-auth-input-wrap {
    position: relative;
}

.dn-auth-input-wrap > i.bi:first-child {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dn-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.dn-auth-input {
    width: 100%;
    border: 1px solid var(--dn-border);
    border-radius: 10px;
    padding: 0.65rem 2.5rem 0.65rem 2.5rem;
    font-size: 0.8125rem;
    background: var(--dn-input-bg);
    color: var(--dn-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dn-auth-input:focus {
    outline: none;
    border-color: var(--dn-primary);
    box-shadow: 0 0 0 3px rgba(74, 90, 254, 0.12);
    background: #fff;
}

.dn-auth-input.is-invalid {
    border-color: #ef4444;
}

select.dn-auth-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.25rem;
    cursor: pointer;
}

.dn-auth-input-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--dn-muted);
    padding: 0.2rem;
    cursor: pointer;
    line-height: 1;
}

.dn-auth-input-toggle:hover {
    color: var(--dn-primary);
}

.dn-auth-invalid {
    font-size: 0.72rem;
    color: #dc2626;
    margin-top: 0.35rem;
}

.dn-auth-hint {
    font-size: 0.7rem;
    color: var(--dn-muted);
    margin-top: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dn-auth-hint.valid {
    color: #16a34a;
}

.dn-auth-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.78rem;
}

.dn-auth-check input {
    margin-top: 0.2rem;
    accent-color: var(--dn-primary);
}

.dn-auth-check a {
    color: var(--dn-primary);
    font-weight: 600;
    text-decoration: none;
}

.dn-auth-check a:hover {
    text-decoration: underline;
}

.dn-auth-link {
    color: var(--dn-primary);
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: none;
}

.dn-auth-link:hover {
    text-decoration: underline;
}

.dn-auth-btn {
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(90deg, var(--dn-primary) 0%, var(--dn-primary-end) 100%);
    box-shadow: 0 4px 14px rgba(74, 90, 254, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.dn-auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(74, 90, 254, 0.4);
}

.dn-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--dn-muted);
    font-size: 0.72rem;
}

.dn-auth-divider::before,
.dn-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dn-border);
}

.dn-auth-social {
    display: flex;
    gap: 0.65rem;
}

.dn-auth-social button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem;
    border: 1px solid var(--dn-border);
    border-radius: 10px;
    background: #fff;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--dn-text);
    cursor: not-allowed;
    opacity: 0.85;
}

.dn-auth-social button svg {
    width: 18px;
    height: 18px;
}

.dn-auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--dn-muted);
}

.dn-auth-footer a {
    color: var(--dn-primary);
    font-weight: 600;
    text-decoration: none;
}

.dn-auth-footer a:hover {
    text-decoration: underline;
}

.dn-auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.dn-auth-grid-2 .dn-auth-field--full {
    grid-column: 1 / -1;
}

.dn-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--dn-muted);
    text-decoration: none;
    margin-bottom: 1rem;
}

.dn-auth-back:hover {
    color: var(--dn-primary);
}

@media (max-width: 900px) {
    .dn-auth-card {
        flex-direction: column;
        max-width: 480px;
    }

    .dn-auth-panel {
        flex: none;
        min-height: 280px;
        padding: 1.5rem;
    }

    .dn-auth-panel--login .dn-auth-features {
        grid-template-columns: 1fr;
    }

    .dn-auth-form-wrap {
        padding: 1.5rem;
    }

    .dn-auth-grid-2 {
        grid-template-columns: 1fr;
    }
}
