/* ═══════════════════════════════════════════════════════════
   POSTZY — Premium Auth Pages Stylesheet
   ═══════════════════════════════════════════════════════════ */

.auth-section {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem 4rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.auth-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.35) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.25) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(236, 72, 153, 0.15) 0%, transparent 60%);
    animation: authAurora 10s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes authAurora {
    0%   { opacity: 0.7; transform: scale(1) rotate(0deg); }
    50%  { opacity: 1;   transform: scale(1.05) rotate(1deg); }
    100% { opacity: 0.8; transform: scale(1.02) rotate(-1deg); }
}

.auth-section::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

/* Floating Particles */
.auth-particles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.auth-particles span {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: authFloat linear infinite;
}

.auth-particles span:nth-child(1) { width: 6px; height: 6px; left: 10%; animation-duration: 18s; animation-delay: 0s; }
.auth-particles span:nth-child(2) { width: 10px; height: 10px; left: 25%; animation-duration: 22s; animation-delay: 2s; }
.auth-particles span:nth-child(3) { width: 5px; height: 5px; left: 40%; animation-duration: 16s; animation-delay: 4s; }
.auth-particles span:nth-child(4) { width: 12px; height: 12px; left: 55%; animation-duration: 20s; animation-delay: 1s; }
.auth-particles span:nth-child(5) { width: 7px; height: 7px; left: 70%; animation-duration: 24s; animation-delay: 3s; }
.auth-particles span:nth-child(6) { width: 9px; height: 9px; left: 85%; animation-duration: 19s; animation-delay: 5s; }
.auth-particles span:nth-child(7) { width: 4px; height: 4px; left: 50%; animation-duration: 15s; animation-delay: 0.5s; }
.auth-particles span:nth-child(8) { width: 11px; height: 11px; left: 35%; animation-duration: 21s; animation-delay: 2.5s; }

@keyframes authFloat {
    0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100vh) rotate(720deg); opacity: 0; }
}

/* Auth Card — Glassmorphism */
.auth-card-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    animation: authCardEnter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.auth-card-wrapper.auth-card-wide {
    max-width: 520px;
}

@keyframes authCardEnter {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 24px;
    box-shadow:
        0 32px 64px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    overflow: hidden;
    position: relative;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7, #ec4899);
    background-size: 300% 100%;
    animation: authGradientSlide 4s ease infinite;
}

@keyframes authGradientSlide {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-card-body { padding: 2.5rem 2.25rem; }

/* Auth Header */
.auth-header { text-align: center; margin-bottom: 2rem; }

.auth-icon {
    width: 64px; height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.25rem;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    animation: authIconPulse 3s ease-in-out infinite;
}

@keyframes authIconPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25); }
    50%      { box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4); }
}

