/**
 * Restaurant House — Dashboard Frontend CSS
 * Miroir exact du dashboard admin WP
 * Prefixe : .rhd-
 * @since 1.4.0
 */

/* ========================================
   1. VARIABLES — Identiques a l'admin
======================================== */
:root {
    --rhd-primary: #8B5CF6;
    --rhd-primary-dark: #7C3AED;
    --rhd-primary-darker: #6D28D9;
    --rhd-secondary: #EC4899;
    --rhd-secondary-dark: #DB2777;
    --rhd-success: #10B981;
    --rhd-success-dark: #059669;
    --rhd-warning: #F59E0B;
    --rhd-warning-dark: #D97706;
    --rhd-danger: #EF4444;
    --rhd-danger-dark: #DC2626;
    --rhd-info: #3B82F6;
    --rhd-info-dark: #2563EB;
    --rhd-gray-50: #F9FAFB;
    --rhd-gray-100: #F3F4F6;
    --rhd-gray-200: #E5E7EB;
    --rhd-gray-300: #D1D5DB;
    --rhd-gray-400: #9CA3AF;
    --rhd-gray-500: #6B7280;
    --rhd-gray-600: #4B5563;
    --rhd-gray-700: #374151;
    --rhd-gray-800: #1F2937;
    --rhd-btn-complete: #10B981;
    --rhd-btn-absent: #374151;
    --rhd-btn-delete: #991B1B;
    --rhd-spacing-xs: 4px;
    --rhd-spacing-sm: 8px;
    --rhd-spacing-md: 12px;
    --rhd-spacing-lg: 16px;
    --rhd-spacing-xl: 20px;
    --rhd-spacing-2xl: 24px;
    --rhd-radius-sm: 8px;
    --rhd-radius-md: 12px;
    --rhd-radius-lg: 16px;
    --rhd-radius-xl: 20px;
    --rhd-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --rhd-shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --rhd-shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --rhd-shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    --rhd-transition-fast: 0.15s ease;
    --rhd-transition-normal: 0.3s ease;
    --rhd-transition-slow: 0.5s ease;
    --rhd-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ========================================
   2. BASE & RESET SCOPE
======================================== */
.rhd-wrapper {
    font-family: var(--rhd-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--rhd-gray-800);
    /* Break out of theme container to use full viewport width */
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    padding: 32px 40px;
    box-sizing: border-box;
}
.rhd-wrapper * { box-sizing: border-box; }
.rhd-wrapper img { max-width: 100%; height: auto; }

/* ========================================
   3. LOGIN (frontend-only)
======================================== */
.rhd-login {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}
.rhd-login-card {
    background: white;
    border: 2px solid var(--rhd-gray-200);
    border-radius: var(--rhd-radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--rhd-shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.rhd-login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rhd-primary), #A855F7);
}
.rhd-login-title {
    font-size: 24px;
    margin: 0 0 8px;
    color: var(--rhd-gray-800);
    font-weight: 700;
}
.rhd-login-subtitle {
    color: var(--rhd-gray-500);
    margin: 0 0 24px;
}
.rhd-login-form .rhd-form-group { text-align: left; margin-bottom: 16px; }
.rhd-login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--rhd-gray-700);
}
.rhd-login-error {
    background: #fef2f2;
    color: var(--rhd-danger);
    padding: 10px;
    border-radius: var(--rhd-radius-sm);
    margin-bottom: 16px;
    font-size: 13px;
    border: 1px solid #fecaca;
}

/* ========================================
   4. BUTTONS — Identiques a l'admin
======================================== */
.rhd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--rhd-radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--rhd-transition-fast);
    white-space: nowrap;
    text-decoration: none;
    font-family: var(--rhd-font);
    line-height: 1.4;
}
.rhd-btn:hover { transform: translateY(-1px); box-shadow: var(--rhd-shadow-md); }
.rhd-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.rhd-btn-primary {
    background: linear-gradient(135deg, var(--rhd-primary), var(--rhd-primary-dark));
    color: white;
}
.rhd-btn-primary:hover {
    background: linear-gradient(135deg, var(--rhd-primary-dark), var(--rhd-primary-darker));
}
.rhd-btn-secondary {
    background: white;
    color: var(--rhd-gray-700);
    border: 2px solid var(--rhd-gray-300);
}
.rhd-btn-secondary:hover { background: var(--rhd-gray-50); border-color: var(--rhd-primary); }
.rhd-btn-success {
    background: linear-gradient(135deg, var(--rhd-success), var(--rhd-success-dark));
    color: white;
}
.rhd-btn-warning {
    background: linear-gradient(135deg, var(--rhd-warning), var(--rhd-warning-dark));
    color: white;
}
.rhd-btn-danger {
    background: linear-gradient(135deg, var(--rhd-danger), var(--rhd-danger-dark));
    color: white;
}
.rhd-btn-outline {
    background: transparent;
    color: var(--rhd-gray-700);
    border: 2px solid var(--rhd-gray-300);
}
.rhd-btn-outline:hover { background: var(--rhd-gray-50); border-color: var(--rhd-primary); }
.rhd-btn-reset {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0 !important;
    border-radius: 50%;
    background: var(--rhd-gray-200);
    color: var(--rhd-gray-600);
    border: 2px solid var(--rhd-gray-300);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.rhd-btn-reset:hover {
    background: var(--rhd-danger);
    color: white;
    border-color: var(--rhd-danger-dark);
    transform: rotate(90deg);
}
.rhd-btn-small { padding: 6px 12px; font-size: 12px; }
.rhd-btn-full { width: 100%; }

/* ========================================
   5. INPUTS — Identiques a l'admin
======================================== */
.rhd-input, .rhd-select, .rhd-textarea {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--rhd-gray-300);
    border-radius: var(--rhd-radius-sm);
    font-size: 13px;
    font-family: var(--rhd-font);
    background: white;
    color: var(--rhd-gray-700);
    transition: all var(--rhd-transition-fast);
    box-sizing: border-box;
}

/* ==========================================================
   MODAL FORM ISOLATION — Override any WP theme interference
   Scoped under .rhd-modal-overlay for maximum specificity.
   ========================================================== */

/* Force grid layout on modal form grids */
.rhd-modal-overlay .rhd-form-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
    align-items: start !important;
}

/* Force flex column on modal form groups (exclude dynamically hidden sections) */
.rhd-modal-overlay .rhd-form-group:not(.rhd-cancel-fields):not(.rhd-cancel-info) {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
}

/* Force ALL form elements to fill their grid cell + uniform appearance */
.rhd-modal-overlay .rhd-form-group input[type="text"],
.rhd-modal-overlay .rhd-form-group input[type="email"],
.rhd-modal-overlay .rhd-form-group input[type="tel"],
.rhd-modal-overlay .rhd-form-group input[type="number"],
.rhd-modal-overlay .rhd-form-group input[type="date"],
.rhd-modal-overlay .rhd-form-group select,
.rhd-modal-overlay .rhd-form-group textarea,
.rhd-modal-overlay .rhd-form-group .rhd-input,
.rhd-modal-overlay .rhd-form-group .rhd-select,
.rhd-modal-overlay .rhd-form-group .rhd-textarea,
.rhd-modal-overlay .rhd-form-group .rhd-readonly-text {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: auto !important;
    /* Uniform thickness: same border, padding, font on all fields */
    border: 1px solid var(--rhd-gray-300) !important;
    border-radius: var(--rhd-radius-sm) !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    font-family: var(--rhd-font) !important;
    line-height: 1.4 !important;
}

