/* =========================
   ADMIN STYLES
   All styles scoped under .admin-scope
   to prevent affecting public pages
========================= */

/* CSS Variables for Admin Theme */
:root {
    /* Colors - calm, professional palette */
    --admin-bg: #f8f9fa;
    --admin-bg-gradient-start: #f5f7fa;
    --admin-bg-gradient-end: #f8f9fa;
    --admin-card-bg: #ffffff;
    --admin-text: #1f2937;
    --admin-text-muted: #6b7280;
    --admin-border: #e5e7eb;
    --admin-border-focus: #3b82f6;
    --admin-primary: #2563eb;
    --admin-primary-hover: #1e40af;
    --admin-primary-active: #1e3a8a;
    --admin-danger: #dc2626;
    --admin-danger-hover: #b91c1c;
    --admin-error-bg: #fee;
    --admin-error-border: #fca5a5;
    --admin-success-bg: #efe;
    --admin-success-border: #86efac;
    
    /* Spacing */
    --admin-space-xs: 6px;
    --admin-space-sm: 12px;
    --admin-space-md: 16px;
    --admin-space-lg: 24px;
    --admin-space-xl: 32px;
    
    /* Border Radius */
    --admin-radius-sm: 8px;
    --admin-radius-md: 12px;
    --admin-radius-lg: 16px;
    --admin-radius-xl: 20px;
    
    /* Shadows */
    --admin-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --admin-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --admin-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --admin-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.1);
    
    /* Focus Ring */
    --admin-focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.15);
    
    /* Transitions */
    --admin-transition-fast: 150ms;
    --admin-transition-normal: 200ms;
}

/* =========================
   ADMIN SCOPE - TYPOGRAPHY
========================= */

/* Admin-only font (does NOT affect public pages) */
.admin-scope {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", 
                 "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", 
                 "Segoe UI Symbol", "Noto Color Emoji";
}

.admin-scope h1,
.admin-scope h2,
.admin-scope h3,
.admin-scope h4,
.admin-scope h5,
.admin-scope h6 {
    font-family: inherit;
}

/* =========================
   ADMIN PAGE LAYOUT
========================= */

/* Full-height centered container for login-style pages */
.admin-scope.admin-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--admin-bg-gradient-start) 0%, var(--admin-bg-gradient-end) 100%);
    padding: var(--admin-space-lg);
}

/* Standard page layout (not centered) */
.admin-scope.admin-layout {
    min-height: 100vh;
    background: var(--admin-bg);
    padding: var(--admin-space-lg);
}

/* =========================
   ADMIN CARD
========================= */

.admin-scope .admin-card {
    width: 100%;
    max-width: 460px;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-xl);
    padding: var(--admin-space-xl);
    box-shadow: var(--admin-shadow-lg);
}

/* Card Title */
.admin-scope .admin-title {
    margin: 0 0 var(--admin-space-xs) 0;
    font-size: 28px;
    font-weight: 600;
    color: var(--admin-text);
    text-align: center;
    letter-spacing: -0.02em;
}

/* Card Subtitle */
.admin-scope .admin-subtitle {
    margin: 0 0 var(--admin-space-xl) 0;
    font-size: 15px;
    color: var(--admin-text-muted);
    text-align: center;
}

/* =========================
   FORMS - Override existing classes with admin styles
========================= */

.admin-scope .row {
    display: flex;
    flex-direction: column;
    gap: var(--admin-space-sm);
    margin-bottom: var(--admin-space-md);
}

.admin-scope .row label {
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text);
    margin-bottom: 4px;
}

.admin-scope .form-control,
.admin-scope input[type="text"],
.admin-scope input[type="email"],
.admin-scope input[type="password"],
.admin-scope input[type="number"],
.admin-scope input[type="date"],
.admin-scope select,
.admin-scope textarea {
    width: 100%;
    height: 46px;
    padding: var(--admin-space-sm) var(--admin-space-md);
    /* Minimum 16px font-size to prevent iOS auto-zoom on focus */
    font-size: 16px;
    font-family: inherit;
    color: var(--admin-text);
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    transition: border-color var(--admin-transition-fast) ease,
                box-shadow var(--admin-transition-fast) ease;
    outline: none;
}

.admin-scope textarea {
    height: auto;
    min-height: 90px;
    resize: vertical;
}

/* Input Hover */
.admin-scope .form-control:hover,
.admin-scope input:hover,
.admin-scope select:hover,
.admin-scope textarea:hover {
    border-color: #cbd5e1;
}

/* Input Focus */
.admin-scope .form-control:focus-visible,
.admin-scope input:focus-visible,
.admin-scope select:focus-visible,
.admin-scope textarea:focus-visible {
    border-color: var(--admin-border-focus);
    box-shadow: var(--admin-focus-ring);
}

/* =========================
   BUTTONS
========================= */

