:root {
    --auth-primary: #6366f1;
    --auth-accent: #22d3ee;
    --auth-deep: #0f172a;
    --auth-muted: #6b7280;
    --auth-surface: rgba(255, 255, 255, 0.88);
}

.auth-modern {
    position: relative;
    min-height: 100vh;
    background: radial-gradient(circle at 15% 20%, #e8edff 0%, #f7f8ff 38%, #eef3ff 70%, #e9f1ff 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    animation: fadeUp 0.7s ease;
}

.auth-modern::before,
.auth-modern::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(62px);
    opacity: 0.55;
    z-index: 0;
}

.auth-modern::before {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3), transparent 60%);
    top: -80px;
    right: -120px;
}

.auth-modern::after {
    background: radial-gradient(circle, rgba(34, 211, 238, 0.28), transparent 60%);
    bottom: -120px;
    left: -140px;
}

.auth-modern .pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.08) 0, rgba(99, 102, 241, 0) 26%),
        radial-gradient(circle at 70% 30%, rgba(34, 211, 238, 0.08) 0, rgba(34, 211, 238, 0) 24%),
        radial-gradient(circle at 60% 80%, rgba(15, 23, 42, 0.05) 0, rgba(15, 23, 42, 0) 22%);
    opacity: 0.65;
    z-index: 0;
}

.auth-modern .grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.85), transparent 70%);
    z-index: 0;
}

.auth-modern .brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 14px;
    color: #1f2937;
    font-weight: 600;
}

.auth-modern .brand-avatar {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #eef2ff, #e0f7ff);
    border: 1px solid #e4e7ec;
    box-shadow: 0 10px 30px rgba(79, 139, 255, 0.18);
}

.auth-modern .glass-card {
    position: relative;
    background: var(--auth-surface);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 18px 65px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(14px);
    border-radius: 26px;
    z-index: 1;
}

.auth-modern .hero-panel {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.92), rgba(34, 211, 238, 0.9));
    color: #f8fafc;
    border-radius: 26px;
    box-shadow: 0 18px 60px rgba(79, 139, 255, 0.35);
    position: relative;
    overflow: hidden;
}

.auth-modern .hero-panel::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    opacity: 0.9;
}

.auth-modern .hero-panel .blur-ball {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.22), transparent 65%);
    top: -80px;
    right: -60px;
    filter: blur(4px);
}

.auth-modern .hero-panel .small-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #f8fafc;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-modern .stat-pill {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    padding: 12px 14px;
    min-width: 160px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.auth-modern .stat-pill h5 {
    margin: 0;
    font-size: 20px;
}

.auth-modern .stat-pill p {
    margin: 4px 0 0;
    font-size: 13px;
    color: #e2e8f0;
}

.auth-modern .modern-input .input-group-text {
    background: linear-gradient(120deg, #eef2ff, #e8f8ff);
    border: 1px solid #e5e7eb;
    border-right: 0;
    color: #475569;
    border-radius: 16px 0 0 16px;
}

.auth-modern .modern-input .form-control {
    border: 1px solid #e5e7eb;
    border-radius: 0 16px 16px 0;
    padding: 12px 14px;
    font-weight: 600;
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.auth-modern .modern-input .form-control:focus {
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
    border-color: #cdd4ff;
}

.auth-modern .modern-input .btn.icon-btn {
    border-radius: 0 16px 16px 0;
    border: 1px solid #e5e7eb;
    border-left: 0;
    background: #f8fafc;
    color: #475569;
}

.auth-modern .btn-lift {
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 700;
    box-shadow: 0 14px 40px rgba(99, 102, 241, 0.25);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.auth-modern .btn-lift:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 50px rgba(99, 102, 241, 0.3);
}

.auth-modern .floating-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    color: #475569;
    font-weight: 600;
}

.auth-modern .floating-meta .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #22d3ee);
    box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12);
}

.auth-modern .contact-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.25s ease, color 0.2s ease;
}