/* Disable the 3px border-left valid indicator inside modals (layout-shifting) */
.rhd-modal-overlay .rhd-input[required]:valid,
.rhd-modal-overlay .rhd-form-group input[required]:valid {
    border-left: 1px solid var(--rhd-gray-300) !important;
}

/* Ensure selects keep their custom appearance + extra padding for arrow */
.rhd-modal-overlay .rhd-form-group select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    padding-right: 40px !important;
}

/* Datepicker inputs: extra padding for calendar icon */
.rhd-modal-overlay .rhd-datepicker-add,
.rhd-modal-overlay .rhd-datepicker-edit {
    padding-right: 40px !important;
}

/* Textareas: allow resize */
.rhd-modal-overlay .rhd-form-group textarea {
    resize: vertical !important;
    min-height: 60px !important;
}

/* Readonly fields: slightly different bg but same dimensions */
.rhd-modal-overlay .rhd-form-group input[readonly],
.rhd-modal-overlay .rhd-form-group textarea[readonly],
.rhd-modal-overlay .rhd-form-group .rhd-readonly-text {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: default !important;
    border-color: var(--rhd-gray-300) !important;
}
.rhd-input:focus, .rhd-select:focus, .rhd-textarea:focus {
    outline: none;
    border-color: var(--rhd-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.rhd-input[required]:valid { border-left: 3px solid var(--rhd-success); }
.rhd-textarea { resize: vertical; min-height: 60px; }
.rhd-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

/* ========================================
   6. HEADER
======================================== */
.rhd-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.rhd-title {
    font-size: 24px;
    margin: 0;
    font-weight: 700;
    color: var(--rhd-gray-800);
}
.rhd-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Auto-refresh container */
.rhd-header-actions .rhd-select {
    width: auto;
    padding: 6px 32px 6px 10px;
    border: 2px solid var(--rhd-gray-300);
    border-radius: var(--rhd-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rhd-primary);
    background-color: white;
}
.rhd-header-actions .rhd-select:focus {
    border-color: var(--rhd-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* ========================================
   7. MENU MANAGEMENT — 3 colonnes sur une ligne
======================================== */
.rhd-menu-management {
    background: #fff;
    padding: 15px;
    margin: 0 0 var(--rhd-spacing-xl) 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.rhd-menu-management h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: var(--rhd-gray-700);
}
.rhd-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.rhd-menu-item {
    padding: 12px;
    border-left: 4px solid #00a0d2;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    gap: 10px;
}
.rhd-menu-label {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--rhd-gray-700);
    white-space: nowrap;
    font-size: 13px;
}
.rhd-menu-label .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: var(--rhd-gray-500);
}
.rhd-menu-status {
    font-size: 12px;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rhd-menu-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

/* ========================================
   8. STATS CARDS — Gradient border, gradient text
======================================== */
.rhd-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.rhd-stat-card {
    background: white;
    border: 1px solid var(--rhd-gray-200);
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all var(--rhd-transition-normal);
    box-shadow: var(--rhd-shadow-sm);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}
.rhd-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--rhd-primary), #A855F7);
}
.rhd-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--rhd-shadow-md);
    border-color: var(--rhd-primary);
}
.rhd-stat-card.active {
    border-color: var(--rhd-primary);
    background: linear-gradient(135deg, #faf5ff, #f5f3ff);
    transform: translateY(-1px);
}
.rhd-stat-label {
    font-size: 0.7rem;
    color: var(--rhd-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 2px;
}
.rhd-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--rhd-primary), #A855F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.rhd-stat-sublabel {
    font-size: 0.6rem;
    color: var(--rhd-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}

/* ========================================
   9. PENDING ALERT — Animated glow
======================================== */
.rhd-pending-alert {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: var(--rhd-radius-md);
    padding: 20px 24px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--rhd-shadow-md);
    animation: rhdAlertGlow 3s ease-in-out infinite;
}
.rhd-pending-icon {
    font-size: 2rem;
    flex-shrink: 0;
    animation: rhdAlertPulse 2s infinite;
}
.rhd-pending-alert span:not(.rhd-pending-icon) {
    flex: 1;
    color: #92400e;
    font-weight: 600;
}
@keyframes rhdAlertGlow {
    0%, 100% { box-shadow: var(--rhd-shadow-md); }
    50% { box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4); }
}
@keyframes rhdAlertPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Takeaway pending alert */
.rhd-takeaway-alert {
    background: linear-gradient(135deg, #ecfdf5, #bbf7d0);
    border: 2px solid #10B981;
    border-radius: var(--rhd-radius-md);
    padding: 20px 24px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--rhd-shadow-md);
    animation: rhdTakeawayGlow 3s ease-in-out infinite;
}
.rhd-takeaway-alert-icon {
    font-size: 2rem;
    flex-shrink: 0;
    animation: rhdAlertPulse 2s infinite;
}
.rhd-takeaway-alert span:not(.rhd-takeaway-alert-icon) {
    flex: 1;
    color: #065f46;
    font-weight: 600;
}
@keyframes rhdTakeawayGlow {
    0%, 100% { box-shadow: var(--rhd-shadow-md); }
    50% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4); }
}

/* Freed table module — single consolidated card */
#rhd-freed-tables-container:empty {
    display: none;
}
#rhd-freed-tables-container {
    margin-bottom: 24px;
}
.rhd-freed-module {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    border: 2px solid var(--rhd-danger);
    border-radius: var(--rhd-radius-md);
    padding: 20px 24px;
    box-shadow: var(--rhd-shadow-md);
    animation: rhdFreedTableGlow 3s ease-in-out infinite;
}
.rhd-freed-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.rhd-freed-module-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #991b1b;
}
.rhd-freed-module-title span {
    font-size: 1.3rem;
    animation: rhdAlertPulse 1.5s infinite;
}
.rhd-freed-module-dismiss {
    background: white;
    border: 2px solid var(--rhd-danger);
    color: var(--rhd-danger);
    border-radius: var(--rhd-radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 8px 18px;
    white-space: nowrap;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rhd-freed-module-dismiss:hover {
    background: var(--rhd-danger);
    color: white;
}
.rhd-freed-module-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rhd-freed-module-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255,255,255,0.6);
    border-radius: var(--rhd-radius-sm);
    font-size: 0.85rem;
    color: #991b1b;
    flex-wrap: wrap;
}
.rhd-freed-sep {
    color: #dca5a5;
    font-weight: 300;
}
.rhd-freed-tag {
    white-space: nowrap;
}
.rhd-freed-tag-table {
    font-weight: 700;
}
.rhd-freed-tag-service {
    font-weight: 700;
    color: #7f1d1d;
}
.rhd-freed-tag-party {
    font-weight: 600;
}
.rhd-freed-tag-name {
    font-weight: 400;
    font-style: italic;
}
@keyframes rhdFreedTableGlow {
    0%, 100% { box-shadow: var(--rhd-shadow-md); }
    50% { box-shadow: 0 4px 24px rgba(239, 68, 68, 0.4); }
}

