/* =============================================
 * EZVINO BASE THEME - STRUCTURE ONLY
 * Colors in separate theme file (wine.css, ocean.css, etc.)
 * ============================================= */

:root {
    /* ===== NEUTRAL COLORS (overridden by theme files) ===== */
    
    /* Brand Colors - NEUTRAL */
    --brand-primary: #666666;
    --brand-secondary: #888888;
    --wine-gold: #999999;
    --wine-cream: #f5f5f5;
    --wine-dark: #666666;
    --success-green: #e8e8e8;
    --success-dark-green: #888888;
    --danger-red: #999999;
    --info-blue: #888888;
   
    /* Text Colors - NEUTRAL */
    --text-french: #333333;
    --text-english: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --text-dark: #333333;
    --text-medium: #555555;
    --text-primary: #333333;
   
    /* Backgrounds - NEUTRAL */
    --bg-light: #f5f5f5;
    --bg-white: #ffffff;
    --bg-card: rgba(245, 245, 245, 0.95);
    --bg-overlay: rgba(0, 0, 0, 0.5);
   
    /* Borders & Shadows - STRUCTURAL (keep as-is) */
    --border-light: #e0e0e0;
    --border-radius: 12px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
}

/* =============================================
 * GLOBAL RESETS & BASE STYLES
 * ============================================= */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* =============================================
 * LANGUAGE SYSTEM
 * ============================================= */

.french-text { color: var(--text-french); }
.english-text { color: var(--text-english); }
.french-text-white { color: var(--wine-cream); }
.english-text-white { color: var(--wine-cream); }

/* Hide inactive language by default */
body[data-language="fr"] .english-text,
body[data-language="en"] .french-text {
    display: none;
}

body[data-language="fr"] .french-text,
body[data-language="fr"] .french-text-white {
    display: inline;
}

body[data-language="fr"] .english-text,
body[data-language="fr"] .english-text-white {
    display: none;
}

body[data-language="en"] .french-text,
body[data-language="en"] .french-text-white {
    display: none;
}

body[data-language="en"] .english-text,
body[data-language="en"] .english-text-white {
    display: inline;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--bg-light);
    padding: 0.25rem;
    border-radius: 6px;
}

.lang-btn {
    padding: 0.4rem 1rem;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--bg-white);
    color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.lang-btn:hover:not(.active) {
    background: rgba(255,255,255,0.5);
}

/* =============================================
 * AUTHENTICATION PAGES
 * ============================================= */

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333333;
    padding: 2rem;
}

.auth-card {
    background: #333333;
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.auth-logo img {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
}

.auth-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Header Controls (Landing Page) */
.header-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-controls .language-switcher {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
}

.login-btn {
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: var(--brand-secondary);
}

@media (max-width: 768px) {
    .header-controls {
        top: 10px;
        right: 10px;
    }
}

.google-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 400px;
    background: var(--bg-white);
    border: 1px solid #dadce0;
    border-radius: 50px;
    padding: 0.6rem 1rem;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: all 0.2s ease;
}

.google-login-btn:hover {
    background: #f7f8f8;
    box-shadow: var(--shadow-sm);
}

.google-icon {
    width: 18px;
    height: 18px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-light);
}

/* PIN & Security */
.security-pin-group {
    max-width: 400px;
}

.pin-input {
    font-family: monospace;
    font-size: 1.5em;
    letter-spacing: 0.3em;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.pin-help {
    color: #666;
    font-size: 0.9em;
    margin-top: 0.5rem;
}

.pin-modal {
    max-width: 450px;
}

.pin-instruction {
    text-align: center;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.pin-error {
    background: #eee;
    color: #666;
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
    font-size: 0.9em;
}

.pin-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.1em;
}

.admin-email-readonly {
    background: #f1f5f9;
    cursor: not-allowed;
}

/* Magic Link Auth Modal */
.auth-modal {
    max-width: 540px;
    width: 540px;
}

.auth-instruction {
    text-align: center;
    color: #64748b;
    margin-bottom: 1.5rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    line-height: 1.5;
}

.auth-email-input {
    width: 100%;
    margin-bottom: 1rem;
}

.auth-error {
    background: #eee;
    color: #666;
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
    text-align: center;
    font-size: 0.9em;
}

.auth-submit {
    width: 100%;
    padding: 1rem;
    font-size: 1.05em;
}

/* Modal Header with Language Switcher */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-language-switcher {
    display: flex;
    gap: 0.25rem;
    background: #f1f5f9;
    padding: 0.25rem;
    border-radius: 6px;
}

.modal-lang-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 45px;
    text-align: center;
}

.modal-lang-btn:hover {
    color: var(--brand-primary);
    background: rgba(100, 100, 100, 0.1);
}

.modal-lang-btn.active {
    color: white;
    background: var(--brand-primary);
}

