/* ═══════════════════════════════════════════════════════════════════════════
   3DMdl v2 Auth — Login, Register, Forgot Password
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hide layout chrome on auth pages ──────────────────────────────────── */

.dm-auth-page .dm-navbar,
.dm-auth-page .dm-footer { display: none !important; }

/* ── Shell: split layout ───────────────────────────────────────────────── */

.dm-auth-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}
.dm-auth-shell-centered {
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
}
.dm-auth-shell-centered::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(var(--dm-accent-rgb), 0.08), transparent 55%);
    pointer-events: none;
}

/* ── Form Side ─────────────────────────────────────────────────────────── */

.dm-auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}
.dm-auth-form-wrap {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

/* ── Header ────────────────────────────────────────────────────────────── */

.dm-auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.dm-auth-logo {
    display: inline-flex;
    margin-bottom: 1.25rem;
    text-decoration: none;
}
.dm-auth-logo-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--dm-radius-lg);
    background: var(--dm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}
.dm-auth-title {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
    color: var(--dm-text-primary);
}
.dm-auth-subtitle {
    font-size: 0.9rem;
    color: var(--dm-text-secondary);
    margin: 0;
}

/* ── Input icons ───────────────────────────────────────────────────────── */

.dm-input-icon-wrap {
    position: relative;
}
.dm-input-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dm-text-muted);
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}
.dm-input-has-icon {
    padding-left: 2.5rem;
}
.dm-input-has-toggle {
    padding-right: 2.75rem;
}

/* ── Password toggle ───────────────────────────────────────────────────── */

.dm-password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.35rem;
    color: var(--dm-text-muted);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--dm-radius);
    transition: color var(--dm-transition);
    z-index: 2;
    line-height: 1;
    font-size: 1rem;
}
.dm-password-toggle:hover {
    color: var(--dm-text-primary);
}

/* ── Password strength ─────────────────────────────────────────────────── */

.dm-password-strength {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.dm-strength-bar {
    height: 4px;
    background: var(--dm-card-border);
    border-radius: 2px;
    overflow: hidden;
}
.dm-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
}
.dm-strength-fill.weak   { width: 25%;  background: #ef4444; }
.dm-strength-fill.fair   { width: 50%;  background: #f59e0b; }
.dm-strength-fill.good   { width: 75%;  background: #3b82f6; }
.dm-strength-fill.strong { width: 100%; background: #22c55e; }
.dm-strength-text {
    font-size: 0.72rem;
    color: var(--dm-text-muted);
}

/* ── Form link (forgot password) ───────────────────────────────────────── */

.dm-form-link {
    font-size: 0.82rem;
    color: var(--dm-accent);
    text-decoration: none;
}
.dm-form-link:hover {
    text-decoration: underline;
}

/* ── Submit button ─────────────────────────────────────────────────────── */

.dm-auth-submit {
    font-weight: 700;
    border-radius: 0.65rem;
    padding: 0.75rem;
    font-size: 1rem;
}

/* ── Divider ───────────────────────────────────────────────────────────── */

.dm-auth-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin: 1.5rem 0;
    color: var(--dm-text-muted);
    font-size: 0.82rem;
}
.dm-auth-divider::before,
.dm-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--dm-card-border);
}

/* ── Social buttons ────────────────────────────────────────────────────── */

.dm-auth-social {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

/* ── Footer text ───────────────────────────────────────────────────────── */

.dm-auth-footer-text {
    text-align: center;
    font-size: 0.875rem;
    color: var(--dm-text-secondary);
    margin: 0;
}
.dm-auth-footer-text a {
    color: var(--dm-accent);
    font-weight: 600;
    text-decoration: none;
}
.dm-auth-footer-text a:hover {
    text-decoration: underline;
}

/* ── Back link (forgot password) ───────────────────────────────────────── */

.dm-auth-back-link {
    text-align: center;
    margin-top: 2rem;
}
.dm-auth-back-link a {
    font-size: 0.85rem;
    color: var(--dm-text-secondary);
    text-decoration: none;
    transition: color var(--dm-transition);
}
.dm-auth-back-link a:hover {
    color: var(--dm-accent);
}

/* ── Success icon (forgot password sent) ───────────────────────────────── */

.dm-auth-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #10b981;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Visual Side — decorative panel
   ═══════════════════════════════════════════════════════════════════════════ */

.dm-auth-visual-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    background: var(--dm-card-bg);
}
.dm-auth-visual-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(var(--dm-accent-rgb), 0.12), transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(6, 182, 212, 0.08), transparent 50%);
}
.dm-auth-visual-content {
    position: relative;
    max-width: 380px;
    text-align: center;
}
.dm-auth-visual-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.75rem;
    background: var(--dm-input-bg);
    border: 1px solid var(--dm-card-border);
    border-radius: var(--dm-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    color: var(--dm-accent);
}
.dm-auth-visual-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    color: var(--dm-text-primary);
}
.dm-auth-visual-content p {
    font-size: 0.9rem;
    color: var(--dm-text-secondary);
    margin-bottom: 2rem;
}

/* ── Testimonial card ──────────────────────────────────────────────────── */

.dm-auth-testimonial {
    background: var(--dm-input-bg);
    border: 1px solid var(--dm-card-border);
    border-radius: var(--dm-radius-xl);
    padding: 1.25rem;
    text-align: left;
}
.dm-auth-testimonial blockquote {
    font-size: 0.9rem;
    color: var(--dm-text-secondary);
    line-height: 1.65;
    margin: 0 0 1rem;
    font-style: italic;
}
.dm-auth-testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
.dm-auth-testimonial-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--dm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.dm-auth-testimonial-author strong {
    display: block;
    font-size: 0.82rem;
    color: var(--dm-text-primary);
}
.dm-auth-testimonial-author span {
    font-size: 0.72rem;
    color: var(--dm-text-muted);
}

/* ── Features card (register visual) ───────────────────────────────────── */

.dm-auth-features-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--dm-input-bg);
    border: 1px solid var(--dm-card-border);
    border-radius: var(--dm-radius-xl);
    padding: 1.25rem;
    text-align: left;
}
.dm-auth-feature {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--dm-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .dm-auth-visual-side {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .dm-auth-form-side {
        padding: 1.25rem;
    }
    .dm-auth-social {
        flex-direction: column;
    }
    .dm-auth-shell-centered {
        padding: 1.25rem;
    }
}