/* Badge flottant tables liberees */
.rhd-freed-fab {
    position: fixed;
    bottom: 32px;
    right: 24px;
    display: none;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.45);
    cursor: pointer;
    z-index: 9990;
    transition: transform 0.2s, box-shadow 0.2s;
    animation: rhdFabPulse 2s ease-in-out infinite;
}
.rhd-freed-fab.visible {
    display: flex;
}
.rhd-freed-fab:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 28px rgba(220, 38, 38, 0.6);
}
.rhd-freed-fab-icon {
    font-size: 1.1rem;
    line-height: 1;
}
@keyframes rhdFabPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.45); }
    50% { box-shadow: 0 4px 28px rgba(220, 38, 38, 0.7); }
}

/* ========================================
   10. FILTERS — Labeled groups, gradient bg
======================================== */
.rhd-filters-bar {
    background: linear-gradient(135deg, #ffffff, var(--rhd-gray-50));
    border: 2px solid var(--rhd-gray-200);
    border-radius: var(--rhd-radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: var(--rhd-shadow-md);
}
/* Toggle button — hidden on desktop */
.rhd-filters-toggle {
    display: none;
}
.rhd-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
    padding-bottom: 12px;
}
.rhd-filter-group {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    flex-shrink: 0;
}
.rhd-filter-group.rhd-filter-narrow { min-width: 80px; }
.rhd-filter-group.rhd-filter-wide { min-width: 140px; }
.rhd-filter-group.rhd-filter-button {
    min-width: 80px;
    justify-content: flex-end;
}
.rhd-filter-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--rhd-gray-700);
    font-size: 0.85rem;
    white-space: nowrap;
}
.rhd-filter-group input,
.rhd-filter-group select {
    padding: 10px 12px;
    border: 2px solid var(--rhd-gray-300);
    border-radius: var(--rhd-radius-sm);
    font-size: 13px;
    background: white;
    color: var(--rhd-gray-700);
    transition: border-color var(--rhd-transition-normal), box-shadow var(--rhd-transition-normal);
    box-sizing: border-box;
    height: auto;
    line-height: normal;
}
.rhd-filter-group input:focus,
.rhd-filter-group select:focus {
    border-color: var(--rhd-primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}
.rhd-filter-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 32px;
    cursor: pointer;
}
.rhd-filter-group input::placeholder {
    color: var(--rhd-gray-400);
    font-style: italic;
}
/* Inline Filtrer + Reset buttons inside the filter row */
.rhd-filter-group.rhd-filter-actions-inline {
    min-width: auto;
    flex-shrink: 0;
    justify-content: flex-end;
}
.rhd-filter-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}
.rhd-filters-actions {
    display: flex;
    gap: 12px;
    border-top: 2px solid var(--rhd-gray-200);
    padding-top: 20px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
}

/* ========================================
   11. TABLE — Container shadow, centered headers
======================================== */
.rhd-bookings-container {
    margin-bottom: 32px;
}
.rhd-table-wrap {
    background: white;
    border-radius: var(--rhd-radius-md);
    box-shadow: var(--rhd-shadow-md);
    border: 1px solid var(--rhd-gray-200);
    overflow: hidden;
}
.rhd-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
/* Column widths (9 columns) — optimised for 1800px */
.rhd-table .rhd-col-date { width: 10%; }
.rhd-table .rhd-col-time { width: 6%; }
.rhd-table .rhd-col-client { width: 13%; }
.rhd-table .rhd-col-contact { width: 15%; }
.rhd-table .rhd-col-service { width: 7%; }
.rhd-table .rhd-col-party { width: 5%; }
.rhd-table .rhd-col-table { width: 13%; }
.rhd-table .rhd-col-status { width: 10%; }
.rhd-table .rhd-col-actions { width: 20%; }

.rhd-table th {
    background: linear-gradient(135deg, var(--rhd-gray-50), #f1f5f9);
    color: var(--rhd-gray-700);
    font-weight: 700;
    padding: 14px 10px;
    border-bottom: 3px solid var(--rhd-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    vertical-align: middle;
}
.rhd-table td {
    padding: 12px 8px;
    vertical-align: middle;
    border-bottom: 1px solid var(--rhd-gray-200);
    text-align: center;
    font-size: 13px;
}
.rhd-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
    transform: scale(1.002);
    transition: all var(--rhd-transition-fast);
}
.rhd-table th.rhd-col-contact,
.rhd-table td.rhd-col-contact {
    text-align: left;
    padding-left: 12px;
}
.rhd-table th.rhd-col-client,
.rhd-table td.rhd-col-client {
    text-align: center;
}
.rhd-table .rhd-col-actions {
    padding: 12px 10px;
    text-align: center;
    vertical-align: middle;
}

/* Empty state */
.rhd-empty {
    text-align: center;
    padding: 70px 24px;
    background-color: #f8f9fa;
    border: 2px dashed #d1d5db;
    border-radius: var(--rhd-radius-md);
    margin: 24px 0;
    color: var(--rhd-gray-500);
}
.rhd-empty-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1;
    opacity: 0.6;
}
.rhd-empty h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--rhd-gray-700);
}
.rhd-empty p {
    margin: 0;
    font-size: 1rem;
    color: var(--rhd-gray-600);
}
.rhd-loading {
    text-align: center;
    padding: 40px;
    color: var(--rhd-gray-500);
    font-size: 15px;
}

/* Contact links — compact two-line layout */
.rhd-contact {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}
.rhd-contact-line {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--rhd-primary);
    text-decoration: none;
    font-size: 12.5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.rhd-contact-line:hover { text-decoration: underline; }
.rhd-contact-icon {
    font-size: 13px;
    flex-shrink: 0;
}
.rhd-contact a {
    color: var(--rhd-primary);
    text-decoration: none;
    font-size: 12.5px;
}
.rhd-contact a:hover { text-decoration: underline; }

/* ========================================
   12. ACTION BUTTONS — Colored icon squares
======================================== */
/* Action container (desktop table) */
.rhd-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

/* Action button base — works in .rhd-actions, .rhd-booking-buttons, .rhd-booking-notes */
.rhd-action-btn {
    margin: 0;
    min-width: 36px;
    height: 36px;
    width: 36px;
    padding: 0;
    font-size: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    cursor: pointer;
    color: white;
    line-height: 1;
    background: none;
}
.rhd-action-btn .dashicons {
    color: white;
    font-size: 16px;
    line-height: 1;
    width: 16px;
    height: 16px;
    margin: 0;
}
.rhd-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Specific button colors */
.rhd-action-notes {
    background: var(--rhd-warning);
}
.rhd-action-notes.rhd-has-notes {
    background: var(--rhd-info);
}
.rhd-action-complete {
    background: var(--rhd-btn-complete);
}
.rhd-action-absent {
    background: var(--rhd-btn-absent);
}
.rhd-action-edit {
    background: var(--rhd-primary);
}
.rhd-action-cancel {
    background: var(--rhd-danger);
}
.rhd-action-confirm {
    background: var(--rhd-success);
}

/* ========================================
   13. BADGES & STATUS
======================================== */

