﻿@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
@import url('./responsive.css');

:root {
    --auth-green: #2d5f3f;
    --auth-blue: #166534;
    --auth-ink: #1f2937;
    --auth-subtle: #6b7280;
    --auth-border: #e5e7eb;
    --auth-primary: #16a34a;
    --auth-ring: rgba(22, 163, 74, 0.22);
    --auth-ease: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

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

body.auth-body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background-image:
        linear-gradient(135deg, rgba(45, 95, 63, 0.85) 0%, rgba(30, 90, 142, 0.85) 100%),
        url('../images/pu-campus.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-wrapper {
    width: 100%;
    max-width: 480px;
}

.auth-card {
    background: #fff;
    padding: 2.75rem 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
    text-align: center;
    animation: fadeIn 0.5s ease;
    transition: transform var(--auth-ease), box-shadow var(--auth-ease);
}

.auth-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 26px 65px rgba(0, 0, 0, 0.33);
}

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

.auth-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    transition: transform var(--auth-ease), filter var(--auth-ease);
}

.auth-logo:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 8px 12px rgba(30, 90, 142, 0.22));
}

.auth-brand {
    margin-bottom: 1.25rem;
}

.auth-brand-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--auth-ink);
}

.auth-brand-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
}

.auth-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform var(--auth-ease), box-shadow var(--auth-ease);
}

.auth-icon:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 18px rgba(22, 163, 74, 0.18);
}

.auth-icon i {
    font-size: 2rem;
    color: var(--auth-primary);
}

.auth-icon.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
}

.auth-icon.success i { color: #10b981; }

.auth-icon.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.auth-icon.error i { color: #ef4444; }

.auth-title {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--auth-ink);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--auth-subtle);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--auth-border);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: border-color var(--auth-ease), box-shadow var(--auth-ease), transform var(--auth-ease);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 4px var(--auth-ring);
    transform: translateY(-1px);
}

.form-hint {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: #64748b;
}

.btn-submit {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: transform var(--auth-ease), box-shadow var(--auth-ease), filter var(--auth-ease);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(22, 163, 74, 0.3);
    filter: saturate(1.05);
}

.btn-submit:active {
    transform: translateY(0);
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.google-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    transition: transform var(--auth-ease), border-color var(--auth-ease), background-color var(--auth-ease), box-shadow var(--auth-ease);
    background: #fff;
}

.google-btn img {
    width: 18px;
    height: 18px;
}

.google-btn:hover {
    background: #f9fafb;
    border-color: #cbd5f0;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.08);
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-footer a {
    color: #16a34a;
    text-decoration: none;
    font-weight: 600;
    transition: color var(--auth-ease), transform var(--auth-ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.auth-footer a:hover {
    text-decoration: underline;
    transform: translateX(2px);
}

.alert {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.otp-input {
    letter-spacing: 8px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.resend-link {
    background: none;
    border: none;
    color: #16a34a;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: 13px;
}

.resend-link:disabled {
    color: #9ca3af;
    text-decoration: none;
    cursor: not-allowed;
}

.text-muted {
    color: #6b7280;
    font-size: 0.875rem;
}

.brand-text {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    body.auth-body {
        align-items: flex-start;
        padding: 16px;
    }

    .auth-wrapper {
        max-width: 560px;
        margin: 0 auto;
    }

    .auth-card {
        padding: 2rem 1.25rem;
        border-radius: 1.1rem;
    }

    .auth-title {
        font-size: 1.5rem;
    }

    .auth-subtitle {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 420px) {
    .auth-logo {
        width: 68px;
        height: 68px;
    }

    .auth-icon {
        width: 68px;
        height: 68px;
        margin-bottom: 1rem;
    }

    .auth-icon i {
        font-size: 1.5rem;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .otp-input {
        letter-spacing: 4px;
        font-size: 1.2rem;
    }
}

.password-strength {
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    width: 0%;
    transition: all 0.3s;
    border-radius: 2px;
}

.password-requirements {
    background: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    text-align: left;
}

.password-requirements h4 {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-requirements li i {
    width: 16px;
}

.password-requirements li.valid {
    color: #10b981;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 1.5rem;
    transition: transform var(--auth-ease), box-shadow var(--auth-ease), filter var(--auth-ease);
}

.btn-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
    filter: saturate(1.05);
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid var(--auth-ring);
    outline-offset: 2px;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 2.25rem 1.75rem;
    }
}