/* Auth Waiting/Success State */
.auth-success-icon {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.auth-success-title {
    text-align: center;
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    margin: 1rem 0;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-email-sent {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
    padding: 0 1rem;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-options {
    margin: 2rem 0;
}

.auth-option-box {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    min-height: 140px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.desktop-option,
.mobile-option {
    min-height: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.option-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.option-title {
    font-weight: 600;
    color: #1e293b;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.option-text {
    color: #64748b;
    font-size: 0.9rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.auth-divider {
    text-align: center;
    margin: 1rem 0;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.9rem;
}

.code-input-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.code-digit {
    width: 2.8rem;
    height: 3.2rem;
    font-family: monospace;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s;
}

.code-digit:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(100, 100, 100, 0.1);
}

.code-digit:not(:placeholder-shown) {
    border-color: #888;
    background: #f5f5f5;
}

.resend-btn {
    width: 100%;
    margin-top: 1rem;
    background: var(--success-green);
}

.resend-btn:hover {
    width: 100%;
    margin-top: 1rem;
    background: var(--success-dark-green);
}

/* Blur effect for auth modal */
.modal-overlay.active ~ .main-content,
.modal-overlay.active ~ .sidebar,
.modal-overlay.active ~ header {
    filter: blur(8px);
    pointer-events: none;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    background-color: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay.show {
    display: flex !important;
}

/* =============================================
 * BUTTONS & ACTIONS
 * ============================================= */

.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--success-dark-green);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #e9ecef;
    color: #333;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-success {
    background: var(--success-green);
    color: var(--text-white);
}

.btn-success:hover {
    background: #666666;
}

.btn-danger {
    background: var(--danger-red);
    color: var(--text-white);
}

.btn-danger:hover {
    background: #777777;
}

/* Modal Content */
.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    max-width: 600px;
    max-height: 90vh;
    width: 90%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-light);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.preview-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.preview-name {
    font-weight: 600;
    color: var(--text-dark);
}

.preview-category {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Input with Language Flag */
.input-with-flag {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.input-with-flag .input-flag {
    background: var(--brand-primary);
    color: white;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.input-with-flag .form-input,
.input-with-flag .form-textarea {
    flex: 1;
}

/* Preview lang toggle in header */
.preview-lang-toggle {
    display: flex;
    gap: 4px;
}

.preview-lang-toggle .btn-xs {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    background: #e5e7eb;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.preview-lang-toggle .btn-xs.active {
    background: var(--brand-primary);
    color: white;
}

/* ========================================
   PREVIEW HIGHLIGHT
   Used by tasting and email live preview
   ======================================== */

.preview-highlight {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

[data-field],
[data-preview] {
    transition: outline 0.2s ease;
}

/* ========================================
   EMAIL PREVIEW PAGE
   ======================================== */

.email-preview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    color: var(--text-light);
}

.email-preview-error {
    color: var(--danger-red);
}

.email-content {
    display: none;
}

.email-content.active {
    display: block;
}

/* =============================================
 * HEADER & NAVIGATION
 * ============================================= */

.page-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.winery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1002;
}

.winery-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.winery-logo {
    width: 50px;
    height: 50px;
    background: var(--brand-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
}

.winery-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.winery-name h1 {
    font-size: 1.5rem;
    color: var(--brand-primary);
    font-weight: 700;
    margin: 0;
}

.winery-name .winery-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    background: var(--brand-primary);
    color: var(--text-white);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: #555555;
}

/* =============================================
 * DASHBOARD LAYOUT
 * ============================================= */

.dashboard-container {
    display: flex;
    min-height: calc(100vh - 80px);
    margin-top: 0;
}

.sidebar {
    width: 250px;
    background: var(--bg-white);
    border-right: 1px solid #e2e8f0;
    padding: 1rem 0;
    flex-shrink: 0;
    position: fixed;
    top: 82px;
    left: 0;
    height: calc(100vh - 82px);
    overflow-y: auto;
    padding-top: 1rem;
    z-index: 50;
}

.winery-header:has(.winery-selector) + .dashboard-container .sidebar {
    padding-top: 1.5rem;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--bg-light);
}

.nav-item.active {
    background: var(--brand-primary);
    color: var(--text-white);
}

.nav-item.active .french-text,
.nav-item.active .english-text {
    color: var(--text-white) !important;
}

.nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.nav-label {
    font-weight: 500;
    font-size: 0.95rem;
}

.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 2rem;
    overflow-y: auto;
    min-height: calc(100vh - 82px);
}

/* Super Admin Menu */
.sidebar-divider {
    border: none;
    border-top: 2px solid #e2e8f0;
    margin: 1rem 0;
}

.sidebar-section-label {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-top: 0.5rem;
}

.super-admin-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
}

.super-admin-item:hover {
    background: var(--bg-light);
}

.super-admin-item.active {
    background: var(--brand-primary);
    color: white;
}

.super-admin-info {
    flex: 1;
}

.super-admin-email {
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.super-admin-name {
    font-size: 0.875rem;
    color: #666;
    display: block;
    margin-bottom: 0.25rem;
}

.super-admin-date {
    font-size: 0.875rem;
    color: #999;
}

.super-admin-delete-btn {
    background: var(--danger-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.super-admin-delete-btn:hover {
    background: #777777;
}

/* Winery Selector */
.winery-selector {
    padding: 0.4rem 1.5rem 0.4rem 0.6rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1e293b;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    min-width: 180px;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
}

.selector-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-primary);
    white-space: nowrap;
}

.winery-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    min-width: 200px;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}

.winery-select:hover {
    border-color: var(--brand-primary);
}

.winery-select:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(100, 100, 100, 0.1);
}

/* =============================================
 * WINERY IDENTITY CARD
 * ============================================= */

.winery-id-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.winery-id-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.winery-id-logo {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.winery-id-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.winery-id-info {
    flex: 1;
}

.winery-id-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.winery-id-name-input {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    border: 2px dashed var(--brand-primary);
    background: var(--wine-cream);
    padding: 0.5rem;
    border-radius: 6px;
    width: 100%;
    margin-bottom: 0.5rem;
}

.winery-id-name-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    background: white;
}

.winery-id-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.winery-id-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    color: var(--text-medium);
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.winery-id-meta-item span:first-child {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.winery-id-meta-item span:last-child {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-dark);
}

.qr-download-btn {
    width: 100%;
    margin-top: 0.75rem;
    background: var(--success-green);
}

/* =============================================
 * REPORTS SECTION
 * ============================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--brand-primary);
}

.stat-label {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.export-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.report-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s ease;
}

.report-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.report-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.report-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    color: var(--text-dark);
}

.report-count {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--brand-primary);
    margin: 1rem 0;
}

.report-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.report-card .btn {
    width: 100%;
    margin-top: 1rem;
}

/* Settings Card (reusable) */
.settings-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.settings-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* Requirements List */
.requirements-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.requirements-list li:last-child {
    border-bottom: none;
}

.requirements-list .requirement-icon {
    font-size: 1.2rem;
    width: 1.5rem;
    display: inline-block;
}

/* =============================================
 * CONTENT SECTIONS
 * ============================================= */

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Section header with multiple buttons */
.section-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.section-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.section-title {
    font-size: 1.4rem;
    color: var(--brand-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}



/* =============================================
 * OPERATING HOURS STYLES
 * ============================================= */

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.day-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    min-width: 0;
}

.day-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.day-closed-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.day-closed-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.day-closed-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.day-time-inputs {
    display: flex;
    align-items: center;
    gap: 0rem;
    margin-top: 0.5rem;
}

.day-time-inputs input[type="time"] {
    flex: 1;
    padding: 0.4rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.8rem;
    min-width: 0;
    max-width: 100%;
}

.time-separator {
    color: var(--text-light);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.timezone-selector {
    margin-top: 2rem;
    margin-bottom: 2rem;
    max-width: 400px;
}

/* =============================================
 * SETTINGS PAGE STYLES
 * ============================================= */

.settings-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.form-group-full {
    margin-top: 1.5rem;
}

.winery-id-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.form-textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
}

/* =============================================
 * INFO BANNERS & MESSAGES
 * ============================================= */

.info-banner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-left: 4px solid var(--brand-primary);
    color: var(--text-dark);
    font-size: 0.9rem;
}