/* Service badge */
.rhd-service-badge {
    padding: 10px 12px !important;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white;
    text-shadow: none;
    border: none;
    transition: all var(--rhd-transition-fast);
    text-align: center;
    box-sizing: border-box !important;
    line-height: normal !important;
    margin: 0 !important;
    vertical-align: middle;
}
.rhd-service-midi { background: #F59E0B; }
.rhd-service-soir { background: #1e3a8a; }
.rhd-service-takeaway { background: #10B981; }

/* Service text (plain, no badge) */
.rhd-service-text {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.rhd-service-text.rhd-service-midi { background: none; color: #D97706; }
.rhd-service-text.rhd-service-soir { background: none; color: #1e3a8a; }
.rhd-service-text.rhd-service-takeaway { background: none; color: #10B981; }

/* Time badge */
.rhd-time-badge {
    padding: 10px 12px !important;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white;
    background: var(--rhd-gray-700);
    border: none;
    box-sizing: border-box !important;
    line-height: normal !important;
    margin: 0 !important;
    vertical-align: middle;
}

/* Party size badge */
.rhd-party-size {
    background: rgb(150, 92, 245);
    color: white;
    padding: 10px 12px !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 36px;
    text-align: center;
    transition: all var(--rhd-transition-fast);
    border: none;
    text-shadow: none;
    line-height: normal !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    vertical-align: middle;
}

/* Table numbers */
.rhd-col-table {
    vertical-align: middle;
    text-align: center;
}
.rhd-table-nums {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #059669;
}
.rhd-table-sep {
    color: #a7f3d0;
    font-weight: 400;
}

/* Bouton demande avis Google */
.rhd-action-review {
    background: #f59e0b !important;
    color: #fff !important;
    border-color: #f59e0b !important;
    border-radius: 6px !important;
}
.rhd-action-review:hover {
    background: #d97706 !important;
    border-color: #d97706 !important;
}

/* Bouton attribuer table */
.rhd-assign-table-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px dashed #6366f1;
    background: rgba(99, 102, 241, 0.08);
    color: #6366f1;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}
.rhd-assign-table-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: #818cf8;
    color: #818cf8;
    transform: scale(1.1);
}

/* Status badges */
.rhd-status {
    padding: 10px 12px !important;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px;
    color: white;
    text-shadow: none;
    border: none;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--rhd-transition-fast);
    text-align: center;
    box-sizing: border-box !important;
    line-height: normal !important;
    cursor: pointer;
    margin: 0 !important;
    vertical-align: middle;
    white-space: nowrap;
}
.rhd-status:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.rhd-status-pending { background: var(--rhd-warning); }
.rhd-status-confirmed { background: var(--rhd-success); }
.rhd-status-completed { background: var(--rhd-gray-500); }
.rhd-status-cancelled { background: var(--rhd-danger); }
.rhd-status-absent { background: var(--rhd-gray-700); }

/* Occasion badge */
.rhd-occasion {
    font-size: 14px;
    margin-left: 4px;
}
.rhd-occasion-badge {
    font-size: 0.75rem;
    display: inline-block;
    margin-top: 2px;
}

/* ========================================
   14. MODALS — Purple header, form-grid
======================================== */
.rhd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--rhd-spacing-lg);
    box-sizing: border-box;
}
.rhd-modal {
    background: white;
    border-radius: var(--rhd-radius-lg);
    box-shadow: var(--rhd-shadow-xl);
    max-width: 800px;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    animation: rhdModalAppear var(--rhd-transition-normal) ease-out;
    position: relative;
    display: flex;
    flex-direction: column;
}
.rhd-modal-large { max-width: 1000px; }
.rhd-modal-small { max-width: 500px; }

@keyframes rhdModalAppear {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Modal header — Purple gradient */
.rhd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #501e80;
    color: white;
    flex-shrink: 0;
    min-height: 30px;
}
.rhd-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: white;
}
.rhd-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    color: white;
    border-radius: var(--rhd-radius-sm);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--rhd-transition-fast);
    line-height: 20px;
    padding: 0;
    margin: 0;
    text-align: center;
}
.rhd-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal content */
.rhd-modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
    background: #fafbfc;
}

/* Modal footer (form actions) */
.rhd-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--rhd-gray-200);
    flex-shrink: 0;
    align-items: center;
    background: white;
}

/* ========================================
   15. FORMS — Section style, grid layout
======================================== */
.rhd-form-section {
    background: white;
    border: 1px solid var(--rhd-gray-200);
    border-radius: var(--rhd-radius-md);
    padding: 24px;
    margin-bottom: 24px;
}
.rhd-section-title {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--rhd-gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--rhd-gray-200);
    padding-bottom: 12px;
}
.rhd-section-title small {
    font-size: 0.8rem;
    color: var(--rhd-gray-500);
    font-weight: 400;
}
.rhd-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}
.rhd-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    min-width: 0;
    overflow: hidden;
}
.rhd-form-group label {
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--rhd-gray-700);
    font-size: 0.9rem;
}
.rhd-form-group .required { color: var(--rhd-danger); font-weight: 700; }
.rhd-form-group-full { grid-column: 1 / -1; }
.rhd-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--rhd-spacing-md);
    margin-bottom: 0;
}
.rhd-separator { border: none; border-top: 1px solid var(--rhd-gray-200); margin: 20px 0; }

/* Readonly text */
.rhd-readonly-text {
    padding: var(--rhd-spacing-sm);
    background: var(--rhd-gray-50);
    border: 1px solid var(--rhd-gray-200);
    border-radius: var(--rhd-radius-sm);
    font-style: italic;
    color: #4a5568;
    min-height: 40px;
    line-height: 1.4;
}
.rhd-form-group input[readonly]:not(.rhd-datepicker-add):not(.rhd-datepicker-edit),
.rhd-form-group textarea[readonly] {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    border-color: #e9ecef;
}

/* Tables grid (checkboxes) */
.rhd-tables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    padding: 15px;
    background: var(--rhd-gray-50);
    border: 1px solid var(--rhd-gray-300);
    border-radius: var(--rhd-radius-md);
    margin: 10px 0;
}
.rhd-table-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    background: white;
    border: 2px solid var(--rhd-gray-300);
    border-radius: var(--rhd-radius-sm);
    cursor: pointer;
    transition: all var(--rhd-transition-fast);
    position: relative;
    min-height: 50px;
}
.rhd-table-checkbox:hover {
    border-color: var(--rhd-primary);
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.2);
}
.rhd-table-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.rhd-table-checkbox input[type="checkbox"]:checked ~ .rhd-table-label {
    background: var(--rhd-primary);
    color: white;
    padding: 4px 12px;
    border-radius: var(--rhd-radius-sm);
}
.rhd-table-checkbox input[type="checkbox"]:disabled ~ .rhd-table-label {
    opacity: 0.5;
    cursor: not-allowed;
}
.rhd-table-checkbox.rhd-table-reserved {
    background: var(--rhd-gray-100);
    border-color: var(--rhd-gray-400);
    cursor: not-allowed;
}
.rhd-table-checkbox.rhd-table-reserved .rhd-table-label {
    background: var(--rhd-gray-400);
    color: white;
    padding: 4px 12px;
    border-radius: var(--rhd-radius-sm);
    text-decoration: line-through;
}
.rhd-table-checkbox.rhd-table-reserved:hover {
    border-color: var(--rhd-gray-400);
    box-shadow: none;
}
.rhd-table-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--rhd-gray-700);
    transition: all var(--rhd-transition-fast);
    user-select: none;
}

