/* ============================================================ */
/* Webito Portal — Auth Pages (Login / Forgot / Reset)          */
/* © 2024-2026 Webito Yazılım                                    */
/* Ana site temasıyla hizalı, premium hissi veren auth tasarımı */
/* ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Open+Sans:wght@400;500;600&display=swap');

:root {
    --auth-primary: #175cff;
    --auth-primary-dark: #0a45d4;
    --auth-accent: #00E1BE;
    --auth-bg: #f5f7fb;
    --auth-card: #ffffff;
    --auth-text: #0b1020;
    --auth-text-muted: #6b7280;
    --auth-border: #e5e7eb;
    --auth-success: #10b981;
    --auth-danger: #ef4444;
    --auth-warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
}

body.portal-auth {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--auth-text);
    min-height: 100vh;
    background: var(--auth-bg);
    background-image:
        radial-gradient(circle at 10% 0%, rgba(23, 92, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 100%, rgba(0, 225, 190, 0.08) 0%, transparent 45%),
        linear-gradient(135deg, #f5f7fb 0%, #eef2ff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    -webkit-font-smoothing: antialiased;
}

/* Decorative background blobs */
body.portal-auth::before,
body.portal-auth::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}
body.portal-auth::before {
    width: 380px;
    height: 380px;
    background: rgba(23, 92, 255, 0.18);
    top: -120px;
    left: -120px;
}
body.portal-auth::after {
    width: 420px;
    height: 420px;
    background: rgba(0, 225, 190, 0.18);
    bottom: -150px;
    right: -150px;
}

/* ---------- Top brand ---------- */
.auth-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    text-decoration: none;
    color: var(--auth-text);
}
.auth-brand img {
    height: 38px;
    width: auto;
}
.auth-brand-portal {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--auth-primary);
    border: 1px solid rgba(23, 92, 255, 0.3);
    padding: 3px 9px;
    border-radius: 4px;
    background: rgba(23, 92, 255, 0.05);
}

/* ---------- Card ---------- */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: var(--auth-card);
    border-radius: 20px;
    box-shadow:
        0 1px 3px rgba(11, 16, 32, 0.04),
        0 24px 48px -12px rgba(11, 16, 32, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.auth-header {
    padding: 2rem 2.25rem 1.25rem;
    text-align: center;
}
.auth-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--auth-text);
    letter-spacing: -0.01em;
    margin-bottom: 0.4rem;
}
.auth-header p {
    font-size: 0.9rem;
    color: var(--auth-text-muted);
    line-height: 1.5;
}

.auth-body { padding: 0.5rem 2.25rem 2rem; }

/* ---------- Step indicator ---------- */
.auth-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0.75rem 0 1.5rem;
}
.auth-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
}
.auth-step-dot.active {
    width: 28px;
    border-radius: 4px;
    background: var(--auth-primary);
}
.auth-step-dot.done {
    background: var(--auth-accent);
}

/* ---------- Alerts ---------- */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    line-height: 1.45;
}
.auth-alert i { margin-top: 2px; flex-shrink: 0; }
.auth-alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.auth-alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

/* ---------- Form ---------- */
.auth-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--auth-text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}
.auth-field {
    position: relative;
    margin-bottom: 1.1rem;
}
.auth-field i.field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.95rem;
}
.auth-input {
    width: 100%;
    padding: 0.95rem 1rem 0.95rem 2.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--auth-text);
    background: #f9fafb;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}
.auth-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(23, 92, 255, 0.1);
}
.auth-input::placeholder { color: #9ca3af; }

.auth-input.code {
    padding: 1.05rem 1rem;
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: 0.45rem;
    text-align: center;
    font-family: 'SF Mono', Menlo, monospace;
}

/* ---------- Phone badge ---------- */
.auth-phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    padding: 0.65rem 1.1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--auth-text);
    border: 1px solid rgba(23, 92, 255, 0.15);
    margin-bottom: 1.25rem;
}
.auth-phone-badge i { color: var(--auth-primary); }

/* ---------- Buttons ---------- */
.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.95rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.auth-btn-primary {
    background: linear-gradient(135deg, var(--auth-primary) 0%, var(--auth-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 18px -4px rgba(23, 92, 255, 0.45);
}
.auth-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -4px rgba(23, 92, 255, 0.55);
    color: #fff;
}
.auth-btn-ghost {
    background: transparent;
    color: var(--auth-text-muted);
    border: 1px solid var(--auth-border);
}
.auth-btn-ghost:hover {
    color: var(--auth-primary);
    border-color: var(--auth-primary);
    background: rgba(23, 92, 255, 0.04);
}
.auth-btn-link {
    background: none;
    border: none;
    color: var(--auth-primary);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}
.auth-btn-link:hover { text-decoration: underline; }

/* ---------- Info & helper text ---------- */
.auth-info-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--auth-text-muted);
    margin-top: 1rem;
}
.auth-info-box {
    background: linear-gradient(135deg, #eef2ff 0%, #f0fdfa 100%);
    border: 1px solid rgba(23, 92, 255, 0.15);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.82rem;
    color: #4338ca;
    margin: 1rem 0 1.25rem;
    line-height: 1.5;
}
.auth-info-box i { color: var(--auth-primary); margin-right: 0.4rem; }

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

/* ---------- Footer ---------- */
.auth-footer {
    padding: 1.1rem 2.25rem;
    background: #fafbfc;
    border-top: 1px solid var(--auth-border);
    text-align: center;
}
.auth-footer p {
    font-size: 0.82rem;
    color: var(--auth-text-muted);
    margin: 0;
}
.auth-footer a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 500;
}
.auth-footer a:hover { text-decoration: underline; }

.auth-bottom {
    position: relative;
    z-index: 1;
    margin-top: 1.5rem;
    text-align: center;
}
.auth-bottom a {
    color: var(--auth-text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: color 0.2s;
}
.auth-bottom a:hover { color: var(--auth-primary); }

/* ---------- Status icons (success / error) ---------- */
.auth-status-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}
.auth-status-icon.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: var(--auth-success);
    box-shadow: 0 8px 24px -6px rgba(16, 185, 129, 0.4);
}
.auth-status-icon.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: var(--auth-danger);
    box-shadow: 0 8px 24px -6px rgba(239, 68, 68, 0.4);
}

.auth-user-info {
    background: #f9fafb;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    text-align: center;
}
.auth-user-info .name {
    font-weight: 600;
    color: var(--auth-text);
    font-size: 0.95rem;
}
.auth-user-info .email {
    font-size: 0.82rem;
    color: var(--auth-text-muted);
    margin-top: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .auth-header, .auth-body, .auth-footer {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    .auth-header h1 { font-size: 1.3rem; }
    .auth-input.code { font-size: 1.4rem; letter-spacing: 0.3rem; }
}