/* Primary Submit Button */
.admin-scope .submit-btn {
    width: 100%;
    /* Ensure minimum touch target size */
    min-height: 46px;
    height: 46px;
    padding: var(--admin-space-sm) var(--admin-space-lg);
    /* Minimum 16px font-size for better mobile readability */
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #ffffff;
    background: var(--admin-primary);
    border: 1px solid var(--admin-primary);
    border-radius: var(--admin-radius-md);
    cursor: pointer;
    /* Prevent double-tap zoom on mobile */
    touch-action: manipulation;
    transition: background var(--admin-transition-normal) ease,
                border-color var(--admin-transition-normal) ease,
                transform var(--admin-transition-fast) ease,
                box-shadow var(--admin-transition-normal) ease;
    outline: none;
}

/* Submit Button Hover */
.admin-scope .submit-btn:hover:not(:disabled) {
    background: var(--admin-primary-hover);
    border-color: var(--admin-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--admin-shadow-hover);
}

/* Submit Button Active (pressed) */
.admin-scope .submit-btn:active:not(:disabled) {
    background: var(--admin-primary-active);
    border-color: var(--admin-primary-active);
    transform: translateY(0);
    box-shadow: var(--admin-shadow-sm);
}

/* Submit Button Focus */
.admin-scope .submit-btn:focus-visible {
    box-shadow: var(--admin-focus-ring);
}

/* Submit Button Disabled */
.admin-scope .submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Compact button variant - NOT full width on desktop */
.admin-scope .admin-btn-compact {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
}

/* Secondary Link Button */
.admin-scope .link-btn {
    display: inline-block;
    padding: 10px var(--admin-space-md);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: var(--admin-text);
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: background var(--admin-transition-normal) ease,
                border-color var(--admin-transition-normal) ease,
                transform var(--admin-transition-fast) ease,
                box-shadow var(--admin-transition-normal) ease,
                color var(--admin-transition-normal) ease;
    outline: none;
    white-space: nowrap;
}

/* Link Button Hover */
.admin-scope .link-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-1px);
    box-shadow: var(--admin-shadow-sm);
}

/* Link Button Active */
.admin-scope .link-btn:active:not(:disabled) {
    transform: translateY(0);
    background: #f3f4f6;
    box-shadow: none;
}

/* Link Button Focus */
.admin-scope .link-btn:focus-visible {
    border-color: var(--admin-border-focus);
    box-shadow: var(--admin-focus-ring);
}

/* Link Button Disabled */
.admin-scope .link-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Danger variant for link button */
.admin-scope .link-btn.danger {
    color: var(--admin-danger);
    border-color: var(--admin-danger);
}

.admin-scope .link-btn.danger:hover:not(:disabled) {
    background: #fef2f2;
    border-color: var(--admin-danger-hover);
}

/* =========================
   LOADING SPINNER
========================= */

.admin-scope .spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: admin-spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes admin-spin {
    to { transform: rotate(360deg); }
}

/* =========================
   ALERTS / MESSAGES
========================= */

.admin-scope .alert {
    padding: var(--admin-space-md);
    border-radius: var(--admin-radius-md);
    font-size: 14px;
    line-height: 1.5;
    margin-top: var(--admin-space-md);
}

.admin-scope .alert-error {
    background: var(--admin-error-bg);
    border: 1px solid var(--admin-error-border);
    color: #991b1b;
}

.admin-scope .alert-success {
    background: var(--admin-success-bg);
    border: 1px solid var(--admin-success-border);
    color: #065f46;
}

/* =========================
   EXISTING CARD OVERRIDE (for admin pages that use .card)
========================= */

.admin-scope .card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-space-lg);
    box-shadow: var(--admin-shadow-md);
    margin-top: var(--admin-space-md);
}

/* =========================
   UTILITY CLASSES
========================= */

.admin-scope .muted {
    color: var(--admin-text-muted);
}

.admin-scope .small {
    font-size: 13px;
}

.admin-scope .section {
    padding: var(--admin-space-lg);
}

/* =========================
   MOBILE RESPONSIVE
========================= */

@media (max-width: 480px) {
    .admin-scope.admin-page {
        padding: var(--admin-space-md);
    }
    
    .admin-scope .admin-card {
        padding: var(--admin-space-lg);
    }
    
    .admin-scope .admin-title {
        font-size: 24px;
    }
}

/* =========================
   ACCESSIBILITY
========================= */

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .admin-scope * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Ensure focus is visible for keyboard users */
.admin-scope *:focus-visible {
    outline: 2px solid var(--admin-border-focus);
    outline-offset: 2px;
}

/* Remove outline for mouse/touch users (browsers handle this automatically with :focus-visible) */
.admin-scope *:focus:not(:focus-visible) {
    outline: none;
}

/* =========================
   ADMIN CONTAINER & LAYOUT
========================= */

/* Container for standard admin pages (not login-style centered) */
.admin-scope .admin-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Narrow container variant (for list-style pages) */
.admin-scope .admin-container--narrow {
    max-width: 800px;
}