/* Badge couverts — petit rond vert en bas a droite */
.rhd-table-capacity-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    background: #059669;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
}

/* Checkbox label (email send) */
.rhd-checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    color: var(--rhd-gray-700);
}

/* Cancellation info */
.rhd-cancel-info {
    display: none;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}
.rhd-cancel-info h4 {
    margin-top: 0;
    color: #dc3545;
}
.rhd-cancel-info p { margin: 4px 0; font-size: 13px; }
.rhd-cancel-fields {
    display: none;
    background-color: #fef2f2;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    margin-bottom: 20px;
}
.rhd-cancel-fields h4 {
    margin-top: 0;
    color: #b91c1c;
}

/* Customer history */
.rhd-customer-history h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rhd-gray-700);
}
.rhd-history-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
    font-size: 13px;
}
.rhd-history-stat strong { display: block; font-size: 18px; color: var(--rhd-primary); }
.rhd-history-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}
.rhd-history-table th,
.rhd-history-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--rhd-gray-200);
}
.rhd-history-table th { font-weight: 600; color: var(--rhd-gray-500); }

/* Field note/description */
.rhd-form-description {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #666;
}

/* ========================================
   16. NOTES MODAL — Sections style
======================================== */
.rhd-notes-section {
    background: white;
    border: 1px solid var(--rhd-gray-200);
    border-radius: var(--rhd-radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

/* ========================================
   17. PAGINATION
======================================== */
.rhd-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}
.rhd-pagination-info { color: var(--rhd-gray-500); font-weight: 500; }
.rhd-pagination-links { display: flex; gap: 6px; }
.rhd-pagination-links a, .rhd-pagination-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 2px solid var(--rhd-gray-300);
    border-radius: var(--rhd-radius-sm);
    text-decoration: none;
    color: var(--rhd-gray-700);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--rhd-transition-fast);
}
.rhd-pagination-links a:hover {
    background: var(--rhd-gray-50);
    border-color: var(--rhd-primary);
    color: var(--rhd-primary);
}
.rhd-pagination-links .current {
    background: linear-gradient(135deg, var(--rhd-primary), var(--rhd-primary-dark));
    color: white;
    border-color: var(--rhd-primary);
    cursor: default;
}

/* ========================================
   18. TOAST NOTIFICATIONS
======================================== */
.rhd-toast-container,
#rhd-toast-container {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    z-index: 999999 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.rhd-toast {
    pointer-events: auto;
}
.rhd-toast {
    padding: var(--rhd-spacing-md) var(--rhd-spacing-xl);
    border-radius: var(--rhd-radius-sm);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: rhdToastIn var(--rhd-transition-slow) ease;
    max-width: 400px;
}
.rhd-toast-success { background: linear-gradient(135deg, var(--rhd-success), var(--rhd-success-dark)); }
.rhd-toast-error { background: linear-gradient(135deg, var(--rhd-danger), var(--rhd-danger-dark)); }
.rhd-toast-info { background: linear-gradient(135deg, var(--rhd-info), var(--rhd-info-dark)); }

@keyframes rhdToastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   18b. CONFIRM DIALOG
======================================== */
.rhd-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100010;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: rhdConfirmFadeIn 0.15s ease;
}

.rhd-confirm-dialog {
    background: #fff;
    border-radius: 12px;
    width: 440px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: rhdConfirmScaleIn 0.2s ease;
    overflow: hidden;
}

.rhd-confirm-header {
    padding: 20px 24px 0;
}

.rhd-confirm-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1f2937;
    font-weight: 700;
}

.rhd-confirm-body {
    padding: 12px 24px 20px;
}

.rhd-confirm-body p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95rem;
}

.rhd-confirm-footer {
    padding: 0 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.rhd-confirm-footer button {
    min-width: 100px;
    text-align: center;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--rhd-radius-sm);
    font-size: 0.9rem;
    border: 1px solid var(--rhd-gray-300);
    background: #fff;
    color: var(--rhd-gray-700);
    transition: all var(--rhd-transition-fast);
}

.rhd-confirm-footer button:hover {
    background: var(--rhd-gray-100);
}

.rhd-confirm-footer .rhd-confirm-ok {
    background: var(--rhd-primary);
    border-color: var(--rhd-primary);
    color: #fff;
}

.rhd-confirm-footer .rhd-confirm-ok:hover {
    background: var(--rhd-primary-dark);
}

.rhd-confirm-danger .rhd-confirm-header h3 {
    color: #dc2626;
}

.rhd-confirm-danger .rhd-confirm-ok {
    background: #dc2626;
    border-color: #b91c1c;
    color: #fff;
}

.rhd-confirm-danger .rhd-confirm-ok:hover {
    background: #b91c1c;
}

.rhd-confirm-warning .rhd-confirm-header h3 {
    color: #d97706;
}

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

@keyframes rhdConfirmScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ========================================
   19. MOBILE CARDS — Design riche
======================================== */
.rhd-mobile-cards { display: none; }