.error-message {
    background: #eee;
    color: var(--danger-red);
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.warning-box {
    background: #f5f5f5;
    border-left: 4px solid #999;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.warning-box p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.warning-box strong {
    font-weight: 600;
}

.success-message {
    background: var(--success-green);
    color: #333;
    padding: 0.8rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.form-note {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-left: 3px solid var(--brand-primary);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* =============================================
 * WINE CARDS & DRAG-DROP
 * ============================================= */

.wine-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Container used by modules for drag-drop */
.draggable-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Super admins list container */
.super-admins-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.wine-card,
.plateau-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    align-items: flex-start;
}

.wine-card:hover,
.plateau-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.wine-card.draggable {
    cursor: move;
}

.wine-card.dragging {
    opacity: 0.5;
}

.wine-card.unavailable,
.plateau-card.unavailable {
    opacity: 0.6;
}

/* Wine Image Box */
.wine-image-box {
    width: 80px;
    height: 80px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    margin-right: 1rem;
}

.wine-box-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wine-box-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.wine-box-emoji {
    font-size: 2.5rem;
}

/* Event Cards */
.event-card-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.event-card-left {
    flex: 1;
}

.event-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f9f9f9;
    border-radius: 8px 8px 0 0;
    display: block;
}

.event-card-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #888 0%, #666 100%);
    border-radius: 8px 8px 0 0;
}

.event-stats {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}

.event-stat-badge {
    background: #e8e8e8;
    color: #666;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.event-stat-badge.emails {
    background: #e8e8e8;
    color: #666;
}

