/* Mediterranean Style Login & Registration */

:root {
    --primary: #1A2A3A;
    --secondary: #C5A059;
    --accent: #4A9B8E;
    --bg-light: #F8F9FA;
    --text-main: #374151;
    --text-muted: #64748b;
    --error: #ef4444;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: url('https://images.unsplash.com/photo-1533105079780-92b9be482077?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat fixed;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(26, 42, 58, 0.45);
    backdrop-filter: blur(8px);
    z-index: -1;
}

.login-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 460px;
    padding: 48px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.logo { 
    text-align: center; 
    margin-bottom: 32px; 
}

.logo img {
    margin-bottom: 16px;
    border-radius: 12px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
}

.logo h1 { 
    font-family: 'Playfair Display', serif;
    font-size: 28px; 
    font-weight: 700; 
    color: var(--primary);
    letter-spacing: -0.02em;
}

.logo p { 
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

/* Tabs */
.auth-toggle {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 14px;
    margin-bottom: 32px;
}

.auth-toggle button {
    flex: 1;
    padding: 12px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-toggle button.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Forms */
.form-group { margin-bottom: 24px; }

label { 
    display: block; 
    font-weight: 600; 
    color: var(--primary); 
    margin-bottom: 8px; 
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    background: #fcfcfc;
    color: var(--text-main);
}

input:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.1);
}

button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button[type="submit"]:hover { 
    background: #253a4d;
    transform: translateY(-2px); 
    box-shadow: 0 12px 24px rgba(26, 42, 58, 0.2);
}

button[type="submit"]:active {
    transform: translateY(0);
}

#register-btn {
    background: var(--secondary);
}

#register-btn:hover {
    background: #b08d4a;
    box-shadow: 0 12px 24px rgba(197, 160, 89, 0.2);
}

/* Messages */
.error-message {
    background: #fef2f2;
    color: var(--error);
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #fee2e2;
    display: none;
    text-align: center;
}

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

.success-message {
    text-align: center;
    display: none;
    padding: 20px 0;
}

.success-message i {
    font-size: 56px;
    color: var(--success);
    margin-bottom: 20px;
}

.success-message h3 {
    color: var(--primary);
    font-size: 22px;
    margin-bottom: 12px;
}

.success-message p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
}

.mfa-box { display: none; animation: fadeIn 0.3s; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none; }

.footer-links {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}