.rhd-booking-card {
    background: white;
    border-radius: var(--rhd-radius-md);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--rhd-shadow-sm);
    border: 1px solid var(--rhd-gray-200);
}
.rhd-booking-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.rhd-booking-client { flex: 1; }
.rhd-booking-client-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--rhd-gray-800);
    margin-bottom: 6px;
}
.rhd-booking-client-phone {
    font-size: 0.9rem;
    color: var(--rhd-gray-600);
}
.rhd-booking-status { margin-left: 16px; }
.rhd-booking-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    padding: 14px;
    background: var(--rhd-gray-50);
    border-radius: var(--rhd-radius-sm);
}
.rhd-booking-detail {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.rhd-booking-detail-label {
    font-size: 0.8rem;
    color: var(--rhd-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.rhd-booking-detail-value {
    font-weight: 600;
    color: var(--rhd-gray-800);
}
.rhd-booking-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--rhd-gray-200);
}
.rhd-booking-buttons {
    display: flex;
    gap: 8px;
}
.rhd-booking-notes {
    display: flex;
    align-items: center;
}

/* ========================================
   20. UTILITIES
======================================== */
.rhd-hidden { display: none !important; }
.rhd-text-muted { color: var(--rhd-gray-400); font-size: 13px; }
.rhd-text-success { color: var(--rhd-success); }
.rhd-staff-note, .rhd-company { font-weight: normal; color: #666; }

/* Clickable status badge */
.rhd-status-clickable {
    cursor: pointer;
    position: relative;
}
.rhd-status-clickable:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
.rhd-status-clickable::after {
    content: '\25BE';
    margin-left: 4px;
    font-size: 10px;
    opacity: 0.8;
}

/* Status popover */
.rhd-status-popover {
    position: fixed;
    background: white;
    border: 1px solid var(--rhd-gray-300);
    border-radius: var(--rhd-radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 100001;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
}
.rhd-status-popover-option {
    display: block;
    padding: 8px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color var(--rhd-transition-fast);
    width: 100%;
    white-space: nowrap;
}
.rhd-status-popover-option:hover {
    background-color: #f0f0f1;
    color: var(--rhd-primary);
}
.rhd-status-popover-option.rhd-popover-current {
    background-color: var(--rhd-gray-100);
    font-weight: 700;
    color: var(--rhd-primary);
    pointer-events: none;
}

/* Row highlight after status change */
.rhd-row-highlight {
    background-color: rgba(139, 92, 246, 0.1) !important;
    border-left: 4px solid var(--rhd-primary) !important;
    transition: all 0.3s ease;
}

/* Updating spinner */
.rhd-updating {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}
.rhd-updating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--rhd-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: rhdSpin 1s linear infinite;
}
@keyframes rhdSpin { to { transform: rotate(360deg); } }

/* ========================================
   21. RESPONSIVE
======================================== */
@media (max-width: 1400px) {
    .rhd-wrapper { padding: 24px 32px; }
    /* Rebalance columns for narrower screens */
    .rhd-table .rhd-col-contact { width: 18%; }
    .rhd-table .rhd-col-actions { width: 22%; }
    /* Filters: allow shrinking */
    .rhd-filter-group { min-width: 90px; flex-shrink: 1; }
    .rhd-filter-group.rhd-filter-narrow { min-width: 70px; }
    .rhd-filter-group.rhd-filter-wide { min-width: 120px; }
}

@media (max-width: 1200px) {
    .rhd-wrapper { padding: 20px 24px; }
    .rhd-stats-row { grid-template-columns: repeat(4, 1fr); gap: 8px; }

    /* Filters: compact layout, keep labels */
    .rhd-filters-row { flex-wrap: wrap; gap: 6px; padding-bottom: 8px; }
    .rhd-filter-group label { font-size: 0.7rem; margin-bottom: 4px; }
    .rhd-filter-group { min-width: 0; flex: 1 1 80px; }
    .rhd-filter-group.rhd-filter-narrow { min-width: 0; flex: 0 1 80px; }
    .rhd-filter-group.rhd-filter-wide { min-width: 0; flex: 1 1 110px; }
    .rhd-filter-group input,
    .rhd-filter-group select { padding: 6px 8px; font-size: 11px; width: 100%; box-sizing: border-box; }
    .rhd-filter-group select { padding-right: 24px; background-size: 12px; }
    .rhd-filter-group.rhd-filter-actions-inline { min-width: auto; }
    .rhd-filter-group.rhd-filter-actions-inline label { display: none; }
    .rhd-filter-btns .rhd-btn { padding: 8px 12px; font-size: 12px; }
    .rhd-filter-btns .rhd-btn-reset { width: 32px; height: 32px; min-width: 32px; font-size: 16px; }
    .rhd-filters-actions { padding-top: 12px; margin-top: 8px; gap: 8px; }
    .rhd-filters-actions .rhd-btn { padding: 8px 12px; font-size: 12px; }
    /* Tighter table for medium screens — keep time column, rebalance */
    .rhd-table .rhd-col-date { width: 10%; }
    .rhd-table .rhd-col-time { width: 6%; }
    .rhd-table .rhd-col-client { width: 11%; }
    .rhd-table .rhd-col-contact { width: 13%; }
    .rhd-table .rhd-col-service { width: 7%; }
    .rhd-table .rhd-col-party { width: 5%; }
    .rhd-table .rhd-col-table { width: 11%; }
    .rhd-table .rhd-col-status { width: 11%; }
    .rhd-table .rhd-col-actions { width: 22%; }
    .rhd-table th { padding: 12px 6px; font-size: 0.75rem; }
    .rhd-table td { padding: 10px 6px; font-size: 11px; }
    .rhd-table-nums { font-size: 0.8rem; }
    .rhd-contact-line { font-size: 11px; }
    .rhd-contact a { font-size: 11px; }

    /* Smaller action buttons for tablet */
    .rhd-actions { gap: 5px; }
    .rhd-action-btn {
        min-width: 30px;
        height: 30px;
        width: 30px;
        font-size: 14px;
        border-radius: 6px;
    }
    .rhd-action-btn .dashicons {
        font-size: 14px;
        width: 14px;
        height: 14px;
    }

    /* Smaller badges for tablet — match action buttons */
    .rhd-service-badge,
    .rhd-party-size,
    .rhd-table-badge,
    .rhd-status,
    .rhd-time-badge {
        font-size: 0.7rem;
        padding: 8px 8px !important;
        letter-spacing: 0.3px;
    }
    .rhd-service-text { font-size: 0.7rem; }

    /* Smaller occasion badge */
    .rhd-occasion { font-size: 12px; }

    /* Tighter stats cards */
    .rhd-stat-card { padding: 18px 14px; }
    .rhd-stat-value { font-size: 2rem; }
    .rhd-stat-label { font-size: 0.75rem; }

    /* Tighter header */
    .rhd-title { font-size: 20px; }
    .rhd-header { margin-bottom: 20px; }

    /* Tighter filters */
    .rhd-filters-bar { padding: 18px; margin-bottom: 24px; }
    .rhd-filter-group label { font-size: 0.8rem; }
    .rhd-filter-group input,
    .rhd-filter-group select { font-size: 12px; padding: 8px 10px; }
    .rhd-filter-group select { padding-right: 28px; }
    .rhd-filters-actions .rhd-btn { padding: 8px 14px; font-size: 12px; }

    /* Smaller menu management */
    .rhd-menu-grid { gap: 8px; }
    .rhd-menu-label { font-size: 12px; }
    .rhd-menu-status { font-size: 11px; }
}

@media (max-width: 1000px) {
    .rhd-wrapper { padding: 20px; }

    /* Hide desktop table, show mobile cards */
    .rhd-table-wrap,
    .rhd-table { display: none; }
    .rhd-mobile-cards { display: block; }

    /* Badge harmonisation for mobile */
    .rhd-service-badge,
    .rhd-party-size,
    .rhd-status {
        padding: 8px 14px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        height: 34px;
        min-width: 60px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--rhd-radius-sm);
        line-height: 1;
        box-sizing: border-box;
    }

    /* Mobile card action buttons — touch friendly but compact */
    .rhd-booking-buttons .rhd-action-btn,
    .rhd-booking-actions .rhd-action-btn {
        min-width: 38px;
        height: 38px;
        width: 38px;
        font-size: 16px;
    }
    .rhd-booking-buttons .rhd-action-btn .dashicons,
    .rhd-booking-actions .rhd-action-btn .dashicons {
        font-size: 16px;
        width: 16px;
        height: 16px;
    }

    /* More breathing room for cards */
    .rhd-booking-card { padding: 22px; margin-bottom: 18px; }
    .rhd-booking-details { padding: 16px; gap: 18px; }
    .rhd-booking-buttons { gap: 10px; }
}

@media (max-width: 768px) {
    .rhd-wrapper { padding: 16px; }
    .rhd-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .rhd-title { font-size: 20px; }
    .rhd-stats-row { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; }
    .rhd-stat-card { padding: 8px 4px; border-width: 1px; border-radius: 8px; box-shadow: none; }
    .rhd-stat-card::before { height: 2px; }
    .rhd-stat-card:hover { transform: none; }
    .rhd-stat-label { font-size: 0.55rem; margin-bottom: 2px; letter-spacing: 0; }
    .rhd-stat-value { font-size: 1.3rem; }
    .rhd-stat-sublabel { font-size: 0.5rem; margin-top: 2px; }
    .rhd-stat-breakdown { font-size: 0.5rem; gap: 4px; margin-top: 2px; }

    /* Menu grid: single row on mobile */
    .rhd-menu-management { padding: 10px; margin-bottom: 16px; }
    .rhd-menu-management h3 { font-size: 13px; margin-bottom: 8px; }
    .rhd-menu-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .rhd-menu-item { padding: 8px; flex-direction: column; gap: 4px; border-left-width: 3px; }
    .rhd-menu-label { font-size: 11px; gap: 4px; }
    .rhd-menu-label .dashicons { font-size: 14px; width: 14px; height: 14px; }
    .rhd-menu-status { font-size: 10px; }
    .rhd-menu-actions { gap: 2px; }

    .rhd-filters-bar { padding: 12px 16px; margin-bottom: 20px; }
    /* Toggle visible on mobile */
    .rhd-filters-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 0;
        background: none;
        border: none;
        font-size: 0.95rem;
        font-weight: 700;
        color: var(--rhd-gray-700);
        cursor: pointer;
    }
    .rhd-filters-toggle-icon {
        font-size: 0.7rem;
        transition: transform 0.2s;
    }
    .rhd-filters-bar.rhd-filters-open .rhd-filters-toggle-icon {
        transform: rotate(180deg);
    }
    /* Whole bar clickable when collapsed */
    .rhd-filters-bar:not(.rhd-filters-open) {
        cursor: pointer;
    }
    /* Filters hidden by default on mobile — grid 2 cols */
    .rhd-filters-row {
        display: none;
        flex-wrap: wrap;
        gap: 6px;
    }
    .rhd-filters-bar.rhd-filters-open .rhd-filters-row {
        display: flex;
    }
    /* Hide actions row too when collapsed */
    .rhd-filters-actions {
        display: none;
    }
    .rhd-filters-bar.rhd-filters-open .rhd-filters-actions {
        display: flex;
        flex-direction: column;
        padding-top: 12px;
        gap: 10px;
    }
    /* Booking details compact inline */
    .rhd-booking-details {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 12px;
        padding: 8px 12px;
        margin-bottom: 10px;
    }
    .rhd-booking-detail {
        flex-direction: row;
        gap: 3px;
        align-items: center;
    }
    .rhd-booking-detail-label {
        font-size: 0.65rem;
        text-transform: none;
        letter-spacing: 0;
    }
    .rhd-booking-detail-label::after {
        content: ':';
    }
    .rhd-booking-detail-value {
        font-size: 0.8rem;
    }
    .rhd-booking-card { padding: 14px; margin-bottom: 10px; }
    .rhd-booking-card-header { margin-bottom: 8px; }
    .rhd-booking-client-name { font-size: 0.95rem; }
    .rhd-booking-client-phone { font-size: 0.8rem; }
    .rhd-booking-actions { padding-top: 10px; }
    .rhd-filter-group {
        min-width: 0;
        width: calc(50% - 3px);
        flex: 0 0 calc(50% - 3px);
    }
    .rhd-filter-group.rhd-filter-wide {
        width: 100%;
        flex: 0 0 100%;
    }
    .rhd-filter-group.rhd-filter-narrow {
        min-width: 0;
        width: calc(50% - 3px);
        flex: 0 0 calc(50% - 3px);
    }
    .rhd-filter-group.rhd-filter-actions-inline {
        width: 100%;
        flex: 0 0 100%;
        flex-direction: row;
    }
    .rhd-filter-group.rhd-filter-actions-inline label { display: none; }
    .rhd-filter-btns {
        width: 100%;
    }
    .rhd-filter-btns .rhd-btn-primary {
        flex: 1;
    }
    .rhd-filter-group input,
    .rhd-filter-group select,
    .rhd-filter-group button {
        width: 100%;
        box-sizing: border-box;
        padding: 8px 10px;
        font-size: 13px;
    }
    .rhd-filter-group select {
        padding-right: 32px;
    }
    .rhd-filter-group label {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }
    .rhd-filters-actions .rhd-btn {
        width: 100%;
        padding: 12px 18px;
    }

    .rhd-modal {
        width: 95%;
        margin: 10px auto;
    }
    .rhd-modal-header { padding: 16px 20px; }
    .rhd-modal-body { padding: 20px; }
    .rhd-form-grid,
    .rhd-modal-overlay .rhd-form-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .rhd-form-row { grid-template-columns: 1fr; }
    .rhd-form-section { padding: 20px; margin-bottom: 20px; }
    .rhd-modal-footer { flex-direction: column; gap: 10px; padding: 16px 20px; }
    .rhd-modal-footer .rhd-btn { width: 100%; padding: 12px 18px; }

    /* menu grid handled above in 768px block */

    .rhd-pending-alert {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        padding: 18px 20px;
    }

    .rhd-action-btn {
        min-width: 44px;
        height: 44px;
        width: 44px;
        font-size: 18px;
        border-radius: var(--rhd-radius-md);
        box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    }
    .rhd-action-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }

    .rhd-booking-card { padding: 16px; margin-bottom: 12px; }
    .rhd-booking-card-header { margin-bottom: 10px; }
    .rhd-booking-details { padding: 10px 14px; gap: 6px 12px; margin-bottom: 10px; }
    .rhd-booking-actions { padding-top: 10px; }

    .rhd-pagination { padding: 16px 0; flex-direction: column; align-items: center; gap: 10px; }
}