.event-date {
    font-size: 0.85rem;
    color: #666;
    margin: 0.5rem 0;
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.empty-state-subtitle {
    font-size: 1rem;
    color: #888;
    margin-bottom: 1.5rem;
}

.drag-handle {
    font-size: 1.2rem;
    color: var(--text-light);
    cursor: grab;
    padding: 0.5rem;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.wine-content {
    flex: 1;
}

.wine-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.wine-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.wine-category {
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category colors - neutral for base */
.category-red { background: #e8e8e8; color: #666; }
.category-white { background: #e8e8e8; color: #666; }
.category-rose { background: #e8e8e8; color: #666; }
.category-sparkling { background: #e8e8e8; color: #666; }
.category-dessert { background: #e8e8e8; color: #666; }
.category-port { background: #e8e8e8; color: #666; }
.category-cider { background: #e8e8e8; color: #666; }

.wine-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.4;
    margin: 0.5rem 0;
}

.wine-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.wine-price,
.plateau-price {
    font-weight: 600;
    color: #666666;
}

.wine-vintage,
.wine-alcohol {
    color: var(--text-light);
}

.wine-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Plateau Cards */
.plateau-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.plateau-image {
    width: 80px;
    height: 60px;
    background: linear-gradient(135deg, #888, #666);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.plateau-info {
    flex: 1;
    margin-left: 1rem;
}

.plateau-names {
    margin-bottom: 0.5rem;
}

.plateau-name-fr {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
}

.plateau-name-en {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.plateau-descriptions {
    margin: 1rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.description-fr {
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.4;
}

.description-en {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    font-style: italic;
}

.plateau-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.plateau-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.quantity-range {
    background: #888;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.plateau-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =============================================
 * TOGGLE SWITCHES
 * ============================================= */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success-green);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    user-select: none;
}

/* ==========================================
   REPORTS DASHBOARD - Enhanced Styles
   ========================================== */

/* Reports Filter Tabs - 5 columns */
.reports-filter-tabs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.reports-filter-tabs .filter-tab {
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
}

/* Report Group Headers */
.report-group {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.08), rgba(102, 102, 102, 0.02));
    border-radius: 8px;
    border-left: 4px solid var(--brand-primary);
}

.report-group:first-child {
    margin-top: 0;
}

.report-group h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Report Card - Compact Version */
.report-card-compact {
    background: var(--bg-white);
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 120px;
}

.report-card-compact:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.report-card-compact .report-icon {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.report-card-compact .report-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.report-card-compact .report-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-primary);
    line-height: 1.2;
}

.report-card-compact .report-value.text-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Sparkline placeholder */
.report-sparkline {
    width: 100%;
    height: 30px;
    background: linear-gradient(90deg, 
        rgba(102, 102, 102, 0.1) 0%, 
        rgba(102, 102, 102, 0.3) 30%, 
        rgba(102, 102, 102, 0.2) 60%, 
        rgba(102, 102, 102, 0.4) 100%);
    border-radius: 4px;
    margin-top: 0.5rem;
}

/* Reports Grid - Adjusted for compact cards */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .reports-filter-tabs {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .reports-filter-tabs {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reports-filter-tabs .filter-tab:last-child {
        grid-column: span 2;
    }
}

/* ==========================================
   REPORTS - Draggable Group Structure
   ========================================== */

/* Container for draggable groups */
.reports-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Each group wrapper (draggable unit) */
.report-group-wrapper {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: grab;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.report-group-wrapper:hover {
    box-shadow: var(--shadow-md);
}

.report-group-wrapper.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    cursor: grabbing;
}

/* Group header (with drag handle) */
.report-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(102, 102, 102, 0.06), rgba(102, 102, 102, 0.02));
    border-bottom: 1px solid var(--border-light);
}

.report-group-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Drag handle */
.drag-handle {
    color: var(--text-light);
    font-size: 1.2rem;
    cursor: grab;
    user-select: none;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.report-group-wrapper:hover .drag-handle {
    opacity: 1;
}

/* Cards grid inside each group */
.report-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

/* Remove old .report-group style (now using wrapper) */
.report-group {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .report-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1rem;
    }
    
    .report-group-header {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .report-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ========================================
   EMAIL CARDS
======================================== */

.emails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.email-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 4px solid #666666;
}

.email-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.email-card-customizable {
    border-left-color: var(--brand-primary, #666666);
}

.email-card-system {
    border-left-color: #888888;
    opacity: 0.75;
}

.email-card-icon {
    width: 50px;
    height: 50px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.email-card-content {
    flex: 1;
    min-width: 0;
}

.email-card-title {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333333;
}

.email-card-description {
    margin: 0;
    font-size: 0.875rem;
    color: #666666;
    line-height: 1.4;
}

.email-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.email-card-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #f5f5f5;
    color: #666666;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

/* Bilingual inputs in modal */
.bilingual-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.input-with-flag {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.input-with-flag .flag-label {
    flex-shrink: 0;
    padding-top: 0.625rem;
    font-size: 1.25rem;
}

.input-with-flag .form-input {
    flex: 1;
}

.email-section-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.email-section-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* ========================================
   PREVIEW MODAL - Core (Mobile First)
   Used by: Emails, Wine Menu, Events
======================================== */

#previewModal {
    z-index: 1010;
}

.preview-modal-content {
    max-width: 420px;
    width: 95%;
    height: 95vh;
    max-height: none;
    display: flex;
    flex-direction: column;
}

.preview-modal-content .modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.preview-modal-content .modal-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.preview-lang-toggle {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    margin-right: 1rem;
}

.preview-lang-toggle .btn-xs {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background: #f5f5f5;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-lang-toggle .btn-xs.active {
    background: #333333;
    color: #ffffff;
    border-color: #333333;
}

.preview-lang-toggle .btn-xs:hover:not(.active) {
    background: #e8e8e8;
}

.preview-modal-body {
    flex: 1;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    background: #f5f5f5;
}

.preview-device-frame {
    width: 375px;
    height: 100%;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

/* Responsive - Full width on small screens */
@media (max-width: 480px) {
    .preview-modal-content {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        max-height: none;
        border-radius: 0;
    }
    
    .preview-device-frame {
        width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

/* ========================================
   EMAIL CARDS - Responsive
======================================== */

@media (max-width: 640px) {
    .emails-grid {
        grid-template-columns: 1fr;
    }
    
    .email-card {
        flex-direction: column;
        text-align: center;
    }
    
    .email-card-icon {
        margin: 0 auto;
    }
    
    .email-card-actions {
        flex-direction: row;
        width: 100%;
        justify-content: center;
    }
}

/* =============================================
 * ICON BUTTONS
 * ============================================= */

.icon-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.edit-btn {
    background: var(--info-blue);
    color: var(--text-white);
}

.edit-btn:hover {
    background: #666666;
    transform: scale(1.05);
}

.delete-btn {
    background: var(--danger-red);
    color: var(--text-white);
}

.delete-btn:hover {
    background: #777777;
    transform: scale(1.05);
}

/* =============================================
 * PREVIEW PANEL
 * ============================================= */

.preview-panel {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: var(--text-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 2rem;
}

.preview-panel h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.preview-content {
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
}

/* =============================================
 * LOADING STATES
 * ============================================= */

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--brand-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =============================================
 * WINE & PLATEAU MODALS
 * ============================================= */

.wine-modal,
.plateau-modal {
    max-width: 700px;
    max-height: 90vh;
}

.modal-body form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.modal-body .form-group {
    margin-bottom: 0;
}

.modal-body .form-grid {
    margin-bottom: 0;
}

.modal-title {
    margin: 0;
    font-size: 1.5rem;
    color: #1e293b;
    flex: 1;
    min-width: 200px;
}

.auth-submit,
.code-verify-btn,
.resend-btn {
    min-width: 140px;
    white-space: nowrap;
    padding: 0.75rem 1.5rem;
    color: #000000;
}

.super-admin-item .nav-label {
    font-size: 0.9rem;
}

/* Live Data Indicator */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: #28a745;
    margin-left: 8px;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #28a745;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

/* Settings group */
.settings-group label {
    min-width: 180px;
    font-size: 0.95rem;
}

.form-select {
    font-size: 0.95rem;
}

/* ========================================
   TASTING SIDE-BY-SIDE LAYOUT
   ======================================== */

.tasting-layout,
.event-builder-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    align-items: start;
    height: calc(100vh - 180px);
    overflow: hidden;
}

.tasting-form-panel,
.event-form-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    height: 100%;
    padding-right: 12px;
}

.tasting-preview-panel,
.event-preview-panel {
    position: sticky;
    top: 0;
    background: var(--bg-secondary, #f8f9fa);
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--border-color, #e5e7eb);
    height: fit-content;
    max-height: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.tasting-preview-panel .preview-header,
.event-preview-panel .preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tasting-preview-panel .preview-header h3,
.event-preview-panel .preview-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.tasting-preview-panel .preview-device-frame,
.event-preview-panel .preview-device-frame {
    background: #1a1a1a;
    border-radius: 24px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.tasting-preview-panel .preview-iframe,
.event-preview-panel .preview-iframe {
    width: 100%;
    height: calc(100vh - 280px);
    min-height: 500px;
    border: none;
    border-radius: 18px;
    background: white;
    display: block;
}

.mobile-preview-btn-container {
    display: none;
    padding: 16px;
    text-align: center;
}

/* Responsive: Stack on mobile */
@media (max-width: 1024px) {
    .tasting-layout {
        grid-template-columns: 1fr;
    }
    
    .tasting-preview-panel {
        display: none;
    }
    
    .mobile-preview-btn-container {
        display: block;
    }
}

/* Tasting settings card style */
.settings-group-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

/* Card wrapper for multiple settings-groups */
.settings-card-wrapper {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.settings-card-wrapper .settings-group {
    margin-bottom: 1.5rem;
}

.settings-card-wrapper .settings-group:last-child {
    margin-bottom: 0;
}

/* =============================================
 * EVENT BUILDER MODAL - Additional Styles
 * (Core layout shared with tasting above)
 * ============================================= */

.event-builder-modal {
    max-width: 1400px;
    width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
}

.event-builder-body {
    flex: 1;
    overflow: hidden;
    padding: 1.5rem;
}

.modal-header .preview-lang-toggle {
    display: flex;
    gap: 4px;
    margin-left: auto;
    margin-right: 16px;
}

.modal-header .preview-lang-toggle .btn-xs {
    padding: 4px 10px;
    font-size: 11px;
    min-width: 36px;
}

.modal-header .preview-lang-toggle .btn-xs.active {
    background: var(--brand-primary);
    color: white;
}

@media (max-width: 1024px) {
    .event-builder-layout {
        grid-template-columns: 1fr;
    }
    
    .event-preview-panel {
        display: none;
    }
}

/* Upload preview thumbnail */
.upload-preview-img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    margin-bottom: 10px;
}

/* =============================================
 * TOAST NOTIFICATIONS
 * ============================================= */

.toast-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success-green);
    color: #333;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    font-weight: 500;
    z-index: 2000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast-notification.error {
    background: var(--danger-red);
    color: white;
}

/* Modal animations */
.modal-overlay {
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active .modal-content {
    animation: slideUp 0.3s ease;
}

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

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

/* Modal body scrolling */
.modal-body {
    overflow-y: auto;
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

/* Form actions at bottom of modal */
.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Email state */
#emailState {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#waitingState {
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

/* Loading Spinner */
.preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #64748b;
}

.preview-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.preview-loading-text {
    margin-top: 16px;
    font-size: 14px;
}

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

/* =============================================
 * EVENT CARDS - UNIFORM BOX LAYOUT
 * ============================================= */

.event-card {
    flex-direction: column;
    margin-top: 10px;
    margin-bottom: 10px;
}

.event-dates-compact {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.5rem 0 1rem 0;
}

.event-boxes-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.event-box {
    width: 120px;
    height: 120px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.event-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.event-box-image {
    padding: 0;
}

.event-box-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.event-box-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #888 0%, #666 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.event-box-emoji {
    font-size: 3.5rem;
}

.event-box-qr {
    padding: 0.75rem;
    cursor: default;
}

.event-code-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-link {
    background: transparent;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.btn-link:hover {
    color: white;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.event-box-qr-container {
    gap: 0.5rem;
    border: 2px solid #e0e0e0;
}

.event-qr-download-btn {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: none;
    background: var(--brand-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-qr-download-btn:hover {
    background: #555555;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.event-qr-download-btn:active {
    transform: translateY(0);
}

.event-box-stat {
    gap: 0rem;
    border: 2px solid #e0e0e0;
}

.event-box-icon {
    font-size: 2rem;
}

.event-box-number {
    font-size: 2rem;
    font-weight: 700;
    color: #333333;
}

.event-box-label {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    text-align: center;
}

.event-box-action {
    gap: 0rem;
    border: 2px solid #e0e0e0;
}

.event-box-btn {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.event-box-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.event-box-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.event-box-btn .event-box-emoji {
    font-size: 2rem;
}

.event-box-btn-text {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* =============================================
 * DRAW WINNER MODAL
 * ============================================= */

.draw-winner-modal {
    max-width: 600px;
    min-height: 400px;
}

.draw-animation-container {
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8e8 0%, #ccc 100%);
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.draw-spinning {
    font-size: 5rem;
    animation: gentleBounce 2s ease-in-out infinite;
}

.draw-spinning.spinning {
    animation: spinAndBounce 0.5s linear infinite;
}

@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes spinAndBounce {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(360deg) scale(1); }
}

.winner-display {
    display: none;
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #e8e8e8 0%, #ccc 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: fadeInScale 0.5s ease;
}

.winner-display.show {
    display: block;
}

.winner-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.winner-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.winner-info {
    background: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.winner-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.winner-email {
    font-size: 1.1rem;
    color: #333;
    font-family: monospace;
    margin: 0;
    word-break: break-all;
}

#drawModalActions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#confirmButton:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =============================================
 * HAMBURGER MENU (Mobile Only)
 * ============================================= */

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-right: 1rem;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-overlay.active {
    display: block;
}

/* =============================================
 * SUPER ADMIN: ALL WINERIES SECTION
 * ============================================= */

.winery-filter-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.filter-tab {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.filter-tab:hover {
    background: rgba(100, 100, 100, 0.05);
    color: var(--brand-primary);
}

.filter-tab.active {
    background: var(--brand-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(100, 100, 100, 0.3);
}

.filter-tab .tab-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.filter-tab.active .tab-count {
    background: rgba(255, 255, 255, 0.3);
}

.filter-tab.active .french-text,
.filter-tab.active .english-text {
    color: inherit;
}

.wineries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.admins-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.super-admin-email {
    word-break: break-all;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.winery-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.winery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: var(--brand-primary);
}

.winery-card.archived {
    opacity: 0.7;
    background: rgba(248, 248, 248, 0.95);
}

.winery-id-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.qr-code-canvas {
    width: 140px;
    height: 140px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qr-code-canvas img {
    width: 90%;
    height: 90%;
    display: block !important;
}

.qr-code-canvas canvas {
    display: none !important;
}

.clickable-logo {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(100, 100, 100, 0.2);
}

.clickable-logo:active {
    transform: scale(0.98);
}

.winery-card-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.winery-card-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.winery-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.winery-card-info {
    flex: 1;
    min-width: 0;
}

.winery-card-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.winery-card-slug {
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: monospace;
    background: var(--bg-light);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    display: inline-block;
}

.winery-card-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.winery-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    background: white;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.winery-action-btn:hover {
    background: var(--brand-primary);
    color: white;
    transform: scale(1.1);
}

.winery-card-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.contact-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.winery-card-rules {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.rule-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-light);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.rule-badge .rule-icon {
    font-size: 0.85rem;
}

.rule-badge .french-text,
.rule-badge .english-text {
    font-size: 0.75rem;
}

.winery-status-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: var(--success-green);
    color: #333;
}

.status-archived {
    background: #f3f4f6;
    color: #6b7280;
}

/* =============================================
 * SESSION WARNING BANNER
 * ============================================= */

.session-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.session-banner.visible {
    transform: translateY(0);
}

.session-banner.warning {
    background: #e8e8e8;
    color: #666;
    border-bottom: 2px solid #999;
}

.session-banner.expired {
    background: #e0e0e0;
    color: #444;
    border-bottom: 2px solid var(--danger-red);
}

.session-banner-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-banner-countdown {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    min-width: 3.5rem;
}

.session-banner-btn {
    padding: 0.4rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.session-banner.warning .session-banner-btn {
    background: #666;
    color: #fff;
}

.session-banner.warning .session-banner-btn:hover {
    background: #555;
}

.session-banner.expired .session-banner-btn {
    background: var(--danger-red);
    color: #fff;
}

.session-banner.expired .session-banner-btn:hover {
    background: #777;
}

body.session-banner-active {
    padding-top: 52px;
}

body.session-banner-active .winery-header {
    top: 52px;
}

/* =============================================
 * ADDON CHECKBOX LABELS & DATE FIELDS
 * ============================================= */

.section-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.checkbox-label {
    display: block;
    margin-bottom: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

.feature-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.events-date-container {
    margin-left: 0rem;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--brand-primary);
}

.events-date-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.events-date-fields .form-group {
    margin-bottom: 0;
}

.events-date-fields label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.events-date-fields .form-input {
    font-size: 0.875rem;
    padding: 0.6rem;
}

.events-date-note {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.8125rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* =============================================
 * DRAW WINNER - THREE BUTTON LAYOUT
 * ============================================= */

.draw-button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 30px 0 20px 0;
}

.draw-mode-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    font-family: inherit;
}

.draw-mode-btn:hover:not(:disabled) {
    border-color: var(--brand-primary);
    background: linear-gradient(135deg, #f8f8f8 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 100, 100, 0.15);
}

.draw-mode-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(100, 100, 100, 0.1);
}

.draw-mode-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f3f4f6;
}

.draw-btn-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: -0.01em;
}

.draw-btn-count {
    font-size: 20px;
    font-weight: 700;
    color: var(--brand-primary);
    margin-top: 4px;
}

.draw-mode-btn:disabled .draw-btn-count {
    color: #9ca3af;
}

.btn-confirm-winner {
    width: 100%;
    padding: 18px 24px;
    margin-top: 10px;
    background: var(--success-green);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-confirm-winner:hover:not(:disabled) {
    background: var(--success-dark-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 100, 100, 0.3);
}

.btn-confirm-winner:active:not(:disabled) {
    transform: translateY(0);
}

.btn-confirm-winner:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #9ca3af;
}

/* ========================================
   SELECTOR LIST (Preview Popups)
   Used by: Event selector, future selectors
======================================== */

.selector-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selector-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    font-size: 0.9375rem;
}

.selector-item:hover {
    background: var(--bg-white);
    border-color: var(--brand-primary);
}

.selector-item-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.selector-item-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* =============================================
 * RESPONSIVE DESIGN
 * ============================================= */

/* Winery ID Card Responsive */
@media (max-width: 768px) {
    .winery-id-card {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .winery-id-left {
        flex-direction: column;
        width: 100%;
    }
    
    .winery-id-name {
        font-size: 1.5rem;
    }
    
    .winery-id-qr {
        width: 100%;
    }
}

/* Modal Responsive */
@media (max-width: 768px) {
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-language-switcher {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        flex-shrink: 0;
    }
    
    .winery-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .winery-select {
        width: 100%;
        min-width: auto;
        max-width: none;
    }
    
    .wine-modal,
    .plateau-modal {
        max-width: 95%;
        margin: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
    
    .toast-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 640px) {
    .auth-modal {
        min-width: 320px;
        width: 95%;
    }
}

/* Event Cards Responsive */
@media (max-width: 768px) {
    .event-boxes-row {
        justify-content: center;
    }
    
    .event-box {
        width: 100px;
        height: 100px;
    }
    
    .event-box-emoji {
        font-size: 2.5rem;
    }
    
    .event-box-icon {
        font-size: 1.5rem;
    }
    
    .event-box-number {
        font-size: 1.5rem;
    }
    
    .event-card-row {
        flex-direction: column;
        gap: 1rem;
    }

    .event-card-section {
        width: 100%;
    }

    .event-stats-section {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }

    .event-info-section {
        align-items: center;
        text-align: center;
    }

    .event-actions-section {
        flex-direction: row;
        justify-content: center;
    }
}

/* Main Layout Responsive */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        top: 120px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 74px);
        background: var(--bg-white);
        border-right: 1px solid var(--border-light);
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 1000;
        padding-top: 1rem;
    }
    
    .sidebar.mobile-open {
        left: 0;
    }
    
    .sidebar-nav {
        flex-direction: column;
        padding: 0;
    }
    
    .nav-label {
        display: inline;
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
        min-height: auto;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .wine-card {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wine-image-box {
        width: 80px;
        height: 80px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        overflow: hidden;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: white;
    }

    .wine-box-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .wine-box-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    }

    .wine-box-emoji {
        font-size: 2.5rem;
    }

    .wine-actions {
        justify-content: flex-end;
        margin-top: 1rem;
    }
}

/* Header Responsive */
@media (max-width: 768px) {
    .winery-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.5rem;
    }
    
    .winery-branding {
        grid-column: 1 / 2;
        grid-row: 2 / 3;
        gap: 0.5rem;
    }
    
    .winery-name {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }
    
    .winery-subtitle {
        display: none;
    }
    
    .header-info {
        grid-column: 3 / 4;
        grid-row: 1 / 2;
        flex-wrap: wrap;
    }

    .sidebar-section-label {
        font-size: 0.7rem;
        padding: 0.75rem 1rem;
        line-height: 1.2;
    }

    body[data-language="en"] .nav-label {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

@media (max-width: 340px) {
    .winery-logo {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .winery-name h1 {
        font-size: 1rem;
    }
}

/* Wineries Grid Responsive */
@media (max-width: 768px) {
    .wineries-grid {
        grid-template-columns: 1fr;
    }
    
    .winery-filter-tabs {
        flex-direction: column;
    }
}

/* Events Date Fields Responsive */
@media (max-width: 768px) {
    .events-date-container {
        margin-left: 0;
        margin-top: 0.75rem;
    }
    
    .events-date-fields {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* Wineries Grid Responsive */
@media (max-width: 768px) {
    .admins-grid {
        grid-template-columns: 1fr;
    }
    
    .super-admin-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .super-admin-info {
        min-width: 100%;
    }
}

/* =============================================
 * FEATURE WARNING MODAL
 * Reusable warning for inactive features
 * ============================================= */

.feature-warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.feature-warning-overlay.active {
    opacity: 1;
    visibility: visible;
}

.feature-warning-modal {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 90%;
    padding: 2rem;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.feature-warning-overlay.active .feature-warning-modal {
    transform: scale(1);
}

.feature-warning-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    padding: 0.25rem;
    transition: color 0.2s ease;
}

.feature-warning-close:hover {
    color: var(--text-dark);
}

.feature-warning-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.feature-warning-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.feature-warning-message {
    text-align: center;
    color: var(--text-medium);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.feature-warning-cta {
    display: flex;
    justify-content: center;
}

.feature-warning-cta .btn {
    min-width: 120px;
}

/* === SERVICE OPTIONS === */
.service-option-row {
    display: flex;
    flex-direction: column;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
}

.service-option-row .checkbox-label {
    font-weight: 600;
    margin-bottom: 8px;
}

.service-option-config {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-left: 28px;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group-inline label {
    font-size: 12px;
    color: var(--text-light);
    min-width: 35px;
}

.form-input-sm {
    padding: 6px 10px;
    font-size: 13px;
    width: 150px;
}

.settings-group-description {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 15px;
}

/* Hide config when checkbox unchecked (controlled by JS) */
.service-option-row.disabled .service-option-config {
    opacity: 0.4;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .service-option-config {
        flex-direction: column;
        padding-left: 0;
    }
    
    .form-input-sm {
        width: 100%;
    }
}

/* === DYNAMIC SERVICE OPTIONS (Flights) === */
.service-option-group {
    margin-bottom: 15px;
}

.service-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.btn-add-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--brand-primary);
    background: var(--bg-white);
    color: var(--brand-primary);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-add-sm:hover {
    background: var(--brand-primary);
    color: var(--bg-white);
}

.flight-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.flight-option-row .form-input-xs {
    width: 60px;
    padding: 6px 8px;
    font-size: 13px;
    text-align: center;
}

.flight-option-row .form-input-sm {
    flex: 1;
    min-width: 120px;
}

.btn-remove-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: var(--danger-red);
    color: var(--text-white);
    font-size: 14px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-remove-sm:hover {
    opacity: 1;
}

.flight-option-row.disabled {
    opacity: 0.5;
}

.flight-option-row.disabled .form-input-xs,
.flight-option-row.disabled .form-input-sm {
    pointer-events: none;
}