:root {
    --primary-color: #4285F4; /* Google Blue */
    --primary-hover: #174ea6;
    --bg-color: #f0f2f5; /* Tinted light gray for better contrast */
    --surface-color: #ffffff; /* Pure white for cards/panels */
    --panel-bg: #ffffff;
    --text-main: #3c4043;
    --text-muted: #5f6368;
    --border-color: #dadce0;
    --input-bg: #ffffff;
    --danger-color: #d93025;
    --success-color: #188038;
    --warning-color: #f9ab00;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
    --radius-lg: 28px;
    --radius-md: 12px;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(66, 133, 244, 0.05) 0, transparent 40%),
        radial-gradient(at 100% 0%, rgba(24, 128, 56, 0.02) 0, transparent 40%),
        radial-gradient(at 100% 100%, rgba(217, 48, 37, 0.02) 0, transparent 40%),
        radial-gradient(at 0% 100%, rgba(249, 171, 0, 0.02) 0, transparent 40%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.registration-container {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.branding {
    text-align: center;
    margin-bottom: 30px;
}

.branding h1 {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.branding p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.form-group input::placeholder {
    color: #475569;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 500px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

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

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

.form-footer {
    margin-top: 25px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #818cf8;
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Dashboard & Business Styles */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.business-card {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-md);
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(60, 64, 67, 0.1);
    border-color: var(--primary-color);
}

.business-card h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-main);
}

.business-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    flex-grow: 1;
}

.business-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.business-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-secondary {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-muted);
}

.btn-danger {
    padding: 8px 16px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-qr {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    text-align: center;
}

.btn-qr:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.6);
    color: #c7d2fe;
}

.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
}

.empty-state {
    text-align: center;
    grid-column: 1 / -1;
    padding: 60px;
    color: var(--text-muted);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px 0 rgba(60,64,67,.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.error-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
    animation: fadeIn 0.3s ease;
}

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

/* ===== Language switcher ===== */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.lang-switcher a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 3px 7px;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}

.lang-switcher a:hover {
    color: var(--text-main);
    background: rgba(0, 0, 0, 0.05);
}

.lang-switcher a.active {
    color: var(--primary-color);
    background: rgba(66, 133, 244, 0.1);
}

.lang-sep {
    color: var(--border-color);
    font-weight: 400;
}

/* Variante flottante (pages sans navbar) */
.lang-switcher--floating {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 999;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 5px 10px;
    box-shadow: var(--shadow-sm);
}

.branding a {
    text-decoration: none;
}

.branding h1 {
    font-size: 1.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 16px;
    border-left: 1px solid var(--border-color);
    padding-left: 16px;
}

.user-menu span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.user-menu form {
    display: inline;
}

.btn-logout {
    border: 1px solid var(--border-color);
    background: white;
    padding: 6px 16px;
    border-radius: 500px;
    color: var(--text-main);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-logout:hover {
    background: #f8f9fa;
    border-color: var(--text-muted);
}

/* Responsiveness */
@media (max-width: 768px) {
    .navbar {
        padding: 12px 16px;
    }

    .nav-links {
        gap: 10px;
    }

    .user-menu {
        margin-left: 8px;
        padding-left: 8px;
        gap: 8px;
    }

    .user-menu span {
        display: none; /* Hide username on mobile */
    }
    
    .btn-logout {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .dashboard-container {
        padding: 20px 16px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 30px;
    }
    
    .header-actions div {
        width: 100%;
    }

    .header-actions div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-actions .btn-primary {
        flex: 1;
        min-width: 140px;
    }
    
    .business-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-panel {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 10px 12px;
    }

    .navbar .branding h1 {
        font-size: 1.1rem;
    }

    .nav-links a:not(.active) {
        display: none; /* Only show active link on very small screens */
    }

    .lang-switcher {
        font-size: 0.75rem;
    }
}