@media (max-width: 600px) {
    .rhd-booking-details { gap: 4px 10px; padding: 8px 10px; }
    .rhd-booking-card { padding: 12px; margin-bottom: 8px; }
    .rhd-booking-actions { flex-direction: row; gap: 8px; align-items: center; justify-content: center; }
    .rhd-booking-buttons { gap: 6px; flex-wrap: wrap; justify-content: center; }
    .rhd-booking-notes { }
    .rhd-header-actions { width: 100%; }
    .rhd-header-actions .rhd-btn { flex: 1; }
}

@media (max-width: 480px) {
    .rhd-wrapper { padding: 12px; }
    .rhd-stat-value { font-size: 1.1rem; }
    .rhd-stat-card { padding: 6px 3px; }
    .rhd-stat-label { font-size: 0.5rem; }
    .rhd-stat-sublabel { display: none; }
    .rhd-stat-breakdown { font-size: 0.45rem; }
    .rhd-modal-overlay { padding: 8px; }
    .rhd-modal { border-radius: var(--rhd-radius-md); width: 100%; margin: 8px auto; }
    .rhd-modal-header { padding: 14px 16px; }
    .rhd-modal-header h3 { font-size: 1.1rem; }
    .rhd-modal-body { padding: 16px; }
    .rhd-modal-footer { padding: 14px 16px; }
    .rhd-form-section { padding: 16px; }
    .rhd-filters-bar { padding: 16px; margin-bottom: 20px; }
    .rhd-login-card { padding: 24px; }
    .rhd-btn { padding: 10px 16px; font-size: 13px; }
    .rhd-pagination-links a, .rhd-pagination-links span {
        min-width: 36px;
        height: 36px;
    }
}

/* ========================================
   14. DATEPICKER jQuery UI — Identique a l'admin
======================================== */
#ui-datepicker-div {
    display: none;
}

.ui-datepicker {
    width: 280px;
    padding: 15px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: var(--rhd-radius-sm);
    z-index: 200001 !important;
    font-family: var(--rhd-font);
}

.ui-datepicker-header {
    background-color: var(--rhd-primary);
    color: #ffffff;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ui-datepicker-title {
    font-weight: 600;
}