/* Admin page header */
.admin-scope .admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--admin-space-md);
    margin-bottom: var(--admin-space-lg);
}

.admin-scope .admin-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: var(--admin-text);
    letter-spacing: -0.02em;
}

/* Action buttons row */
.admin-scope .admin-actions {
    display: flex;
    gap: var(--admin-space-sm);
    flex-wrap: wrap;
    align-items: center;
}

/* Auto-refresh badge */
.admin-scope .admin-badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--admin-text-muted);
    background: #f3f4f6;
    border: 1px solid var(--admin-border);
    border-radius: 999px;
    white-space: nowrap;
}

/* =========================
   STATUS BADGES
========================= */

.admin-scope .admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--admin-radius-sm);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.admin-scope .admin-badge--coming {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #86efac;
}

.admin-scope .admin-badge--maybe {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.admin-scope .admin-badge--notcoming {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

/* =========================
   SUBMISSION CARDS & LISTS
========================= */

/* List container for submission items */
.admin-scope .admin-list {
    display: flex;
    flex-direction: column;
    gap: var(--admin-space-md);
}

/* Individual submission card with hover effect */
.admin-scope .admin-list-item {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-space-lg);
    box-shadow: var(--admin-shadow-sm);
    transition: box-shadow var(--admin-transition-normal) ease,
                border-color var(--admin-transition-normal) ease;
}

/* Hover effect only on devices with hover capability */
@media (hover: hover) {
    .admin-scope .admin-list-item:hover {
        box-shadow: var(--admin-shadow-md);
        border-color: #cbd5e1;
    }
}

/* Card header row */
.admin-scope .admin-list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--admin-space-md);
    margin-bottom: var(--admin-space-sm);
}

.admin-scope .admin-list-item-content {
    flex: 1;
    min-width: 0;
}

