/* public/css/style.css */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #16a34a;
    --error: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem;
}

.auth-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Input Groups & Floating Labels */
.input-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.floating-input, .styled-select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: var(--transition);
    outline: none;
}

.styled-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.floating-input:focus, .styled-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Specific Select Label Styling */
.select-label {
    position: absolute;
    top: -0.5rem;
    left: 0.8rem;
    background: var(--card-bg);
    padding: 0 0.4rem;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 500;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: #93c5fd;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #e2e8f0;
}

/* Loading Animation State */
.btn.loading {
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}

.btn-secondary.loading::after {
    border: 3px solid rgba(37, 99, 235, 0.2);
    border-top-color: var(--primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* OTP Section */
.otp-section {
    background: #f8fafc;
    border: 1px dashed var(--border-color);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

#otpStatus {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    text-align: center;
    font-weight: 500;
    min-height: 20px; /* Prevents layout jump */
}

.status-success { color: var(--success); }
.status-error { color: var(--error); }

/* Links */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-footer a, .forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.auth-footer a:hover, .forgot-link:hover {
    text-decoration: underline;
}

.forgot-wrapper {
    text-align: right;
    margin-bottom: 1.5rem;
}
.forgot-link {
    font-size: 0.85rem;
}

/* Error box for form validation messages */
.error-box {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
}
.error-box ul { list-style: none; padding: 0; margin: 0; }
.error-box li { margin-bottom: 4px; }