.auth-modern .contact-links a:hover {
    transform: translateY(-1px);
    color: var(--auth-primary);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.auth-modern [data-ripple] {
    position: relative;
    overflow: hidden;
}

.auth-modern .form-check-input {
    border-radius: 6px;
    border: 1px solid #cdd4ff;
}

.auth-modern .form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-modern .link-muted {
    color: var(--auth-muted);
    font-weight: 600;
}

.auth-modern .link-muted:hover {
    color: var(--auth-primary);
}

.auth-modern .animate-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.auth-modern.loaded .animate-in {
    opacity: 1;
    transform: translateY(0);
}

.auth-modern .hero-panel.animate-in {
    transform: translateY(20px) scale(0.99);
}

.auth-modern.loaded .hero-panel.animate-in {
    transform: translateY(0) scale(1);
}

.auth-modern .ripple-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.38) 0%, rgba(99, 102, 241, 0) 60%);
    transform: scale(0);
    animation: ripple 0.75s ease-out forwards;
    pointer-events: none;
}

@media (max-width: 991.98px) {
    .auth-modern {
        padding: 28px 0 20px;
        align-items: flex-start;
    }
}

@media (max-width: 575.98px) {
    .auth-modern .glass-card,
    .auth-modern .hero-panel {
        border-radius: 18px;
        padding: 22px;
    }
    .auth-modern .modern-input .form-control {
        font-size: 15px;
    }
}

@keyframes ripple {
    to {
        transform: scale(6);
        opacity: 0;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Soft glass monochrome auth refresh */
:root {
    --auth-primary: #111827;
    --auth-accent: #27272a;
    --auth-deep: #09090b;
    --auth-muted: #71717a;
    --auth-surface: rgba(255, 255, 255, 0.82);
    --auth-surface-strong: rgba(255, 255, 255, 0.92);
    --auth-border: rgba(17, 24, 39, 0.08);
    --auth-border-strong: rgba(17, 24, 39, 0.12);
    --auth-shadow: 0 26px 80px rgba(15, 23, 42, 0.14);
}

html[data-layout-mode="dark"] {
    --auth-primary: #f5f5f5;
    --auth-accent: #d4d4d8;
    --auth-deep: #f5f5f5;
    --auth-muted: #a1a1aa;
    --auth-surface: rgba(20, 20, 23, 0.82);
    --auth-surface-strong: rgba(24, 24, 27, 0.94);
    --auth-border: rgba(255, 255, 255, 0.08);
    --auth-border-strong: rgba(255, 255, 255, 0.14);
    --auth-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.auth-modern {
    background: radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.78), transparent 22%), linear-gradient(180deg, #f8f8f8 0%, #f1f1f1 50%, #f7f7f7 100%);
}

html[data-layout-mode="dark"] .auth-modern,
body[data-layout-mode="dark"] .auth-modern {
    background: radial-gradient(circle at 12% 16%, rgba(255, 255, 255, 0.05), transparent 18%), linear-gradient(180deg, #09090b 0%, #111114 55%, #0b0b0d 100%);
}

.auth-modern::before {
    background: radial-gradient(circle, rgba(17, 24, 39, 0.12), transparent 62%);
}

.auth-modern::after {
    background: radial-gradient(circle, rgba(113, 113, 122, 0.14), transparent 62%);
}

html[data-layout-mode="dark"] .auth-modern::before,
body[data-layout-mode="dark"] .auth-modern::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 62%);
}

html[data-layout-mode="dark"] .auth-modern::after,
body[data-layout-mode="dark"] .auth-modern::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05), transparent 62%);
}

.auth-modern .pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(17, 24, 39, 0.05) 0, rgba(17, 24, 39, 0) 24%),
        radial-gradient(circle at 70% 30%, rgba(113, 113, 122, 0.05) 0, rgba(113, 113, 122, 0) 22%),
        radial-gradient(circle at 60% 80%, rgba(15, 23, 42, 0.03) 0, rgba(15, 23, 42, 0) 20%);
}

html[data-layout-mode="dark"] .auth-modern .pattern,
body[data-layout-mode="dark"] .auth-modern .pattern {
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0) 22%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0) 20%),
        radial-gradient(circle at 60% 80%, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0) 18%);
}

.auth-modern .grid-overlay {
    background-image: linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
}

html[data-layout-mode="dark"] .auth-modern .grid-overlay,
body[data-layout-mode="dark"] .auth-modern .grid-overlay {
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.auth-modern .glass-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    box-shadow: var(--auth-shadow);
}

.auth-modern .brand-avatar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(244, 244, 245, 0.84));
    border: 1px solid var(--auth-border);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