.admin-scope .admin-list-item-title {
    display: flex;
    align-items: center;
    gap: var(--admin-space-sm);
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.admin-scope .admin-list-item-title strong {
    font-weight: 600;
    color: var(--admin-text);
    font-size: 16px;
}

.admin-scope .admin-list-item-meta {
    color: var(--admin-text-muted);
    font-size: 13px;
}

/* Message in submission card */
.admin-scope .admin-list-item-message {
    margin-top: var(--admin-space-md);
    padding: var(--admin-space-sm) var(--admin-space-md);
    background: #f9fafb;
    border-left: 3px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-style: italic;
    color: var(--admin-text-muted);
    font-size: 14px;
}

/* Guests list in submission card */
.admin-scope .admin-list-item-guests {
    margin-top: var(--admin-space-md);
}

.admin-scope .admin-list-item-guests-label {
    color: var(--admin-text-muted);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.admin-scope .admin-list-item-guests ul {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.admin-scope .admin-list-item-guests li {
    color: var(--admin-text);
    font-size: 14px;
    line-height: 1.6;
}

/* Small button variant for delete buttons in list */
.admin-scope .link-btn--small {
    padding: 6px 12px;
    font-size: 13px;
    min-width: auto;
    white-space: nowrap;
}

/* Compact delete button for submission cards */
.admin-scope .admin-btn-delete-compact,
.admin-scope .admin-btn-compact {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
    width: auto !important; /* Override any mobile width rules */
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* Hover effects only on hover-capable devices */
@media (hover: hover) {
    .admin-scope .link-btn--small:hover:not(:disabled),
    .admin-scope .admin-btn-delete-compact:hover:not(:disabled),
    .admin-scope .admin-btn-compact:hover:not(:disabled) {
        background: #fef2f2;
        border-color: var(--admin-danger-hover);
        transform: translateY(-1px);
        box-shadow: var(--admin-shadow-sm);
    }
}

/* =========================
   FILTERS & STATS
========================= */

.admin-scope .admin-stats {
    color: var(--admin-text-muted);
    font-size: 13px;
    line-height: 1.6;
    padding-top: var(--admin-space-sm);
    border-top: 1px solid var(--admin-border);
}

.admin-scope .admin-count-display {
    color: var(--admin-text-muted);
    font-size: 14px;
    margin: var(--admin-space-md) 0;
}

/* =========================
   MODAL OVERLAY & DIALOG
========================= */

.admin-scope .admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--admin-space-lg);
}

.admin-scope .admin-modal {
    max-width: 440px;
    width: 100%;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-xl);
    padding: var(--admin-space-xl);
    box-shadow: var(--admin-shadow-lg);
    animation: admin-modal-appear 0.2s ease-out;
}

@keyframes admin-modal-appear {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.admin-scope .admin-modal h3 {
    margin: 0 0 var(--admin-space-md) 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--admin-text);
}

.admin-scope .admin-modal p {
    margin: 0 0 var(--admin-space-sm) 0;
    color: var(--admin-text);
    line-height: 1.5;
}

.admin-scope .admin-modal-actions {
    display: flex;
    gap: var(--admin-space-sm);
    margin-top: var(--admin-space-lg);
}

.admin-scope .admin-modal-actions .submit-btn,
.admin-scope .admin-modal-actions .link-btn {
    flex: 1;
    width: auto;
}

/* Danger button variant for delete confirmation */
.admin-scope .submit-btn--danger {
    background: var(--admin-danger);
    border-color: var(--admin-danger);
}

.admin-scope .submit-btn--danger:hover:not(:disabled) {
    background: var(--admin-danger-hover);
    border-color: var(--admin-danger-hover);
}

.admin-scope .submit-btn--danger:active:not(:disabled) {
    background: #991b1c;
    border-color: #991b1c;
}

/* =========================
   MOBILE RESPONSIVE ENHANCEMENTS
========================= */

@media (max-width: 640px) {
    .admin-scope.admin-layout {
        padding: var(--admin-space-md);
    }

    .admin-scope .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-scope .admin-header h2 {
        font-size: 24px;
    }

    .admin-scope .admin-actions {
        width: 100%;
    }

    /* Allow top action bar buttons to stretch on mobile if desired */
    .admin-scope .admin-actions .link-btn {
        /* Buttons in action bar can be full-width if needed */
        /* width: 100%; - uncomment if you want full-width action buttons */
    }

    .admin-scope .admin-list-item {
        padding: var(--admin-space-md);
    }

    /* Keep card header as GRID on mobile (NOT column) */
    .admin-scope .admin-list-item-header {
        gap: 8px;
    }

    .admin-scope .admin-list-item-title strong {
        font-size: 15px;
    }

    .admin-scope .admin-badge {
        font-size: 11px;
        padding: 2px 8px;
    }

    /* Force delete button to stay compact on mobile */
    .admin-scope .admin-btn-delete-compact,
    .admin-scope .admin-btn-compact,
    .admin-scope .admin-list-item-header .link-btn {
        width: auto !important;
        padding: 6px 8px;
        font-size: 12px;
    }

    .admin-scope .admin-modal {
        padding: var(--admin-space-lg);
    }
}

@media (max-width: 480px) {
    /* Further optimize for small phones */
    .admin-scope .admin-list-item {
        padding: var(--admin-space-sm) var(--admin-space-md);
    }

    .admin-scope .admin-list-item-header {
        gap: 6px;
    }

    .admin-scope .admin-list-item-message {
        margin-top: var(--admin-space-sm);
        padding: 8px 10px;
        font-size: 13px;
    }

    .admin-scope .admin-list-item-guests {
        margin-top: var(--admin-space-sm);
    }

    /* Ensure delete button stays compact even on tiny screens */
    .admin-scope .admin-btn-delete-compact,
    .admin-scope .admin-btn-compact {
        padding: 5px 6px;
        font-size: 11px;
    }
}

@media (max-width: 400px) {
    .admin-scope.admin-layout {
        padding: var(--admin-space-sm);
    }

    .admin-scope .admin-list-item {
        padding: var(--admin-space-sm) var(--admin-space-md);
    }
}

/* =========================
   TOUCH DEVICE OPTIMIZATIONS
========================= */

/* Better touch feedback on mobile devices */
@media (hover: none) and (pointer: coarse) {
    /* Ensure touch targets are adequate */
    .admin-scope .link-btn--small,
    .admin-scope .admin-btn-delete-compact,
    .admin-scope .admin-btn-compact {
        min-height: 36px;
        min-width: 60px;
    }

    /* Active state for touch feedback */
    .admin-scope .link-btn--small:active:not(:disabled),
    .admin-scope .admin-btn-delete-compact:active:not(:disabled),
    .admin-scope .admin-btn-compact:active:not(:disabled) {
        background: #fee;
        border-color: var(--admin-danger);
        transform: scale(0.96);
    }

    .admin-scope .link-btn--small.danger:active:not(:disabled) {
        background: #fee;
    }
}

/* =========================
   GUESTS PAGE - TABLE & CARDS
========================= */

/* Wide container for guests page */
.admin-scope .admin-container--wide {
    max-width: 1200px;
}

/* Filters grid layout */
.admin-scope .admin-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--admin-space-md);
}

/* Summary stats line */
.admin-scope .admin-summary-stats {
    padding-top: var(--admin-space-sm);
    margin-top: var(--admin-space-md);
    border-top: 1px solid var(--admin-border);
    color: var(--admin-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* Quick filter buttons */
.admin-scope .admin-quick-filters {
    display: flex;
    gap: var(--admin-space-sm);
    flex-wrap: wrap;
    margin-top: var(--admin-space-sm);
}

.admin-scope .admin-quick-filter-btn {
    padding: 4px 10px;
    font-size: 12px;
}

/* Bulk actions card - subtle info panel */
.admin-scope .admin-bulk-actions {
    margin-top: var(--admin-space-md);
    background: #f0f9ff;
    border: 1px solid #bfdbfe;
    padding: var(--admin-space-md);
    box-shadow: var(--admin-shadow-sm);
}

.admin-scope .admin-bulk-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--admin-space-sm);
    margin-bottom: var(--admin-space-md);
    font-size: 14px;
    font-weight: 500;
    color: var(--admin-text);
}

