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

/* ========================================
   Portal variables — Palm Beach Cannes
   ======================================== */
:root {
    /* Portal palette */
    --vert-lunaire: #384239;
    --vert-deep: #2a322b;
    --cannelle: #CE6D25;
    --cannelle-dark: #B45E1F;
    --creme: #FAF9F6;
    --creme-alpha: rgba(250, 249, 246, 0.92);
    --or-pale: #D4A86A;

    /* Shared / admin fallbacks */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --error: #ef4444;
    --success: #22c55e;
}

/* ========================================
   Portal body (non-admin)
   ======================================== */
body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    background: linear-gradient(160deg, var(--vert-lunaire) 0%, var(--vert-deep) 100%);
    color: var(--vert-lunaire);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* ========================================
   Fullscreen wrapper
   ======================================== */
.portal-bg {
    position: fixed;
    inset: 0;
    background: linear-gradient(160deg, var(--vert-lunaire) 0%, var(--vert-deep) 100%);
    z-index: 0;
}

.portal-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

/* ========================================
   Card — frosted crème
   ======================================== */
.portal-card {
    background: var(--creme-alpha);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 4px;
    border: 1px solid rgba(56, 66, 57, 0.08);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
    padding: 48px 36px 40px;
}

/* ========================================
   Header
   ======================================== */
.portal-header {
    text-align: center;
    margin-bottom: 32px;
}

/* Elegant WiFi icon (no circle background) */
.portal-icon {
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.portal-icon svg {
    width: 36px;
    height: 36px;
    fill: var(--cannelle);
}

/* Decorative thin line under icon */
.portal-icon-line {
    width: 40px;
    height: 1px;
    background: var(--cannelle);
    margin: 0 auto 20px;
    opacity: 0.5;
}

.restaurant-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 11px;
    color: var(--cannelle);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.portal-header h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 28px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--vert-lunaire);
    margin-bottom: 8px;
}

.portal-header p {
    font-family: 'Lora', Georgia, serif;
    color: #6b7c6e;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* Decorative separator between header and form */
.portal-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.portal-separator::before,
.portal-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(56, 66, 57, 0.2), transparent);
}

.portal-separator .sep-diamond {
    width: 6px;
    height: 6px;
    background: var(--cannelle);
    transform: rotate(45deg);
    opacity: 0.6;
    flex-shrink: 0;
}

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

.form-group label {
    display: block;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--vert-lunaire);
    margin-bottom: 8px;
}

.form-group input[type="email"] {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid rgba(56, 66, 57, 0.25);
    border-radius: 0;
    background: transparent;
    font-family: 'Lora', Georgia, serif;
    font-size: 16px;
    color: var(--vert-lunaire);
    transition: border-color 0.3s ease;
    outline: none;
}

.form-group input[type="email"]::placeholder {
    color: #a3b0a5;
    font-style: italic;
}

.form-group input[type="email"]:focus {
    border-bottom-color: var(--cannelle);
}

/* ========================================
   Checkboxes
   ======================================== */
.checkbox-group {
    margin-bottom: 14px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-family: 'Lora', Georgia, serif;
    font-size: 13px;
    line-height: 1.5;
    color: var(--vert-lunaire);
}

.checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--cannelle);
    cursor: pointer;
}

.checkbox-label a {
    color: var(--cannelle);
    text-decoration: none;
    border-bottom: 1px solid rgba(206, 109, 37, 0.3);
    transition: border-color 0.2s;
}

.checkbox-label a:hover {
    border-bottom-color: var(--cannelle);
}

/* ========================================
   Connect button — Cannelle/doré
   ======================================== */
.btn-connect {
    width: 100%;
    padding: 16px;
    background: var(--cannelle);
    color: var(--creme);
    border: none;
    border-radius: 2px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    margin-top: 16px;
}

.btn-connect:hover {
    background: var(--cannelle-dark);
    box-shadow: 0 4px 16px rgba(206, 109, 37, 0.3);
}

.btn-connect:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* ========================================
   Error & loading
   ======================================== */
.error-message {
    color: var(--error);
    font-size: 13px;
    margin-top: 8px;
    display: none;
    font-family: 'Lora', Georgia, serif;
}

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

.loading {
    display: none;
    text-align: center;
    padding: 12px 0;
}

.loading.visible {
    display: block;
}

.loading p {
    font-family: 'Lora', Georgia, serif;
    color: #6b7c6e;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(56, 66, 57, 0.15);
    border-top-color: var(--cannelle);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* ========================================
   Success page
   ======================================== */
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--cannelle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 4px 20px rgba(206, 109, 37, 0.25);
}

.success-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.success-text {
    text-align: center;
}

.success-text h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 26px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--vert-lunaire);
    margin-bottom: 12px;
}

.success-text p {
    font-family: 'Lora', Georgia, serif;
    color: #6b7c6e;
    font-size: 14px;
    line-height: 1.6;
}

/* ========================================
   Fade-in animation
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-card {
    opacity: 0;
}

.portal-card.fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ========================================
   CGV page
   ======================================== */
.cgv-body {
    display: block;
    padding: 40px 24px;
    background: var(--creme);
    color: var(--vert-lunaire);
}

.cgv-container h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 26px;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 32px;
    color: var(--vert-lunaire);
}

.cgv-container h2 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    font-weight: 600;
    color: var(--vert-lunaire);
    margin-top: 28px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.cgv-container p {
    font-family: 'Lora', Georgia, serif;
    font-size: 14px;
    line-height: 1.7;
    color: #4a5a4d;
    margin-bottom: 14px;
}

/* ========================================
   Admin styles (UNTOUCHED)
   ======================================== */
.admin-body {
    display: block;
    padding: 0;
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
}

.admin-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 18px;
}

.admin-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.card h2 {
    font-size: 16px;
    margin-bottom: 16px;
}

.filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: flex-end;
}

.filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filters label {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.filters select,
.filters input {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
}

.filters select:focus,
.filters input:focus {
    border-color: var(--primary);
}

.btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

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

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

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

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead th {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
    color: var(--text-light);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

tbody tr:hover {
    background: var(--bg);
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    cursor: pointer;
    font-size: 13px;
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chart-container {
    position: relative;
    height: 300px;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.badge-yes {
    background: #dcfce7;
    color: #166534;
}

.badge-no {
    background: #fef2f2;
    color: #991b1b;
}

@media (max-width: 640px) {
    .portal-card {
        padding: 36px 24px 32px;
    }

    .portal-header h1 {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .filters {
        flex-direction: column;
    }

    .admin-content {
        padding: 16px;
    }
}