.auth-icon svg { width: 28px; height: 28px; color: white; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.auth-title { font-size: 1.65rem; font-weight: 800; color: #0f172a; margin-bottom: 0.4rem; letter-spacing: -0.02em; line-height: 1.2; }
.auth-subtitle { color: #64748b; font-size: 0.925rem; line-height: 1.5; }

/* Form Group */
.auth-form-group { margin-bottom: 1.25rem; position: relative; }
.auth-form-label { display: block; font-size: 0.825rem; font-weight: 600; color: #334155; margin-bottom: 0.4rem; }

.auth-input-wrapper { position: relative; }

.auth-input-wrapper .auth-input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: #94a3b8; transition: color 0.3s ease; pointer-events: none; z-index: 2;
}

.auth-input {
    width: 100%; padding: 0.75rem 1rem 0.75rem 2.75rem; font-size: 0.925rem; color: #1e293b;
    background: rgba(255, 255, 255, 0.7); border: 1.5px solid #e2e8f0; border-radius: 12px;
    outline: none; transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94); position: relative; z-index: 1;
}

.auth-input::placeholder { color: #94a3b8; }

.auth-input:focus {
    border-color: #6366f1; background: #ffffff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), 0 2px 8px rgba(99, 102, 241, 0.08);
}

.auth-input:focus ~ .auth-input-icon { color: #6366f1; }
.auth-input.no-icon { padding-left: 1rem; }

/* Password Toggle */
.auth-password-toggle {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #94a3b8; cursor: pointer; padding: 4px; z-index: 3;
    transition: color 0.2s ease; display: flex; align-items: center; justify-content: center;
}
.auth-password-toggle:hover { color: #6366f1; }
.auth-password-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Checkbox */
.auth-checkbox-wrapper { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; }
.auth-checkbox { width: 18px; height: 18px; accent-color: #6366f1; cursor: pointer; }
.auth-checkbox-label { font-size: 0.875rem; color: #475569; cursor: pointer; }

/* Submit Button */
.auth-submit-btn {
    width: 100%; padding: 0.85rem 1.5rem; font-size: 1rem; font-weight: 700; color: white;
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7); background-size: 200% 200%;
    border: none; border-radius: 12px; cursor: pointer; position: relative; overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3); letter-spacing: 0.01em;
}

.auth-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4); background-position: 100% 0; }
.auth-submit-btn:active { transform: translateY(0); }

.auth-submit-btn::after {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}
.auth-submit-btn:hover::after { left: 100%; }

/* Divider */
.auth-divider {
    display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0;
    color: #94a3b8; font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, #e2e8f0, transparent); }

/* Social Buttons */
.auth-social-buttons { display: flex; gap: 0.75rem; }

.auth-social-btn {
    flex: 1; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.7rem 1rem; font-size: 0.85rem; font-weight: 600; color: #334155;
    background: rgba(255, 255, 255, 0.8); border: 1.5px solid #e2e8f0; border-radius: 12px;
    cursor: default; transition: all 0.3s ease; text-decoration: none;
}

.auth-social-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); border-color: #cbd5e1; background: #ffffff; color: #334155; }
.auth-social-btn svg { width: 18px; height: 18px; }

/* Footer Links */
.auth-footer-links { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: #64748b; }
.auth-footer-links a { color: #6366f1; font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
.auth-footer-links a:hover { color: #4f46e5; text-decoration: underline; }

.auth-footer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; font-size: 0.875rem; }
.auth-footer-row a { color: #6366f1; font-weight: 600; text-decoration: none; transition: color 0.2s ease; }
.auth-footer-row a:hover { color: #4f46e5; }

/* Graceful Alerts */
.auth-alert {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1rem 1.25rem; border-radius: 12px; margin-bottom: 1.5rem;
    animation: authAlertSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    position: relative; overflow: hidden;
}

@keyframes authAlertSlideIn {
    from { opacity: 0; transform: translateY(-12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-alert::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px 0 0 4px; }
.auth-alert-icon { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; }
.auth-alert-content { flex: 1; min-width: 0; }
.auth-alert-title { font-weight: 700; font-size: 0.85rem; margin-bottom: 0.25rem; }
.auth-alert-message { font-size: 0.825rem; line-height: 1.5; }
.auth-alert-message ul { margin: 0; padding: 0 0 0 1.1rem; list-style: disc; }
.auth-alert-message li { margin-bottom: 0.15rem; }

.auth-alert-dismiss {
    position: absolute; top: 0.6rem; right: 0.75rem; background: none; border: none;
    color: inherit; opacity: 0.5; cursor: pointer; padding: 2px; font-size: 1.1rem; line-height: 1; transition: opacity 0.2s;
}
.auth-alert-dismiss:hover { opacity: 1; }

.auth-alert-error { background: linear-gradient(135deg, #fef2f2, #fff1f2); border: 1px solid rgba(239, 68, 68, 0.15); color: #991b1b; }
.auth-alert-error::before { background: linear-gradient(180deg, #ef4444, #dc2626); }
.auth-alert-error .auth-alert-icon { color: #ef4444; }

.auth-alert-success { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border: 1px solid rgba(34, 197, 94, 0.15); color: #166534; }
.auth-alert-success::before { background: linear-gradient(180deg, #22c55e, #16a34a); }
.auth-alert-success .auth-alert-icon { color: #22c55e; }

.auth-alert-info { background: linear-gradient(135deg, #eff6ff, #eef2ff); border: 1px solid rgba(99, 102, 241, 0.15); color: #1e3a5f; }
.auth-alert-info::before { background: linear-gradient(180deg, #6366f1, #4f46e5); }
.auth-alert-info .auth-alert-icon { color: #6366f1; }

/* Password Strength */
.auth-password-strength { display: flex; gap: 4px; margin-top: 0.5rem; height: 4px; }
.auth-password-strength-bar { flex: 1; height: 100%; border-radius: 2px; background: #e2e8f0; transition: background 0.3s ease; }
.auth-password-strength-bar.active.weak   { background: #ef4444; }
.auth-password-strength-bar.active.fair   { background: #f59e0b; }
.auth-password-strength-bar.active.good   { background: #22c55e; }
.auth-password-strength-bar.active.strong { background: #16a34a; }
.auth-password-strength-text { font-size: 0.75rem; margin-top: 0.25rem; font-weight: 600; color: #94a3b8; }

/* Responsive */
@media (max-width: 576px) {
    .auth-section { padding: 5rem 0.75rem 3rem; }
    .auth-card-body { padding: 2rem 1.5rem; }
    .auth-title { font-size: 1.4rem; }
    .auth-social-buttons { flex-direction: column; }
    .auth-footer-row { flex-direction: column; gap: 0.5rem; text-align: center; }
    .auth-icon { width: 56px; height: 56px; border-radius: 16px; }
    .auth-icon svg { width: 24px; height: 24px; }
}

.auth-eye-show { display: block; }
.auth-eye-hide { display: none; }
.auth-password-visible .auth-eye-show { display: none; }
.auth-password-visible .auth-eye-hide { display: block; }