.admin-scope .admin-bulk-actions-controls {
    display: grid;
    grid-template-columns: repeat(2, 1fr auto);
    gap: var(--admin-space-sm);
    align-items: end;
}

.admin-scope .admin-bulk-field {
    min-width: 150px;
}

.admin-scope .admin-bulk-field label {
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    display: block;
}

/* Compact submit buttons in bulk actions */
.admin-scope .admin-bulk-actions .submit-btn {
    height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

/* Tags button spans both columns on desktop */
.admin-scope .admin-bulk-actions-controls > .link-btn:last-child {
    grid-column: 1 / -1;
}

/* Guest table styles */
.admin-scope .admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--admin-card-bg);
    table-layout: auto;
}

.admin-scope .admin-table thead {
    background: #f8f9fa;
    border-bottom: 2px solid var(--admin-border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-scope .admin-table th {
    padding: var(--admin-space-sm) var(--admin-space-md);
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--admin-text);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.admin-scope .admin-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

/* Row hover only on hover devices */
@media (hover: hover) {
    .admin-scope .admin-table tbody tr:hover {
        background: #f9fafb;
    }
}

.admin-scope .admin-table td {
    padding: var(--admin-space-sm) var(--admin-space-md);
    vertical-align: middle;
}

.admin-scope .admin-table td select {
    min-width: 140px;
}

/* Table checkbox column */
.admin-scope .admin-table-checkbox-col {
    width: 40px;
}

/* Tag chips in table */
.admin-scope .admin-tag-chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-scope .admin-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: #e5e7eb;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--admin-text);
    white-space: nowrap;
}

/* Saving indicator */
.admin-scope .admin-saving-indicator {
    color: #059669;
    font-size: 12px;
    margin-left: 6px;
    font-style: italic;
}

/* Guest cards for mobile */
.admin-scope .admin-guest-cards {
    display: flex;
    flex-direction: column;
    gap: var(--admin-space-md);
}

.admin-scope .admin-guest-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-space-md);
    box-shadow: var(--admin-shadow-sm);
}

.admin-scope .admin-guest-card-header {
    display: flex;
    align-items: center;
    gap: var(--admin-space-sm);
    margin-bottom: var(--admin-space-sm);
}

.admin-scope .admin-guest-card-checkbox {
    flex-shrink: 0;
}

.admin-scope .admin-guest-card-title {
    flex: 1;
    min-width: 0;
}

.admin-scope .admin-guest-card-title strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 2px;
}

.admin-scope .admin-guest-card-meta {
    color: var(--admin-text-muted);
    font-size: 13px;
}

.admin-scope .admin-guest-card-field {
    margin-top: var(--admin-space-sm);
}

.admin-scope .admin-guest-card-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--admin-text);
    margin-bottom: 4px;
}

.admin-scope .admin-guest-card-field select {
    width: 100%;
}

/* Show/hide table vs cards based on screen size */
.admin-scope .admin-table-view {
    display: block;
    overflow-x: auto;
}

.admin-scope .admin-card-view {
    display: none;
}

@media (max-width: 640px) {
    .admin-scope .admin-table-view {
        display: none;
    }

    .admin-scope .admin-card-view {
        display: block;
    }

    .admin-scope .admin-filters-grid {
        grid-template-columns: 1fr;
    }

    /* Stack bulk actions on mobile */
    .admin-scope .admin-bulk-actions-controls {
        grid-template-columns: 1fr;
    }

    .admin-scope .admin-bulk-actions-controls > .link-btn:last-child {
        grid-column: auto;
    }

    .admin-scope .admin-bulk-field {
        width: 100%;
    }
}

/* =========================
   TABLES PAGE - CAPACITY MANAGEMENT
========================= */

/* Outer card wrapper for the entire table section */
.admin-scope .admin-table-card {
    margin-top: var(--admin-space-lg);
    padding: var(--admin-space-lg);
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-md);
    width: 100%;
}

/* Table container for desktop */
.admin-scope .admin-table-container {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-space-lg);
    box-shadow: var(--admin-shadow-sm);
    overflow: hidden;
    width: 100%;
}

/* Tables table view for desktop */
.admin-scope .admin-tables-table-view {
    display: block;
}

.admin-scope .admin-tables-card-view {
    display: none;
}

/* Desktop table alignment improvements */
.admin-scope .admin-table th:nth-child(2),
.admin-scope .admin-table td:nth-child(2),
.admin-scope .admin-table th:nth-child(3),
.admin-scope .admin-table td:nth-child(3),
.admin-scope .admin-table th:nth-child(5),
.admin-scope .admin-table td:nth-child(5) {
    text-align: center;
}