html[data-layout-mode="dark"] .auth-modern .brand-avatar,
body[data-layout-mode="dark"] .auth-modern .brand-avatar {
    background: linear-gradient(135deg, rgba(36, 36, 40, 0.94), rgba(22, 22, 26, 0.86));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.auth-modern .hero-panel {
    background: linear-gradient(135deg, rgba(24, 24, 27, 0.94), rgba(63, 63, 70, 0.88));
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.16);
}

.auth-modern .hero-panel .small-chip,
.auth-modern .stat-pill {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.12);
}

.auth-modern .modern-input .input-group-text,
.auth-modern .modern-input .form-control,
.auth-modern .modern-input .btn.icon-btn {
    background: var(--auth-surface-strong);
    border-color: var(--auth-border);
    color: var(--auth-deep);
}

.auth-modern .modern-input .form-control:focus {
    border-color: var(--auth-border-strong);
    box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.08);
}

html[data-layout-mode="dark"] .auth-modern .modern-input .form-control:focus,
body[data-layout-mode="dark"] .auth-modern .modern-input .form-control:focus {
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.auth-modern .btn-lift {
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.16);
}

.auth-modern .btn-lift:hover {
    box-shadow: 0 20px 48px rgba(17, 24, 39, 0.2);
}

.auth-modern .floating-meta,
.auth-modern .link-muted,
.auth-modern p.text-muted,
.auth-modern .text-muted {
    color: var(--auth-muted) !important;
}

.auth-modern .floating-meta .dot {
    background: linear-gradient(135deg, #111827, #3f3f46);
    box-shadow: 0 0 0 6px rgba(17, 24, 39, 0.08);
}

html[data-layout-mode="dark"] .auth-modern .floating-meta .dot,
body[data-layout-mode="dark"] .auth-modern .floating-meta .dot {
    background: linear-gradient(135deg, #fafafa, #d4d4d8);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.auth-modern .contact-links a {
    background: var(--auth-surface-strong);
    color: var(--auth-deep);
    border-color: var(--auth-border);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.auth-modern .contact-links a:hover {
    color: var(--auth-primary);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

html[data-layout-mode="dark"] .auth-modern .contact-links a:hover,
body[data-layout-mode="dark"] .auth-modern .contact-links a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.auth-modern .form-check-input {
    border-color: var(--auth-border-strong);
}

.auth-modern .form-check-input:checked {
    background-color: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-modern .ripple-circle {
    background: radial-gradient(circle, rgba(17, 24, 39, 0.24) 0%, rgba(17, 24, 39, 0) 60%);
}

html[data-layout-mode="dark"] .auth-modern .ripple-circle,
body[data-layout-mode="dark"] .auth-modern .ripple-circle {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.26) 0%, rgba(255, 255, 255, 0) 60%);
}

.auth-theme-toggle {
    position: absolute;
    top: 26px;
    right: 26px;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--auth-border);
    background: var(--auth-surface-strong);
    color: var(--auth-deep);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
    z-index: 2;
}

.auth-theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.auth-theme-toggle .theme-icon-dark,
.auth-theme-toggle .theme-icon-light {
    font-size: 20px;
}

html[data-layout-mode="dark"] .auth-modern,
html[data-layout-mode="dark"] .auth-modern .glass-card,
html[data-layout-mode="dark"] .auth-modern .modern-input .input-group-text,
html[data-layout-mode="dark"] .auth-modern .modern-input .form-control,
html[data-layout-mode="dark"] .auth-modern .modern-input .btn.icon-btn,
html[data-layout-mode="dark"] .auth-modern .contact-links a,
html[data-layout-mode="dark"] .auth-theme-toggle,
body[data-layout-mode="dark"] .auth-modern,
body[data-layout-mode="dark"] .auth-modern .glass-card,
body[data-layout-mode="dark"] .auth-modern .modern-input .input-group-text,
body[data-layout-mode="dark"] .auth-modern .modern-input .form-control,
body[data-layout-mode="dark"] .auth-modern .modern-input .btn.icon-btn,
body[data-layout-mode="dark"] .auth-modern .contact-links a,
body[data-layout-mode="dark"] .auth-theme-toggle {
    color: #f5f5f5;
}

@media (max-width: 575.98px) {
    .auth-theme-toggle {
        top: 18px;
        right: 18px;
    }
}