.ui-datepicker-prev,
.ui-datepicker-next {
    cursor: pointer;
    border-radius: 6px;
    width: auto;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--rhd-transition-fast);
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 0 10px;
    font-weight: 600;
    text-decoration: none;
}

.ui-datepicker-prev:hover,
.ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.5);
}

.ui-datepicker .ui-icon {
    background-image: none !important;
    text-indent: 0 !important;
}

.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
}

.ui-datepicker th {
    padding: var(--rhd-spacing-xs) 5px;
    font-size: 0.9em;
    color: var(--rhd-gray-500);
    font-weight: normal;
}

.ui-datepicker td {
    padding: 2px;
}

.ui-datepicker td a,
.ui-datepicker td span {
    display: block;
    padding: var(--rhd-spacing-xs) 5px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border-radius: 5px;
    transition: all var(--rhd-transition-fast);
}

.ui-datepicker td a:hover {
    background-color: #f1f5f9;
}

.ui-datepicker .ui-datepicker-current-day a {
    background-color: #a78bfa;
    color: #ffffff;
}

.ui-datepicker .ui-state-active {
    background-color: var(--rhd-primary-darker) !important;
    color: #ffffff !important;
    font-weight: bold;
}

/* Jours passes et fermes */
.ui-datepicker .rhd-past-day a,
.ui-datepicker .rhd-closed-day a,
.ui-datepicker .rhd-past-day span,
.ui-datepicker .rhd-closed-day span {
    background: #e9ecef !important;
    color: #adb5bd !important;
    text-decoration: line-through;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Jours disponibles */
.ui-datepicker .rhd-available-day a {
    font-weight: 500;
}

/* Loading state on calendar */
.ui-datepicker-calendar.rhd-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Datepicker input styling */
.rhd-datepicker-add,
.rhd-datepicker-edit {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px !important;
}

/* ==========================================
   TAKEAWAY ORDER DETAIL (modal edit)
   ========================================== */

.rhd-takeaway-order-detail {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px;
}

.rhd-takeaway-order-detail h4 {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #16a34a;
}

.rhd-takeaway-table {
    width: 100%;
    border-collapse: collapse;
}

.rhd-takeaway-formula-row td {
    padding: 8px 4px 4px;
    border-bottom: 1px solid #bbf7d0;
    font-size: 0.9rem;
    color: #15803d;
}

.rhd-takeaway-item-row td {
    padding: 3px 4px 3px 16px;
    font-size: 0.85rem;
    color: #374151;
}

.rhd-takeaway-item-row td:first-child {
    color: #6b7280;
    font-style: italic;
    width: 120px;
}

.rhd-supplement {
    color: #16a34a;
    font-weight: 600;
    font-size: 0.8rem;
}

.rhd-takeaway-order-total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #16a34a;
    text-align: right;
    font-size: 1.05rem;
    color: #15803d;
}

/* Meal count badge */
.rhd-takeaway-meal-count {
    margin-bottom: 12px;
    padding: 8px 14px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    color: #065f46;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
}

/* Meal sections in order detail */
.rhd-takeaway-meal-section {
    margin-bottom: 16px;
    padding: 16px;
    border: 2px solid #bbf7d0;
    border-radius: 10px;
    background: #f0fdf4;
}
.rhd-takeaway-meal-section + .rhd-takeaway-meal-section {
    margin-top: 20px;
}
.rhd-takeaway-meal-header {
    font-weight: 700;
    font-size: 1rem;
    color: #166534;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: #dcfce7;
    border-radius: 6px;
    border-left: 4px solid #10B981;
}

/* Stat breakdown per type */
.rhd-stat-breakdown {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 0.7rem;
    line-height: 1.2;
}
.rhd-stat-dinein {
    color: #3B82F6;
    font-weight: 600;
}
.rhd-stat-takeaway {
    color: #10B981;
    font-weight: 600;
}

/* Takeaway add button */
.rhd-btn-takeaway {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: white !important;
}

/* ========================================
   TAKEAWAY MENU BUILDER (add modal)
======================================== */
.rhd-takeaway-meal {
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--rhd-gray-200);
    border-radius: 8px;
    background: var(--rhd-gray-50);
}

.rhd-takeaway-meal h5 {
    margin: 0 0 8px;
    font-size: 0.9rem;
    color: var(--rhd-gray-500);
    font-weight: 600;
}

.rhd-meal-formula-name {
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
}

.rhd-meal-formula-choice {
    margin-bottom: 8px;
}

.rhd-meal-formula-choice select,
.rhd-meal-category select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--rhd-gray-300);
    border-radius: 6px;
    font-size: 0.85rem;
    background: #fff;
}

.rhd-meal-categories {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.rhd-meal-category label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rhd-gray-500);
    margin-bottom: 2px;
}

.rhd-meal-select-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--rhd-gray-500);
}

.rhd-takeaway-cart-summary {
    margin-top: 12px;
    padding: 12px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}

.rhd-takeaway-cart-line {
    font-size: 0.85rem;
    padding: 2px 0;
    color: #374151;
}

.rhd-takeaway-cart-total {
    font-weight: 700;
    color: #15803d;
    font-size: 1.1rem;
    text-align: right;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #bbf7d0;
}

/* ========================================
   WP-ADMIN CONTEXT — Reset interferences
======================================== */
.rhd-admin-context {
    font-size: 14px;
    line-height: 1.5;
    color: #374151;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.rhd-admin-context *,
.rhd-admin-context *::before,
.rhd-admin-context *::after {
    box-sizing: border-box;
}

.rhd-admin-context .rhd-input,
.rhd-admin-context .rhd-select,
.rhd-admin-context select,
.rhd-admin-context input[type="text"],
.rhd-admin-context input[type="number"],
.rhd-admin-context input[type="date"],
.rhd-admin-context input[type="email"],
.rhd-admin-context input[type="tel"] {
    height: auto;
    max-width: none;
    box-shadow: none;
}

.rhd-admin-context .rhd-btn {
    box-shadow: none;
}

.rhd-admin-context h1,
.rhd-admin-context h2,
.rhd-admin-context h3 {
    padding: 0;
}

/* Le dashboard dans wp-admin doit etre visible par defaut */
.rhd-admin-context #rhd-dashboard {
    display: block !important;
}

/* Annuler le break-out fullscreen du frontend */
.rhd-admin-context.rhd-wrapper {
    width: 100%;
    max-width: 100%;
    left: auto;
    transform: none;
    padding: 12px 0;
}

/* Stats row : scroll horizontal si trop etroit */
.rhd-admin-context .rhd-stats-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
}

.rhd-admin-context .rhd-stat-card {
    min-width: 120px;
    flex-shrink: 0;
}

/* Filtres : wrap sur petits espaces */
.rhd-admin-context .rhd-filter-bar {
    flex-wrap: wrap;
}

/* Table : scroll horizontal */
.rhd-admin-context .rhd-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Header : wrap si trop etroit */
.rhd-admin-context .rhd-header {
    flex-wrap: wrap;
    gap: 8px;
}

/* Menu management : reduire la grille */
.rhd-admin-context .rhd-menu-grid {
    gap: 8px;
}

/* Modals : s'assurer qu'elles couvrent tout l'ecran */
.rhd-admin-context .rhd-modal-overlay {
    position: fixed;
    z-index: 100050;
}