.admin-scope .admin-table th:nth-child(4),
.admin-scope .admin-table td:nth-child(4) {
    text-align: center;
}

/* Notes column with ellipsis */
.admin-scope .admin-table td:nth-child(6) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Action buttons in table - keep compact */
.admin-scope .admin-table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-scope .admin-table-actions .link-btn {
    padding: 4px 10px;
    font-size: 12px;
    white-space: nowrap;
}

/* Tables cards for mobile */
.admin-scope .admin-tables-cards {
    display: flex;
    flex-direction: column;
    gap: var(--admin-space-md);
}

.admin-scope .admin-table-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-space-lg);
    box-shadow: var(--admin-shadow-sm);
    transition: box-shadow var(--admin-transition-normal) ease,
                border-color var(--admin-transition-normal) ease;
}

@media (hover: hover) {
    .admin-scope .admin-table-card:hover {
        box-shadow: var(--admin-shadow-md);
        border-color: #cbd5e1;
    }
}

.admin-scope .admin-table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: var(--admin-space-md);
    margin-bottom: var(--admin-space-sm);
}

.admin-scope .admin-table-card-content {
    flex: 1;
    min-width: 0;
}

.admin-scope .admin-table-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 6px;
}

.admin-scope .admin-table-card-stats {
    display: flex;
    gap: var(--admin-space-sm);
    flex-wrap: wrap;
    align-items: center;
    color: var(--admin-text-muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.admin-scope .admin-table-card-notes {
    color: var(--admin-text-muted);
    font-size: 13px;
    font-style: italic;
    margin-top: 8px;
}

.admin-scope .admin-table-card-actions {
    display: flex;
    gap: var(--admin-space-sm);
    flex-wrap: wrap;
    margin-top: var(--admin-space-sm);
}

/* Capacity status badges */
.admin-scope .admin-capacity-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--admin-radius-sm);
    white-space: nowrap;
}

.admin-scope .admin-capacity-badge--unlimited {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.admin-scope .admin-capacity-badge--available {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #86efac;
}

.admin-scope .admin-capacity-badge--low {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.admin-scope .admin-capacity-badge--over {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Action button groups in cards */
.admin-scope .admin-card-actions-group {
    display: flex;
    gap: var(--admin-space-sm);
}

@media (max-width: 640px) {
    .admin-scope .admin-tables-table-view {
        display: none;
    }

    .admin-scope .admin-tables-card-view {
        display: block;
    }

    .admin-scope .admin-table-card {
        padding: var(--admin-space-md);
    }

    .admin-scope .admin-table-card-header {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-scope .admin-card-actions-group {
        width: 100%;
    }
}

/* =========================
   TAGS PAGE - TAG MANAGEMENT
========================= */

/* Outer card wrapper for tags table section */
.admin-scope .admin-tags-table-card {
    margin-top: var(--admin-space-lg);
    padding: var(--admin-space-lg);
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    box-shadow: var(--admin-shadow-md);
    width: 100%;
}

/* Tags table view for desktop */
.admin-scope .admin-tags-table-view {
    display: block;
}

.admin-scope .admin-tags-card-view {
    display: none;
}

/* Desktop table alignment for tags */
.admin-scope .admin-tags-table th:nth-child(2),
.admin-scope .admin-tags-table td:nth-child(2),
.admin-scope .admin-tags-table th:nth-child(3),
.admin-scope .admin-tags-table td:nth-child(3) {
    text-align: center;
}

/* Tags cards for mobile */
.admin-scope .admin-tags-cards {
    display: flex;
    flex-direction: column;
    gap: var(--admin-space-md);
}

.admin-scope .admin-tag-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-space-lg);
    box-shadow: var(--admin-shadow-sm);
    transition: box-shadow var(--admin-transition-normal) ease,
                border-color var(--admin-transition-normal) ease;
}

@media (hover: hover) {
    .admin-scope .admin-tag-card:hover {
        box-shadow: var(--admin-shadow-md);
        border-color: #cbd5e1;
    }
}

.admin-scope .admin-tag-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: var(--admin-space-md);
    margin-bottom: var(--admin-space-sm);
}

.admin-scope .admin-tag-card-content {
    flex: 1;
    min-width: 0;
}

.admin-scope .admin-tag-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 6px;
}

.admin-scope .admin-tag-card-meta {
    color: var(--admin-text-muted);
    font-size: 13px;
}

.admin-scope .admin-tag-card-actions {
    display: flex;
    gap: var(--admin-space-sm);
    flex-wrap: wrap;
    margin-top: var(--admin-space-sm);
}

