/* ============================================
   IBT TOPIK - Auth Pages Styles
   ============================================ */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: white;
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    text-decoration: none;
    color: inherit;
}

.auth-logo img {
    height: 32px;
    width: auto;
}

.auth-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--gray-900);
    text-align: center;
    margin-bottom: 12px;
}

.auth-desc {
    font-size: 14px;
    color: var(--gray-500);
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.5;
    white-space: pre-line;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
    color: var(--gray-400);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--gray-600);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary);
}

.form-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-btn:hover {
    background: var(--primary-hover);
}

.form-btn:active {
    transform: scale(0.98);
}

/* Forgot Password Link */
.forgot-link {
    font-size: 13px;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary);
}

/* Divider */
.divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    z-index: 0;
}

.divider span {
    position: relative;
    background: white;
    padding: 0 16px;
    font-size: 12px;
    color: var(--gray-500);
    z-index: 1;
}

/* Social Button */
.social-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-700);
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.social-btn svg {
    flex-shrink: 0;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--gray-600);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 32px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--gray-900);
}

/* Success Message */
.success-message {
    display: none;
    padding: 16px;
    background: var(--success-light, #d1fae5);
    border-radius: 8px;
    color: var(--success, #059669);
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.success-message.show {
    display: block;
}

/* Error Message */
.error-message {
    display: none;
    padding: 16px;
    background: var(--error-light, #fee2e2);
    border-radius: 8px;
    color: var(--error, #dc2626);
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
}

.error-message.show {
    display: block;
}

/* Auth Alert Styles */
.auth-alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.auth-alert p {
    margin: 0;
}

.auth-alert p + p {
    margin-top: 4px;
}

.auth-alert-error {
    background: var(--error-light, #fee2e2);
    color: var(--error, #dc2626);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.auth-alert-success {
    background: var(--success-light, #dcfce7);
    color: var(--success, #16a34a);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

/* Responsive - Tablet */
@media (max-width: 768px) {
    .auth-container {
        padding: 20px 16px;
    }

    .auth-card {
        max-width: 100%;
        padding: 40px 32px;
        border-radius: 12px;
    }

    .auth-title {
        font-size: 26px;
    }

    .auth-desc {
        font-size: 13px;
        margin-bottom: 28px;
    }
}

/* Responsive - Mobile */
@media (max-width: 480px) {
    .auth-container {
        padding: 16px 12px;
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .auth-logo {
        margin-bottom: 24px;
    }

    .auth-title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .auth-desc {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
        border-radius: 6px;
    }

    .form-btn {
        padding: 14px;
        font-size: 15px;
        border-radius: 6px;
    }

    .social-btn {
        padding: 12px 14px;
        font-size: 14px;
        border-radius: 6px;
    }

    .divider {
        margin: 20px 0;
    }

    .auth-footer {
        margin-top: 20px;
        font-size: 13px;
    }

    .forgot-link {
        font-size: 12px;
    }
}

/* Responsive - Small Mobile */
@media (max-width: 360px) {
    .auth-container {
        padding: 12px 8px;
    }

    .auth-card {
        padding: 24px 16px;
    }

    .auth-title {
        font-size: 20px;
    }

    .auth-desc {
        font-size: 12px;
    }

    .form-input {
        padding: 11px 12px;
    }

    .form-btn {
        padding: 12px;
        font-size: 14px;
    }

    .social-btn {
        padding: 11px 12px;
        font-size: 13px;
    }
}

/* Landscape mode on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .auth-container {
        padding: 12px 24px;
        min-height: auto;
    }

    .auth-card {
        padding: 24px 32px;
    }

    .auth-logo {
        margin-bottom: 16px;
    }

    .auth-title {
        margin-bottom: 8px;
    }

    .auth-desc {
        margin-bottom: 16px;
    }
}