@media (max-width: 640px) {
    .admin-scope .admin-tags-table-view {
        display: none;
    }

    .admin-scope .admin-tags-card-view {
        display: block;
    }

    .admin-scope .admin-tag-card {
        padding: var(--admin-space-md);
    }

    .admin-scope .admin-tag-card-header {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================
   MOBILE BOTTOM SHEET
========================= */

/* Bottom sheet overlay */
.admin-scope .admin-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9998;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: admin-sheet-fade-in var(--admin-transition-normal) ease;
}

@keyframes admin-sheet-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Bottom sheet container */
.admin-scope .admin-sheet {
    background: var(--admin-card-bg);
    border-radius: var(--admin-radius-lg) var(--admin-radius-lg) 0 0;
    box-shadow: var(--admin-shadow-lg);
    max-height: 85vh;
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    animation: admin-sheet-slide-up var(--admin-transition-normal) ease;
}

@keyframes admin-sheet-slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .admin-scope .admin-sheet-overlay {
        animation: none;
    }

    .admin-scope .admin-sheet {
        animation: none;
    }
}

/* Bottom sheet header */
.admin-scope .admin-sheet-header {
    padding: var(--admin-space-lg);
    border-bottom: 1px solid var(--admin-border);
    flex-shrink: 0;
}

.admin-scope .admin-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0 0 4px;
}

.admin-scope .admin-sheet-subtitle {
    font-size: 13px;
    color: var(--admin-text-muted);
    margin: 0;
}

/* Bottom sheet body */
.admin-scope .admin-sheet-body {
    padding: var(--admin-space-lg);
    overflow-y: auto;
    flex: 1;
}

/* Bottom sheet footer */
.admin-scope .admin-sheet-footer {
    padding: var(--admin-space-lg);
    border-top: 1px solid var(--admin-border);
    flex-shrink: 0;
    display: flex;
    gap: var(--admin-space-sm);
}

/* =========================
   MOBILE COLLAPSED BULK BAR
========================= */

/* Collapsed bulk action bar (mobile) */
.admin-scope .admin-bulkbar {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: var(--admin-space-sm) var(--admin-space-md);
    margin-top: var(--admin-space-md);
    box-shadow: var(--admin-shadow-sm);
}

.admin-scope .admin-bulkbar-collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--admin-space-sm);
}

.admin-scope .admin-bulkbar-summary {
    font-size: 14px;
    color: var(--admin-text);
    font-weight: 500;
}

.admin-scope .admin-bulkbar-toggle {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-primary);
    background: transparent;
    border: 1px solid var(--admin-primary);
    border-radius: var(--admin-radius-sm);
    cursor: pointer;
    transition: background var(--admin-transition-fast) ease,
                color var(--admin-transition-fast) ease;
}

.admin-scope .admin-bulkbar-toggle:hover {
    background: var(--admin-primary);
    color: #fff;
}

.admin-scope .admin-bulkbar-toggle:active {
    transform: scale(0.98);
}

/* Expanded bulk actions content */
.admin-scope .admin-bulkbar-expanded {
    margin-top: var(--admin-space-md);
    padding-top: var(--admin-space-md);
    border-top: 1px solid var(--admin-border);
    display: none;
}

.admin-scope .admin-bulkbar-expanded.is-open {
    display: block;
}

/* =========================
   MOBILE GUEST SUMMARY CARDS
========================= */

/* Simplified mobile guest cards (summary only) */
.admin-scope .admin-guest-summary-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-lg);
    padding: 14px 16px;
    box-shadow: var(--admin-shadow-sm);
    transition: box-shadow var(--admin-transition-fast) ease,
                border-color var(--admin-transition-fast) ease,
                transform var(--admin-transition-fast) ease,
                background var(--admin-transition-fast) ease;
    cursor: pointer;
    user-select: none;
}

/* Hover effects only on devices with hover capability */
@media (hover: hover) {
    .admin-scope .admin-guest-summary-card:hover {
        box-shadow: var(--admin-shadow-md);
        border-color: #cbd5e1;
        transform: translateY(-1px);
    }
}

.admin-scope .admin-guest-summary-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: var(--admin-space-sm);
    margin-bottom: 8px;
}

.admin-scope .admin-guest-summary-header-left {
    display: flex;
    align-items: start;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.admin-scope .admin-guest-summary-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--admin-text);
    flex: 1;
    min-width: 0;
}

.admin-scope .admin-guest-summary-contact {
    font-size: 13px;
    color: var(--admin-text-muted);
    margin-bottom: 8px;
}

.admin-scope .admin-guest-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--admin-text-muted);
}

.admin-scope .admin-guest-summary-label {
    display: inline-block;
}

.admin-scope .admin-guest-summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.admin-scope .admin-guest-summary-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: var(--admin-radius-sm);
}

.admin-scope .admin-guest-summary-tag-more {
    background: #e5e7eb;
    color: #4b5563;
}

/* =========================
   MOBILE SELECTION MODE
========================= */

/* Utility classes for responsive display */
.admin-scope .admin-mobile-only {
    display: block;
}

.admin-scope .admin-desktop-only {
    display: none;
}

@media (min-width: 640px) {
    .admin-scope .admin-mobile-only {
        display: none !important;
    }

    .admin-scope .admin-desktop-only {
        display: block !important;
    }
}

@media (max-width: 639px) {
    .admin-scope .admin-desktop-only {
        display: none !important;
    }

    .admin-scope .admin-mobile-only {
        display: block !important;
    }
}

/* Selected card state */
.admin-scope .admin-guest-summary-card.is-selected {
    border-color: #3b82f6;
    border-width: 2px;
    background: #eff6ff;
}

/* Checkbox in selection mode - normal flow, not absolute */
.admin-scope .admin-guest-summary-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #2563eb;
    cursor: pointer;
    flex: 0 0 auto;
    margin-top: 2px;
}

/* Sticky bottom bulk bar for mobile */
.admin-scope .admin-mobile-bulk-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--admin-card-bg);
    border-top: 2px solid var(--admin-border);
    padding: var(--admin-space-md);
    padding-bottom: calc(var(--admin-space-md) + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 9997;
    display: flex;
    align-items: center;
    gap: var(--admin-space-sm);
}

.admin-scope .admin-mobile-bulk-bar-info {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text);
}

.admin-scope .admin-mobile-bulk-bar-actions {
    display: flex;
    gap: var(--admin-space-sm);
}

/* Add padding when bulk bar is visible */
.admin-scope .admin-guest-cards.has-bulk-bar {
    padding-bottom: 80px;
}

/* Bulk actions sheet */
.admin-scope .admin-bulk-sheet {
    background: var(--admin-card-bg);
    border-radius: var(--admin-radius-lg) var(--admin-radius-lg) 0 0;
    box-shadow: var(--admin-shadow-lg);
    max-height: 75vh;
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    animation: admin-sheet-slide-up var(--admin-transition-normal) ease;
}

.admin-scope .admin-bulk-sheet-header {
    padding: var(--admin-space-lg);
    border-bottom: 1px solid var(--admin-border);
    flex-shrink: 0;
}

.admin-scope .admin-bulk-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--admin-text);
    margin: 0;
}

.admin-scope .admin-bulk-sheet-body {
    padding: var(--admin-space-lg);
    overflow-y: auto;
    flex: 1;
}

.admin-scope .admin-bulk-action-section {
    margin-bottom: var(--admin-space-lg);
    padding-bottom: var(--admin-space-lg);
    border-bottom: 1px solid var(--admin-border);
}

.admin-scope .admin-bulk-action-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* =========================
   MOBILE TOUCH FEEDBACK & ACCESSIBILITY
========================= */

/* Enhanced touch feedback for mobile selection mode */
@media (hover: none) and (pointer: coarse) {
    /* Guest summary cards */
    .admin-scope .admin-guest-summary-card:active {
        transform: scale(0.98);
        background: #f9fafb;
    }

    .admin-scope .admin-guest-summary-card.is-selected:active {
        background: #dbeafe;
        transform: scale(0.98);
    }

    /* Selection mode toggle buttons */
    .admin-scope .admin-card-view .link-btn:active,
    .admin-scope .admin-card-view .submit-btn:active {
        transform: scale(0.96);
    }

    /* Mobile bulk bar buttons */
    .admin-scope .admin-mobile-bulk-bar .submit-btn:active,
    .admin-scope .admin-mobile-bulk-bar .link-btn:active {
        transform: scale(0.95);
    }

    /* Checkboxes - enhance tap target */
    .admin-scope .admin-guest-summary-checkbox {
        min-width: 24px;
        min-height: 24px;
    }
}

/* Respect prefers-reduced-motion - disable all animations and transforms */
@media (prefers-reduced-motion: reduce) {
    /* Guest cards */
    .admin-scope .admin-guest-summary-card {
        transition: none;
    }

    .admin-scope .admin-guest-summary-card:hover,
    .admin-scope .admin-guest-summary-card:active {
        transform: none;
    }

    /* Bulk bar */
    .admin-scope .admin-mobile-bulk-bar .submit-btn,
    .admin-scope .admin-mobile-bulk-bar .link-btn {
        transition: none;
    }

    .admin-scope .admin-mobile-bulk-bar .submit-btn:active,
    .admin-scope .admin-mobile-bulk-bar .link-btn:active {
        transform: none;
    }

    /* All buttons in mobile context */
    .admin-scope .admin-card-view .link-btn,
    .admin-scope .admin-card-view .submit-btn {
        transition: none;
    }

    .admin-scope .admin-card-view .link-btn:active,
    .admin-scope .admin-card-view .submit-btn:active {
        transform: none;
    }

    /* Bottom sheets */
    .admin-scope .admin-sheet-overlay,
    .admin-scope .admin-sheet,
    .admin-scope .admin-bulk-sheet {
        animation: none !important;
    }
}
