/* Manager Dashboard V3 - Calendar-Focused Layout */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #F5F6F7;
    color: #1a1a1a;
    overflow-x: hidden;
}

body.dark-mode {
    background: #1a1a1a;
    color: #E6E7E8;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

body.dark-mode .loading-overlay {
    background: rgba(26, 26, 26, 0.95);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #4D6171;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 20px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

body.dark-mode .loading-text {
    color: #E6E7E8;
}

.loading-subtext {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

body.dark-mode .loading-subtext {
    color: #999;
}

/* Dashboard Wrapper */
.dashboard-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    background: #001D34;
    padding: 8px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

body.dark-mode .top-header {
    background: #001D34;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0; /* Prevent logo/title from shrinking */
}

.logo-link {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-image {
    height: 20px;
    width: auto;
}

/* View Only Badge - shown for non-EventManager users */
.view-only-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    margin-left: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-warning-text, #856404);
    background-color: var(--color-warning-bg, #fff3cd);
    border: 1px solid var(--color-warning-border, #ffc107);
    border-radius: 4px;
    cursor: help;
}

body.dark-mode .view-only-badge {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.15);
    border-color: rgba(255, 193, 7, 0.4);
}

.logo-light {
    display: none;
}

.logo-dark {
    display: block;
}

body.dark-mode .logo-light {
    display: none;
}

body.dark-mode .logo-dark {
    display: block;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: white;
    margin: 0;
}

body.dark-mode .page-title {
    color: white;
}

.header-center {
    display: flex;
    justify-content: center;
    flex: 1;
    min-width: 0; /* Allow shrinking below content size */
    padding: 0 24px; /* Ensure search bar never touches adjacent content */
    overflow: hidden; /* Prevent content from overflowing */
}

.header-center.hidden {
    display: none !important;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-shrink: 0; /* Prevent right side from shrinking */
}

.search-container-header {
    position: relative;
    width: 100%;
    max-width: 473px;
    min-width: 150px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

body.dark-mode .search-icon {
    color: #999;
}

.search-input {
    width: 100%;
    padding: 6px 12px 6px 36px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    background: #ffffff;
    color: #001D34;
    height: 30px;
}

.search-input::placeholder {
    color: #666;
}

.search-input:focus {
    outline: none;
    border-color: #4D6171;
    background: #ffffff;
}

body.dark-mode .search-input {
    background: #1a1a1a;
    border-color: #444;
    color: #E6E7E8;
}

/* Browse Events button - navigate from manager dashboard back to events */
.btn-browse-events {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-browse-events:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-browse-events svg {
    flex-shrink: 0;
}

/* View Toggle Button - Manager/Attendee switch */
.view-toggle {
    display: none; /* Hidden by default, shown only for managers */
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.view-toggle.visible {
    display: flex;
}

.view-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.view-toggle-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.view-toggle-btn.active {
    background: #4D6171;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.view-toggle-btn.active:hover {
    background: #3d4e5c;
}

.view-toggle-btn svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

/* Dark mode adjustments for toggle */
body.dark-mode .view-toggle {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .view-toggle-btn {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .view-toggle-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .view-toggle-btn.active {
    background: #5a7186;
    color: white;
}

body.dark-mode .view-toggle-btn.active:hover {
    background: #4a6073;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-chevron {
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.user-info.open .dropdown-chevron {
    transform: rotate(180deg);
}

.profile-info-inline {
    text-align: right;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.profile-email {
    font-size: 12px;
    color: #666;
}

body.dark-mode .profile-name {
    color: #E6E7E8;
}

body.dark-mode .profile-email {
    color: #999;
}

.profile-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #4D6171, #001D34);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.profile-initials {
    text-transform: uppercase;
}

/* Profile Dropdown Menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-info.open .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

body.dark-mode .profile-dropdown {
    background: #2C2C2C;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
}

body.dark-mode .dropdown-header {
    background: #333;
}

.profile-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4D6171, #001D34);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.dropdown-user-info {
    flex: 1;
    min-width: 0;
}

.dropdown-user-name {
    font-size: 15px;
    font-weight: 600;
    color: #001D34;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .dropdown-user-name {
    color: #E6E7E8;
}

.dropdown-user-email {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .dropdown-user-email {
    color: #999;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0;
}

body.dark-mode .dropdown-divider {
    background: #444;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f0f0f0;
    text-decoration: none;
    color: #333;
}

body.dark-mode .dropdown-item {
    color: #E6E7E8;
}

body.dark-mode .dropdown-item:hover {
    background: #3a3a3a;
    color: #E6E7E8;
}

.dropdown-item svg {
    flex-shrink: 0;
    color: #666;
}

body.dark-mode .dropdown-item svg {
    color: #999;
}

.dropdown-item-text {
    flex: 1;
}

.dropdown-item-danger {
    color: #dc3545;
}

.dropdown-item-danger:hover {
    background: #fff5f5;
}

body.dark-mode .dropdown-item-danger {
    color: #ff6b6b;
}

body.dark-mode .dropdown-item-danger:hover {
    background: rgba(255, 107, 107, 0.1);
}

.dropdown-item-danger svg {
    color: #dc3545;
}

body.dark-mode .dropdown-item-danger svg {
    color: #ff6b6b;
}

/* Theme toggle switch in dropdown */
.theme-toggle-switch {
    width: 40px;
    height: 22px;
    background: #ccc;
    border-radius: 11px;
    position: relative;
    transition: background 0.2s ease;
}

body.dark-mode .theme-toggle-switch {
    background: #4D6171;
}

.theme-toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .theme-toggle-slider {
    transform: translateX(18px);
}

.theme-icon-light {
    display: block;
}

.theme-icon-dark {
    display: none;
}

body.dark-mode .theme-icon-light {
    display: none;
}

body.dark-mode .theme-icon-dark {
    display: block;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0; /* Important for flex children */
}

/* Left Sidebar */
.sidebar {
    width: 240px;
    align-self: stretch;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
}

body.dark-mode .sidebar {
    background: #2C2C2C;
    border-right-color: #444;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(77, 97, 113, 0.15);
    color: #4D6171;
}

.nav-item.active {
    background: linear-gradient(135deg, #4D6171, #3d4e5c);
    color: white;
}

body.dark-mode .nav-item {
    color: #C8C9CA;
}

body.dark-mode .nav-item:hover {
    background: rgba(77, 97, 113, 0.3);
    color: #E6E7E8;
}

body.dark-mode .nav-item.active {
    background: linear-gradient(135deg, #4D6171, #3d4e5c);
    color: white;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
    background: white;
}

body.dark-mode .sidebar-footer {
    border-top-color: #444;
    background: #2C2C2C;
}

.dark-mode-toggle-sidebar,
.logout-btn-sidebar {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: #F5F6F7;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle-sidebar:hover,
.logout-btn-sidebar:hover {
    background: #e0e0e0;
    color: white;
}

.logout-btn-sidebar {
    background: #FFE5E5;
    color: #E51938;
}

.logout-btn-sidebar:hover {
    background: #FFD0D0;
}

body.dark-mode .dark-mode-toggle-sidebar {
    background: #3A3A3A;
    color: #C8C9CA;
}

body.dark-mode .dark-mode-toggle-sidebar:hover {
    background: #4A4A4A;
}

body.dark-mode .logout-btn-sidebar {
    background: #4a1f1f;
    color: #ff6b6b;
}

body.dark-mode .logout-btn-sidebar:hover {
    background: #5a2525;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px 24px 24px 24px;
    overflow-y: auto;
    background: white;
}

body.dark-mode .main-content {
    background: #1a1a1a;
}

/* Calendar Controls */
.main-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: #e7e7e7;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    height: 45px;
}

body.dark-mode .main-controls {
    background: #2C2C2C;
}

/* Calendar Section */
.calendar-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 16px;
    background: #F5F6F7;
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid #e0e0e0;
}

body.dark-mode .calendar-header {
    background: #2C2C2C;
    border-bottom-color: #444;
}

.calendar-nav-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-nav-group {
    display: flex;
    align-items: center;
    flex: 1;
}

.search-nav-group .search-container-header {
    flex: 1;
    max-width: 500px;
}

.btn-today {
    padding: 7px 12px 5px 12px;
    border: 1px solid #ccc;
    background: white;
    color: #333;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    height: 30px;
    line-height: 1.2;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-today:hover {
    border-color: #4D6171;
}

body.dark-mode .btn-today {
    background: #1a1a1a;
    border-color: #444;
    color: #E6E7E8;
}

body.dark-mode .btn-today:hover {
    border-color: #4D6171;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-nav {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-nav:hover {
    background: #F5F6F7;
    border-color: #4D6171;
    color: #4D6171;
}

body.dark-mode .btn-nav {
    background: #1a1a1a;
    border-color: #444;
    color: #C8C9CA;
}

body.dark-mode .btn-nav:hover {
    background: #3A3A3A;
    border-color: #4D6171;
    color: #4D6171;
}

#currentMonth {
    font-size: 18px;
    font-weight: 600;
    color: #001D34;
    margin: 0;
    min-width: 180px;
    text-align: center;
}

body.dark-mode #currentMonth {
    color: #E6E7E8;
}

.calendar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* Action buttons group - keeps Export and New Event together */
.action-buttons-group {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Inline search box in main controls */
.search-container-inline {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 150px;
}

.search-container-inline .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
}

.search-input-inline {
    width: 100%;
    padding: 8px 12px 8px 38px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    height: 38px;
    background: #ffffff;
    color: #001D34;
}

.search-input-inline:focus {
    outline: none;
    border-color: #4D6171;
}

.search-input-inline::placeholder {
    color: #666;
}

body.dark-mode .search-input-inline {
    background: #1a1a1a;
    border-color: #444;
    color: #E6E7E8;
}

body.dark-mode .search-input-inline::placeholder {
    color: #888;
}

body.dark-mode .search-container-inline .search-icon {
    color: #888;
}

.search-container-inline .search-icon {
    color: #4D6171;
}

.sort-container {
    display: block;
    flex-shrink: 0;
}

.sort-select {
    padding: 6px 32px 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23666" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    height: 30px;
    line-height: 1.2;
}

body.dark-mode .sort-select {
    background-color: #1a1a1a;
    border-color: #444;
    color: #E6E7E8;
}

.tag-filter-container {
    position: relative;
    flex-shrink: 0;
}

.controls-spacer {
    flex: 1;
}

.tag-filter-btn {
    padding: 8px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    white-space: nowrap;
}

.tag-filter-btn:hover {
    border-color: #4D6171;
}

body.dark-mode .tag-filter-btn {
    background: #1a1a1a;
    border-color: #444;
    color: #E6E7E8;
}

.tag-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 250px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

body.dark-mode .tag-filter-dropdown {
    background: #2C2C2C;
    border-color: #444;
}

.tag-filter-header {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.dark-mode .tag-filter-header {
    border-bottom-color: #444;
}

.filter-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

body.dark-mode .filter-title {
    color: #E6E7E8;
}

.clear-filters-btn {
    background: none;
    border: none;
    color: #4D6171;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
}

.clear-filters-btn:hover {
    text-decoration: underline;
}

.tag-filter-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

body.dark-mode .tag-filter-loading {
    color: #999;
}

.tag-filter-list {
    padding: 8px;
}

.tag-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tag-filter-item:hover {
    background: #f5f6f7;
}

body.dark-mode .tag-filter-item:hover {
    background: #3a3a3a;
}

.tag-filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4D6171;
    flex-shrink: 0;
}

.tag-filter-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .tag-filter-color {
    border-color: rgba(255, 255, 255, 0.2);
}

.tag-filter-name {
    flex: 1;
    font-size: 13px;
    font-weight: 400;
    color: #333;
    cursor: pointer;
    line-height: 1.4;
}

body.dark-mode .tag-filter-name {
    color: #E6E7E8;
}

.tag-filter-count {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

body.dark-mode .tag-filter-count {
    color: #999;
    background: #3a3a3a;
}

.tag-filter-error {
    padding: 20px;
    text-align: center;
    color: #E51938;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #4D6171;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 8px;
}

.btn-new-event {
    padding: 8px 16px;
    border: none;
    background: #4D6171;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    height: 30px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-new-event:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(77, 97, 113, 0.3);
}

.selected-tag-badges {
    display: none;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-tag-badges.has-tags {
    display: flex;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    transition: all 0.2s ease;
}

.tag-badge-remove {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.tag-badge-remove:hover {
    opacity: 1;
}

/* Calendar Grid */
.calendar-grid {
    background: #fafafa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    flex: 1;
}

body.dark-mode .calendar-grid {
    background: #2C2C2C;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #666;
    padding: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    min-height: auto;
}

body.dark-mode .calendar-day-header {
    background: #3A3A3A;
    color: #999;
}

.calendar-day {
    min-height: 120px;
    max-height: 120px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px;
    background: white;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.calendar-day:hover {
    border-color: #4D6171;
    background: #f8f9fa;
}

body.dark-mode .calendar-day {
    background: #3A3A3A;
    border-color: #555;
}

body.dark-mode .calendar-day:hover {
    border-color: #4D6171;
    background: #404040;
}

.calendar-day.today {
    background: #e8f4f8;
    border-color: #4D6171;
    border-width: 2px;
}

body.dark-mode .calendar-day.today {
    background: #1a3a4a;
    border-color: #4D6171;
}

.calendar-day.other-month {
    opacity: 0.4;
}

.calendar-day-number {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    flex-shrink: 0;
}

body.dark-mode .calendar-day-number {
    color: #E6E7E8;
}

.calendar-day.today .calendar-day-number {
    color: #4D6171;
}

.calendar-day-events {
    display: block;
    position: relative;
    flex: 1;
    min-height: 90px;
}

.calendar-event-bar {
    background: linear-gradient(135deg, #4D6171 0%, #3d4e5c 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: width 0.15s ease-out, transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    will-change: width;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: absolute;
    left: 0;
    z-index: 2;
    height: 18px;
    line-height: 14px;
    display: flex;
    align-items: center;
}

.calendar-event-bar:hover {
    background: linear-gradient(135deg, #3d4e5c 0%, #006699 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.calendar-event-badge {
    background: #4D6171;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    height: 18px;
    line-height: 14px;
    display: flex;
    align-items: center;
    position: absolute;
    left: 0;
    right: 0;
}

.calendar-event-badge:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.calendar-day.calendar-holiday .calendar-day-number {
    color: #dc3545;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

body.dark-mode .calendar-day.calendar-holiday .calendar-day-number {
    color: #ff6b6b;
}

.calendar-holiday-badge {
    font-size: 9px;
    color: #dc3545;
    font-weight: 600;
    background: rgba(220, 53, 69, 0.1);
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-width: calc(100% - 30px);
}

body.dark-mode .calendar-holiday-badge {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

/* Right Sidebar - Event Details */
.event-details-sidebar {
    width: 320px;
    background: white;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

body.dark-mode .event-details-sidebar {
    background: #2C2C2C;
    border-left-color: #444;
}

.event-details-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

body.dark-mode .event-details-header {
    border-bottom-color: #444;
}

.event-details-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #001D34;
    margin: 0;
}

body.dark-mode .event-details-header h3 {
    color: #E6E7E8;
}

.event-details-content {
    padding: 20px;
    flex: 1;
}

.event-details-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-details-title {
    font-size: 18px;
    font-weight: 600;
    color: #001D34;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

body.dark-mode .event-details-title {
    color: #E6E7E8;
}

.event-detail-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.detail-icon {
    flex-shrink: 0;
    color: #4D6171;
    margin-top: 2px;
}

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

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

body.dark-mode .detail-label {
    color: #999;
}

.detail-value {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    word-wrap: break-word;
}

body.dark-mode .detail-value {
    color: #E6E7E8;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.detail-tags .event-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.no-tags {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

/* Tag Details Sidebar Styles */
.tag-header-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tag-color-large {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.tag-events-list {
    margin-top: 8px;
}

.tag-events-list .detail-label {
    margin-bottom: 8px;
}

.tag-events-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 200px;
    overflow-y: auto;
}

.tag-event-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f5f7f9;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 13px;
    color: #333;
}

.tag-event-item:hover {
    background: #e8f4fc;
}

.tag-event-item .event-icon {
    flex-shrink: 0;
    color: #4D6171;
}

.tag-event-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.dark-mode .tag-event-item {
    background: #2a2a2a;
    color: #E6E7E8;
}

body.dark-mode .tag-event-item:hover {
    background: #1a3a4a;
}

body.dark-mode .tag-event-item .event-icon {
    color: #999;
}

.no-events-message {
    font-size: 12px;
    color: #999;
    font-style: italic;
    padding: 8px 0;
}

.more-events-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    padding: 4px 0;
    margin: 0;
}

body.dark-mode .more-events-note {
    color: #999;
}

/* Attendee Details Sidebar Styles */
.attendee-header-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.attendee-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.attendee-header-info .event-details-title {
    margin-bottom: 0;
}

.sidebar-avatar {
    flex-shrink: 0;
}

.sidebar-avatar-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.sidebar-avatar-initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A2E1, #0078d4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #666;
}

.sidebar-loading p {
    margin: 12px 0 0 0;
    font-size: 13px;
}

.loading-spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid #e0e0e0;
    border-top-color: #00A2E1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

body.dark-mode .sidebar-loading {
    color: #999;
}

body.dark-mode .loading-spinner-small {
    border-color: #444;
    border-top-color: #4da6ff;
}

.sidebar-error {
    padding: 20px;
    text-align: center;
    color: #dc3545;
}

body.dark-mode .sidebar-error {
    color: #ff6b6b;
}

.capacity-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-top: 6px;
    overflow: hidden;
}

body.dark-mode .capacity-bar {
    background: #555;
}

.capacity-fill {
    height: 100%;
    background: linear-gradient(90deg, #4D6171 0%, #3d4e5c 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 75-99% capacity - yellow/warning */
.capacity-bar.warning .capacity-fill {
    background: linear-gradient(90deg, #f0ad4e 0%, #ec971f 100%);
}

/* 100% capacity - red/full */
.capacity-bar.critical .capacity-fill {
    background: linear-gradient(90deg, #d9534f 0%, #c9302c 100%);
}

/* Mini capacity bar for event list */
.event-registrations-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
}

.registrations-text {
    color: #666;
    font-size: 12px;
    white-space: nowrap;
}

body.dark-mode .registrations-text {
    color: #999;
}

.capacity-bar-mini {
    width: 100%;
    max-width: 80px;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

body.dark-mode .capacity-bar-mini {
    background: #555;
}

.capacity-fill-mini {
    height: 100%;
    background: linear-gradient(90deg, #4D6171 0%, #3d4e5c 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* 75-99% capacity - yellow/warning */
.capacity-bar-mini.warning .capacity-fill-mini {
    background: linear-gradient(90deg, #f0ad4e 0%, #ec971f 100%);
}

/* 100% capacity - red/full */
.capacity-bar-mini.critical .capacity-fill-mini {
    background: linear-gradient(90deg, #d9534f 0%, #c9302c 100%);
}

.event-detail-description {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

body.dark-mode .event-detail-description {
    border-top-color: #444;
}

.event-detail-actions {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

body.dark-mode .event-detail-actions {
    border-top-color: #444;
}

.btn-view-full-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #4D6171;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-view-full-details:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 162, 225, 0.3);
}

.btn-view-full-details svg {
    width: 16px;
    height: 16px;
}

.event-details-content {
    padding: 20px;
    flex: 1;
}

.no-event-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-event-selected svg {
    margin-bottom: 16px;
}

.no-event-selected p {
    font-size: 14px;
    margin: 0;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

/* Native Dialog Styles */
.modal-dialog {
    border: none;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: white;
}

/* Center dialog when open - uses inset/margin approach for native dialogs */
.modal-dialog[open] {
    position: fixed;
    inset: 0;
    margin: auto;
}

.modal-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.modal-dialog-small {
    max-width: 450px;
}

body.dark-mode .modal-dialog {
    background: #2C2C2C;
}

body.dark-mode .modal-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

body.dark-mode .modal-content {
    background: #2C2C2C;
}

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

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #001D34;
    margin: 0;
}

body.dark-mode .modal-header h3 {
    color: #E6E7E8;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close-btn:hover {
    background: #F5F6F7;
}

body.dark-mode .modal-close-btn {
    color: #999;
}

body.dark-mode .modal-close-btn:hover {
    background: #3A3A3A;
}

/* Add Registrant Modal */
.add-registrant-modal {
    max-width: 550px;
}

.add-registrant-modal .custom-fields-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E6E7E8;
}

.add-registrant-modal .custom-fields-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #4D6171;
    margin: 0 0 15px 0;
}

body.dark-mode .add-registrant-modal .custom-fields-section {
    border-top-color: #3A3A3A;
}

body.dark-mode .add-registrant-modal .custom-fields-section h4 {
    color: #C8C9CA;
}

.add-registrant-modal .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.add-registrant-modal .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Confirmation Modal */
.confirm-modal {
    max-width: 420px;
    text-align: center;
}

.confirm-modal .modal-header {
    justify-content: center;
    border-bottom: none;
    padding-bottom: 0;
}

.confirm-modal .modal-header h3 {
    font-size: 18px;
}

.confirm-modal .modal-body {
    padding: 15px 0 25px 0;
}

.confirm-modal .modal-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.confirm-modal .form-actions {
    justify-content: center;
    gap: 12px;
    border-top: none;
    padding-top: 0;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.modal-body {
    color: #666;
}

body.dark-mode .modal-body {
    color: #C8C9CA;
}

.day-events-modal {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.day-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.day-event-item {
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state p {
    margin: 0;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Event List Styles */
.events-list-header {
    display: grid;
    grid-template-columns: minmax(200px, 2fr) minmax(100px, 1.2fr) minmax(100px, 1.2fr) minmax(120px, 1.5fr) minmax(80px, 1fr);
    gap: 16px;
    padding: 12px 16px;
    background: #F5F6F7;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .events-list-header {
    background: #3A3A3A;
    color: #999;
}

.btn-export-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #4D6171;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-export-all:hover {
    background: #3d4e5c;
}

.btn-export-all svg {
    flex-shrink: 0;
}

body.dark-mode .btn-export-all {
    background: #5a7186;
}

body.dark-mode .btn-export-all:hover {
    background: #4D6171;
}

/* Export All Events button in header controls */
.controls-spacer {
    flex: 1;
}

.btn-export-all-events {
    padding: 8px 16px;
    border: none;
    background: #6c7a89;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    height: 30px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-export-all-events:hover {
    background: #5a6878;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 122, 137, 0.3);
}

body.dark-mode .btn-export-all-events {
    background: #5a7186;
}

body.dark-mode .btn-export-all-events:hover {
    background: #4a6073;
    box-shadow: 0 4px 12px rgba(90, 113, 134, 0.4);
}

.event-list-item,
.event-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 5px 16px;
    margin-bottom: 4px;
    display: grid;
    grid-template-columns: minmax(200px, 2fr) minmax(100px, 1.2fr) minmax(100px, 1.2fr) minmax(120px, 1.5fr) minmax(80px, 1fr);
    gap: 16px;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
}

/* Draft row styling - light gray background */
.event-item.event-row-draft {
    background: #f8f9fa;
}

.event-list-item:hover,
.event-item:hover {
    box-shadow: 0 2px 8px rgba(0, 162, 225, 0.15);
    background: #f8f9fa;
    border-color: #4D6171;
}

body.dark-mode .event-list-item,
body.dark-mode .event-item {
    background: #3A3A3A;
    border-color: #555;
}

body.dark-mode .event-list-item:hover,
body.dark-mode .event-item:hover {
    background: #404040;
    border-color: #4D6171;
}

.event-info {
    display: contents;
}

/* Event name with inline tags container */
.event-name-with-tags {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.event-name {
    font-weight: 600;
    color: #001D34;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 80px;
}

body.dark-mode .event-name {
    color: #E6E7E8;
}

/* Status cell in list view */
.event-status-cell {
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status vertical tab/bar on left edge of row (manager view only) */
body:not(.guest-view) .event-item {
    position: relative;
    border-left: 6px solid #28a745; /* Default: published = green */
}

body:not(.guest-view) .event-item.event-row-published {
    border-left-color: #28a745;
}

body:not(.guest-view) .event-item.event-row-draft {
    border-left-color: #b5b9bd;
    background: #f9f9f9;
}

body.dark-mode:not(.guest-view) .event-item.event-row-published {
    border-left-color: #28a745;
}

body.dark-mode:not(.guest-view) .event-item.event-row-draft {
    border-left-color: #888;
    background: #353535;
}

/* Inline tag chips for list view */
.inline-tags {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.inline-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    cursor: default;
}

.inline-tags-more {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    background: #6c7a89;
    color: white;
    white-space: nowrap;
    cursor: default;
}

body.dark-mode .inline-tag-chip {
    opacity: 0.9;
}

body.dark-mode .inline-tags-more {
    background: #5a6878;
}

.event-datetime {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-date {
    color: #333;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
}

body.dark-mode .event-date {
    color: #E6E7E8;
}

.event-time {
    color: #666;
    font-size: 11px;
    white-space: nowrap;
}

body.dark-mode .event-time {
    color: #999;
}

.event-location {
    color: #666;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .event-location {
    color: #999;
}

.event-registrations {
    color: #666;
    font-size: 12px;
    white-space: nowrap;
    text-align: right;
}

body.dark-mode .event-registrations {
    color: #C8C9CA;
}

.event-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.card-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-add-registrant {
    background: #4D6171;
    color: white;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

.btn-add-registrant:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 162, 225, 0.3);
}

.btn-add-registrant svg {
    width: 16px;
    height: 16px;
}

.btn-export-csv {
    background: #4D6171;
    color: white;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    flex-shrink: 0;
}

.btn-export-csv:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 162, 225, 0.3);
}

.btn-export-csv svg {
    width: 16px;
    height: 16px;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.event-tag {
    background: #e8f4f8;
    color: #4D6171;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

body.dark-mode .event-tag {
    background: rgba(0, 162, 225, 0.2);
    color: #4D6171;
}

.tag-filter-badge {
    background: #4D6171;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tag-filter-badge button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.tag-filter-badge button:hover {
    opacity: 1;
}

.btn-primary {
    background: #4D6171;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 162, 225, 0.3);
}

.btn-secondary {
    background: white;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #F5F6F7;
    border-color: #4D6171;
}

body.dark-mode .btn-secondary {
    background: #3A3A3A;
    color: #E6E7E8;
    border-color: #555;
}

body.dark-mode .btn-secondary:hover {
    background: #404040;
    border-color: #4D6171;
}

/* Tags Management Styles */
.tags-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    background: #e7e7e7;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    height: 45px;
}

body.dark-mode .tags-controls {
    background: #2C2C2C;
}

/* Tags List Wrapper - bordered container */
.tags-list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Tags List Header - matches events-list-header */
.tags-list-header {
    display: grid;
    grid-template-columns: 80px 2fr 2fr 100px 120px;
    gap: 16px;
    padding: 12px 16px;
    background: #F5F6F7;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    margin-bottom: 8px;
}

body.dark-mode .tags-list-header {
    background: #3A3A3A;
    color: #999;
}

.header-color {
    text-align: left;
}

.header-tag-name {
    text-align: left;
}

.header-slug {
    text-align: left;
}

.header-events {
    text-align: center;
}

.header-actions {
    text-align: center;
}

/* Tags List - matches event-item styling */
.tags-list {
    display: flex;
    flex-direction: column;
}

.tag-item {
    display: grid;
    grid-template-columns: 80px 2fr 2fr 100px 120px;
    gap: 16px;
    padding: 14px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 4px;
    align-items: center;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tag-item:last-child {
    margin-bottom: 0;
}

.tag-item:hover {
    box-shadow: 0 2px 8px rgba(0, 162, 225, 0.15);
    background: #f8f9fa;
    border-color: #4D6171;
}

body.dark-mode .tag-item {
    background: #3A3A3A;
    border-color: #555;
}

body.dark-mode .tag-item:hover {
    background: #404040;
    border-color: #4D6171;
}

.tag-item .tag-color {
    display: flex;
    align-items: center;
}

.tag-color-preview {
    width: 40px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.tag-item .tag-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

body.dark-mode .tag-item .tag-name {
    color: #E6E7E8;
}

.tag-item .tag-slug {
    color: #666;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
}

body.dark-mode .tag-item .tag-slug {
    color: #999;
}

.tag-item .tag-event-count {
    text-align: center;
    color: #666;
    font-size: 14px;
}

body.dark-mode .tag-item .tag-event-count {
    color: #999;
}

.tag-item .tag-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* Keep old table styles for backward compatibility but hide */
.tags-header {
    display: none;
}

.tags-table-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark-mode .tags-table-wrapper {
    background: #2C2C2C;
}

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

.tags-table thead {
    background: #F5F6F7;
}

body.dark-mode .tags-table thead {
    background: #3A3A3A;
}

.tags-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #e0e0e0;
}

body.dark-mode .tags-table th {
    color: #999;
    border-bottom-color: #444;
}

.tags-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    color: #333;
}

body.dark-mode .tags-table td {
    color: #E6E7E8;
    border-bottom-color: #444;
}

.tags-table tbody tr:hover {
    background: #f8f9fa;
}

body.dark-mode .tags-table tbody tr:hover {
    background: #353535;
}

.tag-color-preview {
    width: 40px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.tag-name-cell {
    font-weight: 500;
}

.tag-slug-cell {
    color: #666;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
}

body.dark-mode .tag-slug-cell {
    color: #999;
}

.tag-event-count {
    color: #666;
}

body.dark-mode .tag-event-count {
    color: #999;
}

.tag-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: 1px solid #e0e0e0;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.btn-icon:hover {
    border-color: #4D6171;
    background: #f8f9fa;
    color: #4D6171;
}

body.dark-mode .btn-icon {
    border-color: #555;
    color: #999;
}

body.dark-mode .btn-icon:hover {
    border-color: #4D6171;
    background: rgba(0, 162, 225, 0.1);
    color: #4D6171;
}

.btn-icon.btn-delete:hover {
    border-color: #E51938;
    background: #fff5f7;
    color: #E51938;
}

body.dark-mode .btn-icon.btn-delete:hover {
    border-color: #E51938;
    background: rgba(229, 25, 56, 0.1);
    color: #E51938;
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

body.dark-mode .loading-state {
    color: #999;
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid #f3f3f3;
    border-top-color: #4D6171;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

body.dark-mode .loading-state .spinner {
    border-color: #555;
    border-top-color: #4D6171;
}

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

.error-state {
    background: #fff5f7;
    border: 1px solid #E51938;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #E51938;
    font-size: 14px;
}

body.dark-mode .error-state {
    background: rgba(229, 25, 56, 0.1);
    border-color: #E51938;
}

/* Tag Modal Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

body.dark-mode .form-group label {
    color: #E6E7E8;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background: white;
    transition: all 0.2s ease;
}

textarea.form-input {
    resize: vertical;
    min-height: 60px;
}

.form-input:focus {
    outline: none;
    border-color: #4D6171;
    box-shadow: 0 0 0 3px rgba(0, 162, 225, 0.1);
}

body.dark-mode .form-input {
    background: #3A3A3A;
    border-color: #555;
    color: #E6E7E8;
}

body.dark-mode .form-input:focus {
    border-color: #4D6171;
    box-shadow: 0 0 0 3px rgba(0, 162, 225, 0.15);
}

/* Read-only input styled as display text */
.form-input-readonly {
    background: #f5f5f5;
    border: none;
    color: #666;
    cursor: default;
    user-select: none;
}

.form-input-readonly:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

body.dark-mode .form-input-readonly {
    background: #2a2a2a;
    color: #999;
}

/* Validation error styles */
.input-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

.validation-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

body.dark-mode .validation-error {
    color: #ff6b7a;
}

/* Form-level error message box */
.form-error-message {
    background-color: #fff5f5;
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 12px 16px;
    margin: 16px 0;
    color: #dc3545;
    font-size: 14px;
}

body.dark-mode .form-error-message {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: #ff6b7a;
    color: #ff6b7a;
}

.form-error-message.hidden {
    display: none;
}

.form-help {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.form-group small.form-help-inline {
    display: inline;
    font-size: 11px;
    color: #999;
    font-weight: normal;
    margin-left: 4px;
    margin-top: 0;
}

.color-picker-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.color-input {
    width: 60px;
    height: 44px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    padding: 4px;
}

.color-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

body.dark-mode .color-input {
    background: #3A3A3A;
    border-color: #555;
}

.color-hex-input {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

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

.delete-warning {
    color: #E51938;
    font-size: 13px;
    margin-top: 8px;
}

.btn-danger {
    background: #E51938;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: #c91430;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(229, 25, 56, 0.3);
}

/* ============================================
   FOOTER
   ============================================ */
.dashboard-footer {
    background: #F5F6F7;
    border-top: 1px solid #E0E0E0;
    padding: 20px;
    text-align: center;
}

body.dark-mode .dashboard-footer {
    background: #1a1a1a;
    border-top-color: #444;
}

.dashboard-footer .copyright {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-weight: 400;
}

body.dark-mode .dashboard-footer .copyright {
    color: #999;
}

/* ============================================
   EVENT DETAILS VIEW (Full Page)
   ============================================ */
.event-details-view {
    padding: 0;
}

.event-details-header-main {
    margin-bottom: 24px;
    margin-top: 0;
}

/* Also reduce margin-bottom on back button for tighter layout */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 12px;
}

.btn-back:hover {
    background: #f5f6f7;
    border-color: #4D6171;
    color: #4D6171;
}

body.dark-mode .btn-back {
    border-color: #444;
    color: #E6E7E8;
}

body.dark-mode .btn-back:hover {
    background: #3a3a3a;
    border-color: #4D6171;
    color: #4D6171;
}

.event-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.event-title-main {
    font-size: 28px;
    font-weight: 600;
    color: #001D34;
    margin: 0;
}

body.dark-mode .event-title-main {
    color: #E6E7E8;
}

.event-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    color: #2b6cb0;
    border: 1px solid #2b6cb0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-copy-link:hover {
    background: #ebf4ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(43, 108, 176, 0.15);
}

.btn-copy-link.copied {
    background: #c6f6d5;
    color: #276749;
    border-color: #276749;
}

.btn-copy-link svg {
    width: 16px;
    height: 16px;
}

body.dark-mode .btn-copy-link {
    background: transparent;
    color: #63b3ed;
    border-color: #63b3ed;
}

body.dark-mode .btn-copy-link:hover {
    background: rgba(99, 179, 237, 0.1);
    color: white;
    border-color: white;
}

body.dark-mode .btn-copy-link.copied {
    background: rgba(72, 187, 120, 0.2);
    color: #68d391;
    border-color: #68d391;
}

.btn-duplicate-event {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    color: #4D6171;
    border: 1px solid #4D6171;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-duplicate-event:hover {
    background: #f0f4f8;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn-duplicate-event svg {
    width: 16px;
    height: 16px;
}

body.dark-mode .btn-duplicate-event {
    background: transparent;
    color: #a0aec0;
    border-color: #a0aec0;
}

body.dark-mode .btn-duplicate-event:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

.btn-save-event {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save-event:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

.btn-save-event svg {
    width: 16px;
    height: 16px;
}

body.dark-mode .btn-save-event {
    background: #28a745;
    color: white;
}

body.dark-mode .btn-save-event:hover {
    background: #218838;
}

.btn-edit-event {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #4D6171;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-event:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-edit-event svg {
    width: 16px;
    height: 16px;
}

.btn-delete-event {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-event:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.3);
}

.btn-delete-event svg {
    width: 16px;
    height: 16px;
}

body.dark-mode .btn-delete-event {
    background: transparent;
    color: #ff6b6b;
    border-color: #ff6b6b;
}

body.dark-mode .btn-delete-event:hover {
    background: #ff6b6b;
    color: #1a1a1a;
}

.registration-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.event-details-grid {
    display: grid;
    gap: 24px;
}

.event-info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.dark-mode .event-info-card {
    background: #2C2C2C;
}

.event-info-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #001D34;
    margin: 0 0 20px 0;
}

body.dark-mode .event-info-card h3 {
    color: #E6E7E8;
}

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

.card-header h3 {
    margin: 0;
}

.card-header-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.card-header-inline h3 {
    margin: 0;
}

.btn-collapse-all {
    background: none;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    cursor: pointer;
    padding: 3px 6px;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-collapse-all:hover {
    background: #f0f0f0;
    color: #555;
    border-color: #bbb;
}

body.dark-mode .btn-collapse-all {
    border-color: #444;
    color: #888;
}

body.dark-mode .btn-collapse-all:hover {
    background: #3a3a3a;
    color: #ccc;
    border-color: #666;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .info-label {
    color: #999;
}

.info-value {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

body.dark-mode .info-value {
    color: #E6E7E8;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.no-data {
    color: #999;
    font-style: italic;
    font-size: 14px;
    margin: 0;
}

/* Created By Section */
.created-by-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creator-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A2E1, #0077B5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.creator-initials {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

.creator-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.creator-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

body.dark-mode .creator-name {
    color: #E6E7E8;
}

.creator-email {
    font-size: 12px;
    color: #666;
}

body.dark-mode .creator-email {
    color: #999;
}

.error-message {
    color: #E51938;
    font-size: 14px;
    margin: 0;
}

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

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

.registrations-table th {
    text-align: left;
    padding: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

body.dark-mode .registrations-table th {
    color: #999;
    border-bottom-color: #444;
}

.registrations-table td {
    padding: 12px;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
}

body.dark-mode .registrations-table td {
    color: #E6E7E8;
    border-bottom-color: #444;
}

.registrations-table tbody tr:hover {
    background: #f5f6f7;
}

body.dark-mode .registrations-table tbody tr:hover {
    background: #3a3a3a;
}

/* Registration action buttons */
.registration-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #e6e7e8;
    color: #001D34;
}

.btn-icon.btn-delete:hover {
    background: #ffe6e6;
    color: #dc3545;
}

body.dark-mode .btn-icon {
    color: #999;
}

body.dark-mode .btn-icon:hover {
    background: #3a3a3a;
    color: #E6E7E8;
}

body.dark-mode .btn-icon.btn-delete:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

/* Inline Edit Form Styles */
.event-edit-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.edit-form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* Edit Tags Section */
.edit-tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    background: #f5f6f7;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    font-size: 13px;
}

.tag-checkbox-item:hover {
    background: #e6e7e8;
}

.tag-checkbox-item.selected {
    background: rgba(0, 162, 225, 0.1);
    border-color: #00A2E1;
}

.tag-checkbox-item input[type="checkbox"] {
    display: none;
}

body.dark-mode .tag-checkbox-item {
    background: #3a3a3a;
}

body.dark-mode .tag-checkbox-item:hover {
    background: #444;
}

body.dark-mode .tag-checkbox-item.selected {
    background: rgba(0, 162, 225, 0.2);
}

.tag-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.selected-tags-preview-edit {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.no-tags-selected {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

.tag-badge-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tag-badge-remove-edit {
    background: none;
    border: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    color: inherit;
    opacity: 0.7;
}

.tag-badge-remove-edit:hover {
    opacity: 1;
}

/* Custom Field Builder */
.custom-field-builder {
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

body.dark-mode .custom-field-builder {
    background: #2a2a2a;
    border-color: #444;
}

.custom-field-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

/* Drag handle for custom field reordering */
.drag-handle {
    cursor: grab;
    padding: 4px;
    color: #999;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drag-handle:hover {
    background: #f0f0f0;
    color: #666;
}

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

body.dark-mode .drag-handle:hover {
    background: #3a3a3a;
    color: #ccc;
}

/* Custom field dragging states */
.custom-field-builder {
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    position: relative;
}

.custom-field-builder.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Insertion line indicators */
.custom-field-builder.drag-over-above::before,
.custom-field-builder.drag-over-below::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #333;
    border-radius: 2px;
    z-index: 10;
}

.custom-field-builder.drag-over-above::before {
    top: -6px;
}

.custom-field-builder.drag-over-below::after {
    bottom: -6px;
}

body.dark-mode .custom-field-builder.drag-over-above::before,
body.dark-mode .custom-field-builder.drag-over-below::after {
    background: #fff;
}

.custom-field-title {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

body.dark-mode .custom-field-title {
    color: #E6E7E8;
}

/* Inline pill checkboxes in field/group headers */
.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
}

.pill-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    background: #f5f5f5;
    color: #888;
    border: 1px solid #e0e0e0;
}

.pill-checkbox:hover {
    background: #eee;
    color: #666;
}

.pill-checkbox input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #0066cc;
    margin: 0;
}

.pill-checkbox.checked-required {
    background: #fff3e0;
    color: #e65100;
    border-color: #ffcc80;
}

.pill-checkbox.checked-hidden {
    background: #f0f0f0;
    color: #6c757d;
    border-color: #ccc;
}

body.dark-mode .pill-checkbox {
    background: #3a3a3a;
    color: #999;
    border-color: #555;
}

body.dark-mode .pill-checkbox:hover {
    background: #444;
    color: #ccc;
}

body.dark-mode .pill-checkbox.checked-required {
    background: #4a3000;
    color: #ffb74d;
    border-color: #795500;
}

body.dark-mode .pill-checkbox.checked-hidden {
    background: #3d3d3d;
    color: #999;
    border-color: #555;
}

.btn-remove-field {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.btn-remove-field:hover {
    background: #ffe6e6;
    color: #dc3545;
}

body.dark-mode .btn-remove-field:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

.custom-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.field-options-group {
    margin-bottom: 12px;
}

.field-options-group.hidden {
    display: none;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    color: #333;
}

body.dark-mode .checkbox-label {
    color: #E6E7E8;
}

.btn-add-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f5f6f7;
    border: 1px dashed #ccc;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 12px;
}

.btn-add-field:hover {
    background: #e6e7e8;
    border-color: #999;
    color: #333;
}

body.dark-mode .btn-add-field {
    background: #3a3a3a;
    border-color: #555;
    color: #999;
}

body.dark-mode .btn-add-field:hover {
    background: #444;
    border-color: #666;
    color: #E6E7E8;
}

/* Content Section Builders — reuse custom-field-builder pattern */
.content-section-builder {
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    position: relative;
}

body.dark-mode .content-section-builder {
    background: #2a2a2a;
    border-color: #444;
}

.content-section-builder.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.content-section-builder.drag-over-above::before,
.content-section-builder.drag-over-below::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #333;
    border-radius: 2px;
    z-index: 10;
}

.content-section-builder.drag-over-above::before {
    top: -6px;
}

.content-section-builder.drag-over-below::after {
    bottom: -6px;
}

body.dark-mode .content-section-builder.drag-over-above::before,
body.dark-mode .content-section-builder.drag-over-below::after {
    background: #fff;
}

/* Custom Field Group Builder */
.custom-field-group-builder {
    background: #f0f4f8;
    border: 1px solid #c8d6e0;
    border-left: 4px solid #4D6171;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    position: relative;
}

body.dark-mode .custom-field-group-builder {
    background: #252a30;
    border-color: #3d4a55;
    border-left-color: #5a7186;
}

.custom-field-group-builder.dragging {
    opacity: 0.5;
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.custom-field-group-builder.drag-over-above::before,
.custom-field-group-builder.drag-over-below::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: #333;
    border-radius: 2px;
    z-index: 10;
}

.custom-field-group-builder.drag-over-above::before {
    top: -6px;
}

.custom-field-group-builder.drag-over-below::after {
    bottom: -6px;
}

body.dark-mode .custom-field-group-builder.drag-over-above::before,
body.dark-mode .custom-field-group-builder.drag-over-below::after {
    background: #fff;
}

.custom-field-group-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.custom-field-group-title {
    font-weight: 600;
    color: #4D6171;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .custom-field-group-title {
    color: #8da4b8;
}

.custom-field-group-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.custom-field-group-fields {
    min-height: 48px;
    border: 2px dashed #d0d8e0;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

body.dark-mode .custom-field-group-fields {
    border-color: #3d4a55;
}

.custom-field-group-fields:empty::before {
    content: 'Drag fields here or use the button below';
    display: block;
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 12px;
    font-style: italic;
}

body.dark-mode .custom-field-group-fields:empty::before {
    color: #666;
}

/* Drop zone highlight when field is dragged over */
.custom-field-group-fields.drop-zone-active {
    border-color: #4D6171;
    background-color: rgba(77, 97, 113, 0.06);
}

body.dark-mode .custom-field-group-fields.drop-zone-active {
    border-color: #5a7186;
    background-color: rgba(90, 113, 134, 0.1);
}

/* Root container drop zone active */
#editCustomFieldsContainer.drop-zone-active,
#createCustomFieldsContainer.drop-zone-active {
    background-color: rgba(77, 97, 113, 0.04);
    border-radius: 6px;
}

body.dark-mode #editCustomFieldsContainer.drop-zone-active,
body.dark-mode #createCustomFieldsContainer.drop-zone-active {
    background-color: rgba(90, 113, 134, 0.06);
}

/* Actions bar with Add Field + Add Group buttons */
.custom-fields-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.custom-fields-actions .btn-add-field {
    flex: 1;
}

/* "Add Field to Group" button inside a group */
.btn-add-field-to-group {
    margin-top: 0;
    font-size: 13px;
}

/* ==========================================
   Collapse / Expand for fields and groups
   ========================================== */

.btn-collapse {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #999;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-width: 28px;
    min-height: 28px;
}

.btn-collapse:hover {
    background: #f0f0f0;
    color: #666;
}

body.dark-mode .btn-collapse:hover {
    background: #3a3a3a;
    color: #ccc;
}

.collapse-chevron {
    transition: transform 0.2s ease;
}

.collapsed .collapse-chevron {
    transform: rotate(-90deg);
}

/* Hide the collapsible body when collapsed */
.collapsed > .collapsible-body {
    display: none;
}

/* Remove bottom margin from header when collapsed */
.collapsed .custom-field-header,
.collapsed .custom-field-group-header {
    margin-bottom: 0;
}

/* Name preview — visible only when collapsed */
.custom-field-name-preview,
.custom-field-group-name-preview {
    display: none;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

body.dark-mode .custom-field-name-preview,
body.dark-mode .custom-field-group-name-preview {
    color: #aaa;
}

.collapsed .custom-field-name-preview,
.collapsed .custom-field-group-name-preview {
    display: inline;
}

/* Reduce padding when collapsed for more compact look */
.custom-field-builder.collapsed {
    padding: 8px 16px;
}

.custom-field-group-builder.collapsed {
    padding: 8px 16px;
}

.content-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 8px;
}

.content-section-title-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    flex: 1;
}

body.dark-mode .content-section-title-label {
    color: #E6E7E8;
}

.content-section-body {
    min-height: 120px;
}

/* Quill editors: auto-size to content instead of large default min-height */
.quill-editor-container.ql-container,
.content-section-body.ql-container {
    height: auto !important;
}

.quill-editor-container .ql-editor,
.form-group .ql-editor {
    min-height: 100px;
}

.content-section-body .ql-editor {
    min-height: 80px;
}

/* Form Actions Bar */
.form-actions-bar {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
    margin-top: 8px;
}

body.dark-mode .form-actions-bar {
    border-top-color: #444;
}

/* Required indicator */
.required {
    color: #dc3545;
}

/* Custom field preview in view mode */
.custom-fields-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.custom-field-preview {
    background: #f9fafb;
    border-radius: 8px;
    padding: 12px 16px;
}

body.dark-mode .custom-field-preview {
    background: #2a2a2a;
}

.field-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.field-preview-name {
    font-weight: 600;
    color: #333;
}

body.dark-mode .field-preview-name {
    color: #E6E7E8;
}

.required-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-radius: 4px;
}

.hidden-badge {
    font-size: 11px;
    padding: 2px 6px;
    background: rgba(108, 117, 125, 0.15);
    color: #6c757d;
    border-radius: 4px;
    margin-left: 4px;
}

body.dark-mode .hidden-badge {
    background: rgba(108, 117, 125, 0.25);
    color: #adb5bd;
}

.custom-field-preview.field-hidden {
    opacity: 0.7;
}

.field-preview-type {
    font-size: 12px;
    color: #666;
}

body.dark-mode .field-preview-type {
    color: #999;
}

.field-options-preview {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.option-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: #e6e7e8;
    color: #333;
    border-radius: 4px;
}

body.dark-mode .option-badge {
    background: #3a3a3a;
    color: #E6E7E8;
}

/* Custom field group preview in view mode */
.custom-field-group-preview {
    background: #f0f4f8;
    border: 1px solid #d0d8e0;
    border-left: 3px solid #4D6171;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

body.dark-mode .custom-field-group-preview {
    background: #252a30;
    border-color: #3d4a55;
    border-left-color: #5a7186;
}

.field-group-preview-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #d0d8e0;
}

body.dark-mode .field-group-preview-header {
    border-bottom-color: #3d4a55;
}

.field-group-preview-name {
    font-weight: 600;
    color: #4D6171;
    font-size: 14px;
}

body.dark-mode .field-group-preview-name {
    color: #8da4b8;
}

.field-group-preview-description {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

body.dark-mode .field-group-preview-description {
    color: #888;
}

.field-group-preview-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-group-preview-fields .custom-field-preview {
    background: rgba(255, 255, 255, 0.6);
}

body.dark-mode .field-group-preview-fields .custom-field-preview {
    background: rgba(255, 255, 255, 0.04);
}

.custom-field-group-preview.group-hidden {
    opacity: 0.7;
}

/* Spinner for save button */
.spinner-small {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 1400px) {
    .event-details-sidebar {
        display: none;
    }
    
    .main-container {
        grid-template-columns: 240px 1fr;
    }
    
    .calendar-day {
        min-height: 100px;
    }
}

/* Handle controls wrapping only when necessary */
@media (max-width: 1050px) {
    .main-controls {
        flex-wrap: wrap;
        height: auto;
    }
    
    .calendar-actions {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    
    .controls-spacer {
        display: none;
    }
    
    /* Button group wraps as a unit and fills full width */
    .action-buttons-group {
        width: 100%;
        flex: 1;
    }
    
    /* Buttons evenly distributed within the group */
    .action-buttons-group .btn-export-all-events,
    .action-buttons-group .btn-new-event {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 950px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-nav {
        padding: 0 8px;
    }

    .nav-item span {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .sidebar-footer {
        flex-direction: column;
    }

    .main-controls {
        gap: 12px;
        padding: 10px 12px;
        flex-wrap: wrap;
        height: auto;
    }
    
    .calendar-actions {
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }
    
    .controls-spacer {
        display: none;
    }

    .calendar-header {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 12px;
    }

    .tag-filter-container {
        flex: 1;
        min-width: 150px;
    }

    .tag-filter-btn {
        width: 100%;
    }
    
    .main-container {
        grid-template-columns: 70px 1fr;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 6px;
    }
    
    .calendar-day-number {
        font-size: 12px;
    }
    
    .calendar-event-bar,
    .calendar-event-badge {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .events-list-header,
    .event-item {
        grid-template-columns: minmax(150px, 1.5fr) minmax(90px, 1fr) minmax(90px, 1fr) minmax(100px, 1fr) minmax(70px, 0.8fr);
        font-size: 12px;
    }
}

@media (max-width: 1100px) {
    /* Hide end date/time column at narrower widths */
    .events-list-header .header-end,
    .event-item .event-info > .event-datetime:nth-child(3) {
        display: none;
    }
    
    .events-list-header,
    .event-item {
        grid-template-columns: minmax(150px, 1.8fr) minmax(90px, 1.2fr) minmax(100px, 1.2fr) minmax(70px, 0.8fr);
    }
}

@media (max-width: 1024px) {
    .search-container-header {
        max-width: 300px;
    }
}

@media (max-width: 900px) {
    /* Hide location column at narrower widths */
    .events-list-header .header-location,
    .event-item .event-location {
        display: none;
    }
    
    .events-list-header,
    .event-item {
        grid-template-columns: minmax(150px, 2fr) minmax(90px, 1.2fr) minmax(70px, 0.8fr);
    }
}

@media (max-width: 768px) {
    .header-left {
        gap: 12px;
    }

    .page-title {
        font-size: 18px;
    }

    .search-container-header {
        max-width: 200px;
        min-width: 120px;
    }

    .profile-info-inline {
        display: none;
    }

    /* View toggle - hide labels on medium screens */
    /* View toggle - smaller on medium screens */
    .view-toggle-btn {
        padding: 8px 10px;
        font-size: 12px;
    }

    .main-content {
        padding: 16px;
    }
    
    .logo-image {
        height: 24px;
    }

    .main-controls {
        padding: 10px 12px;
        gap: 10px;
    }

    .calendar-header {
        gap: 12px;
        padding: 10px 12px;
    }

    .btn-today {
        font-size: 13px;
        padding: 7px 14px;
    }

    .month-nav {
        gap: 10px;
    }

    #currentMonth {
        font-size: 16px;
        min-width: 150px;
    }

    .btn-nav {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
    
    .calendar-grid {
        padding: 12px;
        gap: 6px;
    }
    
    .calendar-day {
        min-height: 70px;
    }
    
    .btn-new-event {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .events-list-header {
        display: none;
    }
    
    .event-item {
        display: block;
        position: relative;
        padding: 12px 60px 12px 12px;
        border-radius: 6px;
        margin-bottom: 8px;
    }

    .event-item .event-info {
        display: block;
    }

    .event-status-cell {
        position: absolute;
        top: 12px;
        right: 12px;
        width: auto;
    }

    .status-badge-vertical {
        writing-mode: horizontal-tb;
        transform: none;
        padding: 2px 6px;
        font-size: 9px;
    }

    .event-name-with-tags {
        display: block;
        margin-bottom: 4px;
    }

    .event-name-with-tags .event-name {
        display: block;
        font-size: 14px;
        font-weight: 600;
        white-space: normal;
        margin-bottom: 4px;
    }

    .event-name-with-tags .inline-tags {
        margin-bottom: 6px;
    }

    /* Hide end date and location on mobile - just show start */
    .event-item .event-info > .event-datetime:nth-child(4),
    .event-item .event-location {
        display: none !important;
    }
    
    .event-datetime {
        display: inline-block !important;
        font-size: 12px;
        color: #666;
    }

    .event-datetime .event-date,
    .event-datetime .event-time {
        display: inline;
    }

    .event-datetime .event-date::after {
        content: ' ';
    }

    .event-registrations-cell {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 12px;
        color: #666;
        margin-left: 12px;
    }

    .capacity-bar-mini {
        width: 60px;
    }

    /* Custom field group builder responsive */
    .custom-field-group-inputs {
        grid-template-columns: 1fr;
    }

    .custom-fields-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .sidebar {
        position: fixed;
        left: -70px;
        transition: left 0.3s ease;
        z-index: 100;
        height: 100vh;
    }
    
    .sidebar.mobile-open {
        left: 0;
    }

    .top-header {
        padding: 12px 16px;
    }
    
    .logo-image {
        height: 20px;
    }
    
    .page-title {
        font-size: 16px;
    }

    .search-container-header {
        max-width: 120px;
        min-width: 80px;
    }
    
    .search-input {
        font-size: 13px;
    }

    /* View toggle - icons only on small screens */
    .view-toggle {
        padding: 3px;
    }

    .view-toggle-btn {
        padding: 6px 8px;
        gap: 0;
    }

    .view-toggle-label {
        display: none;
    }

    .main-controls {
        padding: 8px 10px;
        gap: 8px;
        flex-wrap: wrap;
        height: auto;
    }
    
    .calendar-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .controls-spacer {
        display: none;
    }

    .calendar-header {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 10px;
    }

    .btn-today {
        font-size: 12px;
        padding: 6px 12px;
    }

    .month-nav {
        gap: 8px;
    }

    #currentMonth {
        font-size: 14px;
        min-width: 130px;
    }

    .btn-nav {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .tag-filter-container {
        flex: 1;
    }

    .tag-filter-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    .btn-new-event {
        padding: 6px 10px;
        font-size: 12px;
    }

    .btn-new-event span {
        display: none;
    }
    
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        padding: 12px;
    }
    
    .calendar-grid {
        padding: 8px;
        gap: 4px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .calendar-day-header {
        font-size: 11px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 11px;
    }
    
    .calendar-event-bar,
    .calendar-event-badge {
        font-size: 8px;
        padding: 1px 3px;
        height: 16px;
    }
    
    .btn-export-csv {
        width: 32px;
        height: 32px;
    }
    
    .event-item {
        padding: 10px;
    }
}

/* ============================================
   SEGMENTED CONTROLS (Visibility, Status, Documents)
   ============================================ */

.settings-inline {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
}

.settings-inline.top-settings {
    padding-bottom: 16px;
    margin-bottom: 4px;
    border-bottom: 1px solid #eee;
}

.settings-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0 16px;
    grid-column: 1 / -1;
}

.inline-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.inline-group + .inline-group {
    padding-left: 20px;
    border-left: 1px solid #e0e0e0;
    margin-left: 20px;
}

.inline-label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.segmented-control {
    display: flex;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    flex: 1;
}

.segmented-control label {
    position: relative;
    cursor: pointer;
    flex: 1;
}

.segmented-control input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.seg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    width: 100%;
}

.seg-btn:hover {
    color: #333;
    background: rgba(255, 255, 255, 0.5);
}

.segmented-control input:checked + .seg-btn {
    background: #fff;
    color: #0066cc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.seg-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Dark mode segmented controls */
body.dark-mode .settings-inline.top-settings {
    border-bottom-color: #444;
}

body.dark-mode .settings-divider {
    border-top-color: #444;
}

body.dark-mode .inline-group + .inline-group {
    border-left-color: #444;
}

body.dark-mode .inline-label {
    color: #999;
}

body.dark-mode .segmented-control {
    background: #3a3a3a;
}

body.dark-mode .seg-btn {
    color: #999;
}

body.dark-mode .seg-btn:hover {
    color: #e0e0e0;
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .segmented-control input:checked + .seg-btn {
    background: #2d2d2d;
    color: #4a9eff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Responsive segmented controls */
@media (max-width: 600px) {
    .settings-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .inline-group + .inline-group {
        padding-left: 0;
        border-left: none;
        margin-left: 0;
        padding-top: 12px;
        border-top: 1px solid #e0e0e0;
    }

    body.dark-mode .inline-group + .inline-group {
        border-top-color: #444;
    }
}

/* ============================================
   DOCUMENT UPLOAD LABEL CONTAINER & BADGES
   ============================================ */

.document-label-container {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.document-label-container.hidden {
    display: none;
}

.document-label-container label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.document-label-container .form-help {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Document upload badge in view mode */
.doc-upload-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.doc-upload-badge.disabled {
    background: #e9ecef;
    color: #6c757d;
}

.doc-upload-badge.optional {
    background: #fff3cd;
    color: #856404;
}

.doc-upload-badge.required {
    background: #f8d7da;
    color: #721c24;
}

.doc-upload-label-preview {
    margin-top: 8px;
    font-style: italic;
    color: #666;
    font-size: 14px;
}

/* Dark mode document upload */
body.dark-mode .document-label-container {
    background: #2d2d2d;
    border-color: #444;
}

body.dark-mode .document-label-container label {
    color: #e0e0e0;
}

body.dark-mode .document-label-container .form-help {
    color: #999;
}

body.dark-mode .doc-upload-badge.disabled {
    background: #3d3d3d;
    color: #999;
}

body.dark-mode .doc-upload-badge.optional {
    background: #5a4a00;
    color: #ffc107;
}

body.dark-mode .doc-upload-badge.required {
    background: #5a1a1a;
    color: #f5a5a5;
}

body.dark-mode .doc-upload-label-preview {
    color: #999;
}


/* ============================================
   REGISTRATION DOCUMENTS LIST
   ============================================ */

.registration-documents-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

/* ============================================
   VIEW REGISTRATION MODAL
   ============================================ */

.view-registration-modal {
    max-width: 600px;
    width: 95%;
}

.view-registration-content {
    padding: 0 24px 24px;
}

.view-section {
    margin-bottom: 24px;
}

.view-section:last-child {
    margin-bottom: 0;
}

.view-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #4D6171;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

body.dark-mode .view-section h4 {
    color: #8ca0b3;
    border-bottom-color: #444;
}

.view-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.view-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.view-field.full-width {
    grid-column: 1 / -1;
}

.view-field label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

body.dark-mode .view-field label {
    color: #999;
}

.view-value {
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.4;
}

body.dark-mode .view-value {
    color: #e0e0e0;
}

.view-value a {
    color: #0066cc;
    text-decoration: none;
}

.view-value a:hover {
    text-decoration: underline;
}

body.dark-mode .view-value a {
    color: #4a9eff;
}

.view-value .no-value {
    color: #999;
    font-style: italic;
}

body.dark-mode .view-value .no-value {
    color: #666;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

body.dark-mode .modal-footer {
    background: #2d2d2d;
    border-top-color: #444;
}

.modal-footer .btn-secondary svg,
.modal-footer .btn-primary svg {
    margin-right: 6px;
}

/* Registration row clickable */
.registration-row-clickable {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.registration-row-clickable:hover {
    background-color: #f5f7fa;
}

body.dark-mode .registration-row-clickable:hover {
    background-color: #2a2a2a;
}

/* View button styling */
.btn-icon.btn-view {
    color: #0066cc;
}

.btn-icon.btn-view:hover {
    background: #e8f4ff;
    color: #0052a3;
}

body.dark-mode .btn-icon.btn-view {
    color: #4a9eff;
}

body.dark-mode .btn-icon.btn-view:hover {
    background: #1a3a5c;
    color: #6ab0ff;
}

@media (max-width: 500px) {
    .view-fields-grid {
        grid-template-columns: 1fr;
    }
    
    .view-registration-modal {
        max-width: 100%;
    }
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

body.dark-mode .document-item {
    background: #2d2d2d;
    border-color: #444;
}

.document-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.document-info svg {
    flex-shrink: 0;
    color: #0066cc;
}

body.dark-mode .document-info svg {
    color: #4a9eff;
}

.document-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-size {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
}

body.dark-mode .document-size {
    color: #777;
}

.btn-download-doc {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #4D6171;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    padding: 0;
}

.btn-download-doc:hover {
    background: #3d4e5c;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 162, 225, 0.3);
}

body.dark-mode .btn-download-doc {
    background: #4D6171;
    color: white;
}

body.dark-mode .btn-download-doc:hover {
    background: #3d4e5c;
}

/* ==========================================
   Attendees Management Styles
   ========================================== */

.attendees-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.attendees-search-container {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.attendees-search-container .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

.attendees-search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.attendees-search-input:focus {
    outline: none;
    border-color: #00A2E1;
    box-shadow: 0 0 0 3px rgba(0, 162, 225, 0.1);
}

body.dark-mode .attendees-search-input {
    background: #2a2a2a;
    border-color: #444;
    color: #E6E7E8;
}

body.dark-mode .attendees-search-input:focus {
    border-color: #00A2E1;
}

.attendees-list-wrapper {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark-mode .attendees-list-wrapper {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.attendees-list-header {
    display: grid;
    grid-template-columns: 2fr 2fr 100px 100px;
    gap: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
}

body.dark-mode .attendees-list-header {
    background: #333;
    border-color: #444;
    color: #888;
}

.attendees-list {
    max-height: calc(100vh - 350px);
    overflow-y: auto;
}

.attendee-row {
    display: grid;
    grid-template-columns: 2fr 2fr 100px 100px;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.15s ease;
    align-items: center;
}

.attendee-row:hover {
    background: #f8f9fa;
}

body.dark-mode .attendee-row {
    border-color: #333;
}

body.dark-mode .attendee-row:hover {
    background: #333;
}

.attendee-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.attendee-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.attendee-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4D6171, #6B8A9A);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.attendee-initials-large {
    width: 80px;
    height: 80px;
    font-size: 28px;
}

.attendee-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attendee-email-cell {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .attendee-email-cell {
    color: #999;
}

.attendee-type-cell {
    display: flex;
    align-items: center;
}

.type-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.type-badge.internal {
    background: rgba(0, 162, 225, 0.1);
    color: #00A2E1;
}

.type-badge.external {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

body.dark-mode .type-badge.internal {
    background: rgba(0, 162, 225, 0.2);
}

body.dark-mode .type-badge.external {
    background: rgba(156, 39, 176, 0.2);
}

.attendee-registrations-cell {
    text-align: center;
    font-weight: 600;
    color: #4D6171;
}

body.dark-mode .attendee-registrations-cell {
    color: #8BA3B3;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    margin-top: 16px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
    border-color: #00A2E1;
    color: #00A2E1;
}

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

body.dark-mode .pagination-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #E6E7E8;
}

body.dark-mode .pagination-btn:hover:not(:disabled) {
    border-color: #00A2E1;
    color: #00A2E1;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

body.dark-mode .pagination-info {
    color: #999;
}

/* Attendee Detail Modal */
.attendee-modal {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.attendee-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

body.dark-mode .attendee-profile-header {
    border-color: #444;
}

.attendee-modal-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.attendee-profile-info {
    flex: 1;
    min-width: 0;
}

.attendee-profile-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
}

.attendee-profile-email {
    color: #666;
    font-size: 14px;
    margin-bottom: 2px;
}

.attendee-profile-title {
    color: #888;
    font-size: 14px;
}

body.dark-mode .attendee-profile-email,
body.dark-mode .attendee-profile-title {
    color: #999;
}

.attendee-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
}

.attendee-registrations h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #333;
}

body.dark-mode .attendee-registrations h3 {
    color: #E6E7E8;
}

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

.registrations-group-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}

body.dark-mode .registrations-group-title {
    color: #999;
    border-color: #444;
}

.registration-item {
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.registration-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

body.dark-mode .registration-item {
    background: #333;
}

body.dark-mode .registration-item:hover {
    background: #3a3a3a;
}

.registration-event-name {
    font-weight: 500;
    margin-bottom: 4px;
}

.registration-dates {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #666;
}

body.dark-mode .registration-dates {
    color: #999;
}

.no-registrations {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.attendee-danger-zone {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

body.dark-mode .attendee-danger-zone {
    border-color: #444;
}

.attendee-danger-zone h4 {
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 8px;
}

.attendee-danger-zone p {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

body.dark-mode .attendee-danger-zone p {
    color: #999;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

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

/* Delete Confirm Modal */
.delete-confirm-modal {
    max-width: 450px;
}

.delete-warning {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #fff5f5;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

body.dark-mode .delete-warning {
    background: rgba(220, 53, 69, 0.1);
}

.delete-warning p {
    color: #dc3545;
    font-size: 14px;
}

.confirm-name-display {
    background: #f8f9fa;
    padding: 8px 16px;
    border-radius: 6px;
    margin: 12px 0;
    text-align: center;
}

body.dark-mode .confirm-name-display {
    background: #333;
}

/* ==========================================
   Reusable DataTable Component
   ========================================== */

.data-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

body.dark-mode .data-table {
    background: #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.data-table__header {
    display: grid;
    gap: 16px;
    padding: 10px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.3px;
}

body.dark-mode .data-table__header {
    background: #333;
    border-color: #444;
    color: #888;
}

.data-table__body {
    max-height: calc(100vh - 350px);
    overflow-y: auto;
    font-size: 13px;
}

.data-table__row {
    display: grid;
    gap: 16px;
    padding: 5px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.15s ease;
    align-items: center;
}

.data-table__row:last-child {
    border-bottom: none;
}

.data-table__row:hover {
    background: #f8f9fa;
}

.data-table__row.selected {
    background: #e8f4fc;
    border-left: 3px solid #0078d4;
}

.data-table__row--no-click {
    cursor: default;
}

body.dark-mode .data-table__row {
    border-color: #333;
}

body.dark-mode .data-table__row:hover {
    background: #333;
}

body.dark-mode .data-table__row.selected {
    background: #1a3a4a;
    border-left-color: #4da6ff;
}

/* Event status indicators */
.data-table__row.status-published {
    border-left: 4px solid #22c55e;
}

.data-table__row.status-draft {
    border-left: 4px solid #9ca3af;
    background-color: rgba(156, 163, 175, 0.08);
}

.data-table__row.status-published:hover {
    border-left: 4px solid #22c55e;
}

.data-table__row.status-draft:hover {
    border-left: 4px solid #9ca3af;
    background-color: rgba(156, 163, 175, 0.15);
}

/* Status indicators - dark mode */
body.dark-mode .data-table__row.status-published {
    border-left: 4px solid #4ade80;
}

body.dark-mode .data-table__row.status-draft {
    border-left: 4px solid #6b7280;
    background-color: rgba(107, 114, 128, 0.15);
}

body.dark-mode .data-table__row.status-draft:hover {
    background-color: rgba(107, 114, 128, 0.25);
}

/* Selected row with status - selection takes precedence for background */
.data-table__row.selected.status-published,
.data-table__row.selected.status-draft {
    background: #e8f4fc;
    border-left: 3px solid #0078d4;
}

body.dark-mode .data-table__row.selected.status-published,
body.dark-mode .data-table__row.selected.status-draft {
    background: #1a3a4a;
    border-left-color: #4da6ff;
}

/* Cell types */
.data-table__cell {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table__cell--left {
    text-align: left;
}

.data-table__cell--center {
    text-align: center;
}

.data-table__cell--right {
    text-align: right;
}

/* Avatar + Text cell */
.data-table__cell--avatar {
    display: flex;
    align-items: center;
    gap: 12px;
}

.data-table__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.data-table__avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4D6171, #6B8A9A);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.data-table__avatar--color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .data-table__avatar--color {
    border-color: rgba(255, 255, 255, 0.1);
}

.data-table__text-primary {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table__text-secondary {
    color: #666;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .data-table__text-secondary {
    color: #999;
}

/* Badge cell */
.data-table__badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.data-table__badge--internal {
    background: rgba(0, 162, 225, 0.1);
    color: #00A2E1;
}

.data-table__badge--external {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

.data-table__badge--published {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.data-table__badge--draft {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

body.dark-mode .data-table__badge--internal {
    background: rgba(0, 162, 225, 0.2);
}

body.dark-mode .data-table__badge--external {
    background: rgba(156, 39, 176, 0.2);
}

body.dark-mode .data-table__badge--published {
    background: rgba(40, 167, 69, 0.2);
}

body.dark-mode .data-table__badge--draft {
    background: rgba(108, 117, 125, 0.2);
}

/* Numeric cell */
.data-table__cell--numeric {
    font-weight: 600;
    color: #4D6171;
    text-align: center;
}

body.dark-mode .data-table__cell--numeric {
    color: #8BA3B3;
}

/* Progress bar cell (for capacity) */
.data-table__progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.data-table__progress-text {
    font-size: 13px;
    font-weight: 500;
}

.data-table__progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

body.dark-mode .data-table__progress-bar {
    background: #444;
}

.data-table__progress-fill {
    height: 100%;
    background: #00A2E1;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.data-table__progress-fill--warning {
    background: #ffc107;
}

.data-table__progress-fill--critical {
    background: #dc3545;
}

/* Actions cell */
.data-table__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.data-table__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.data-table__action-btn:hover {
    background: #2b6cb0;
    color: #fff;
}

.data-table__action-btn--danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

body.dark-mode .data-table__action-btn {
    color: #999;
}

body.dark-mode .data-table__action-btn:hover {
    background: rgba(99, 179, 237, 0.15);
    color: #63b3ed;
}

body.dark-mode .data-table__action-btn--danger:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* Multi-line cell (for date/time stacking) */
.data-table__cell--stacked {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-table__stacked-primary {
    font-weight: 500;
    font-size: 14px;
}

.data-table__stacked-secondary {
    font-size: 12px;
    color: #666;
}

body.dark-mode .data-table__stacked-secondary {
    color: #999;
}

/* Tags in cells */
.data-table__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.data-table__tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(0, 162, 225, 0.1);
    color: #00A2E1;
}

/* Pagination */
.data-table__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    margin-top: 16px;
}

.data-table__pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.data-table__pagination-btn:hover:not(:disabled) {
    border-color: #00A2E1;
    color: #00A2E1;
}

.data-table__pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

body.dark-mode .data-table__pagination-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #E6E7E8;
}

body.dark-mode .data-table__pagination-btn:hover:not(:disabled) {
    border-color: #00A2E1;
    color: #00A2E1;
}

.data-table__pagination-info {
    font-size: 14px;
    color: #666;
}

body.dark-mode .data-table__pagination-info {
    color: #999;
}

/* Empty state within data table */
.data-table__empty {
    padding: 48px 24px;
    text-align: center;
    color: #666;
}

body.dark-mode .data-table__empty {
    color: #999;
}

.data-table__empty-icon {
    opacity: 0.3;
    margin-bottom: 16px;
}

.data-table__empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

body.dark-mode .data-table__empty-title {
    color: #E6E7E8;
}

.data-table__empty-message {
    font-size: 14px;
}

/* ===================================
   Tag Details View
   =================================== */

.tag-details-view {
    padding: 0;
}

.tag-details-container {
    max-width: 800px;
}

.tag-header-large {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.tag-color-swatch {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    flex-shrink: 0;
}

.tag-title-info h2 {
    font-size: 28px;
    font-weight: 600;
    color: #001D34;
    margin: 0 0 4px 0;
}

body.dark-mode .tag-title-info h2 {
    color: #E6E7E8;
}

.tag-slug-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    font-family: monospace;
}

body.dark-mode .tag-slug-badge {
    background: #3a3a3a;
    color: #999;
}

.tag-edit-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
}

body.dark-mode .tag-edit-form {
    background: #2a2a2a;
    border-color: #444;
}

.tag-edit-form h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #001D34;
}

body.dark-mode .tag-edit-form h3 {
    color: #E6E7E8;
}

.tag-edit-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .tag-edit-form .form-row {
        grid-template-columns: 1fr;
    }
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-row .color-picker {
    width: 48px;
    min-width: 48px;
    max-width: 48px;
    height: 40px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.color-picker {
    width: 48px;
    height: 40px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
}

body.dark-mode .color-picker {
    border-color: #444;
    background: #2a2a2a;
}

.color-hex-input {
    width: 100px;
    font-family: monospace;
}

.tag-edit-form .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.tag-events-section {
    margin-bottom: 32px;
}

.tag-events-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #001D34;
}

body.dark-mode .tag-events-section h3 {
    color: #E6E7E8;
}

.tag-events-list-full {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

body.dark-mode .tag-events-list-full {
    background: #2a2a2a;
    border-color: #444;
}

.tag-event-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tag-event-row:last-child {
    border-bottom: none;
}

.tag-event-row:hover {
    background: #f5f6f7;
}

body.dark-mode .tag-event-row {
    border-color: #444;
}

body.dark-mode .tag-event-row:hover {
    background: #3a3a3a;
}

.tag-event-row .event-name {
    font-weight: 500;
    color: #001D34;
}

body.dark-mode .tag-event-row .event-name {
    color: #E6E7E8;
}

.tag-event-row .event-date {
    font-size: 13px;
    color: #666;
}

body.dark-mode .tag-event-row .event-date {
    color: #999;
}

.tag-events-list-full .no-events-message {
    padding: 24px;
    text-align: center;
    color: #666;
}

body.dark-mode .tag-events-list-full .no-events-message {
    color: #999;
}

.danger-zone {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 24px;
}

body.dark-mode .danger-zone {
    background: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.3);
}

.danger-zone h3 {
    font-size: 16px;
    font-weight: 600;
    color: #dc2626;
    margin: 0 0 8px 0;
}

.danger-zone p {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
}

body.dark-mode .danger-zone p {
    color: #999;
}

/* ===================================
   Attendee Details View
   =================================== */

.attendee-details-view {
    padding: 0;
}

.attendee-details-container {
    max-width: 900px;
}

.attendee-profile-section {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.attendee-detail-avatar {
    flex-shrink: 0;
}

.attendee-detail-avatar-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.attendee-detail-avatar-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4D6171 0%, #001D34 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
}

.attendee-profile-info h2 {
    font-size: 28px;
    font-weight: 600;
    color: #001D34;
    margin: 0 0 8px 0;
}

body.dark-mode .attendee-profile-info h2 {
    color: #E6E7E8;
}

.attendee-profile-info .type-badge {
    margin-bottom: 8px;
}

.attendee-email {
    font-size: 15px;
    color: #666;
    margin: 8px 0 4px 0;
}

body.dark-mode .attendee-email {
    color: #999;
}

.attendee-job-title {
    font-size: 14px;
    color: #888;
    margin: 0;
}

body.dark-mode .attendee-job-title {
    color: #777;
}

.attendee-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .attendee-stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

body.dark-mode .stat-card {
    background: #2a2a2a;
    border-color: #444;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

body.dark-mode .stat-label {
    color: #999;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    color: #001D34;
}

body.dark-mode .stat-value {
    color: #E6E7E8;
}

.attendee-registrations-section {
    margin-bottom: 32px;
}

.attendee-registrations-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
    color: #001D34;
}

body.dark-mode .attendee-registrations-section h3 {
    color: #E6E7E8;
}

.registrations-group {
    margin-bottom: 24px;
}

.registrations-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.dark-mode .registrations-group-title {
    color: #999;
}

.registration-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.registration-row:hover {
    background: #f5f6f7;
    border-color: #4D6171;
}

body.dark-mode .registration-row {
    background: #2a2a2a;
    border-color: #444;
}

body.dark-mode .registration-row:hover {
    background: #3a3a3a;
    border-color: #4D6171;
}

.registration-event-name {
    font-weight: 500;
    color: #001D34;
}

body.dark-mode .registration-event-name {
    color: #E6E7E8;
}

.registration-dates {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #666;
}

body.dark-mode .registration-dates {
    color: #999;
}

.no-registrations {
    color: #666;
    font-style: italic;
}

body.dark-mode .no-registrations {
    color: #999;
}

/* ========================================
   Event Managers Section Styles
   ======================================== */

.event-managers-section {
    background: #f5f7f9;
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

body.dark-mode .event-managers-section {
    background: #1e252e;
}

.event-managers-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

body.dark-mode .event-managers-section h4 {
    color: #E6E7E8;
}

.managers-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manager-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

body.dark-mode .manager-item {
    background: #252d38;
    border-color: #3a4553;
}

.manager-item.owner {
    border-color: #00A2E1;
    background: linear-gradient(135deg, rgba(0, 162, 225, 0.05), rgba(0, 119, 181, 0.05));
}

body.dark-mode .manager-item.owner {
    background: linear-gradient(135deg, rgba(0, 162, 225, 0.1), rgba(0, 119, 181, 0.1));
    border-color: #00A2E1;
}

.manager-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A2E1, #0077B5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.manager-initials {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.manager-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.manager-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .manager-name {
    color: #E6E7E8;
}

.manager-email {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.dark-mode .manager-email {
    color: #999;
}

.manager-role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.manager-role-badge.owner {
    background: linear-gradient(135deg, #00A2E1, #0077B5);
    color: white;
}

.manager-role-badge.co-manager {
    background: #e0f4fc;
    color: #0077B5;
}

body.dark-mode .manager-role-badge.co-manager {
    background: rgba(0, 162, 225, 0.2);
    color: #00A2E1;
}

.btn-remove-manager {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #999;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-manager:hover {
    background: #fee;
    color: #E51938;
}

body.dark-mode .btn-remove-manager:hover {
    background: rgba(229, 25, 56, 0.2);
}

.add-manager-section,
.transfer-ownership-section {
    margin-top: 12px;
}

.btn-add-manager,
.btn-transfer-ownership {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: 1px dashed #ccc;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    justify-content: center;
    transition: all 0.2s;
}

.btn-add-manager:hover,
.btn-transfer-ownership:hover {
    border-color: #00A2E1;
    color: #00A2E1;
    background: rgba(0, 162, 225, 0.05);
}

body.dark-mode .btn-add-manager,
body.dark-mode .btn-transfer-ownership {
    border-color: #4a5563;
    color: #999;
}

body.dark-mode .btn-add-manager:hover,
body.dark-mode .btn-transfer-ownership:hover {
    border-color: #00A2E1;
    color: #00A2E1;
    background: rgba(0, 162, 225, 0.1);
}

.add-manager-form,
.transfer-ownership-form {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

body.dark-mode .add-manager-form,
body.dark-mode .transfer-ownership-form {
    background: #252d38;
    border-color: #3a4553;
}

.add-manager-form.hidden,
.transfer-ownership-form.hidden {
    display: none;
}

.add-manager-form .form-input,
.transfer-ownership-form .form-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

body.dark-mode .add-manager-form .form-input,
body.dark-mode .transfer-ownership-form .form-input {
    background: #1a1f26;
    border-color: #3a4553;
    color: #E6E7E8;
}

.btn-confirm-add,
.btn-confirm-transfer {
    padding: 8px 16px;
    background: #00A2E1;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.btn-confirm-add:hover,
.btn-confirm-transfer:hover {
    background: #0077B5;
}

.btn-cancel-add,
.btn-cancel-transfer {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-cancel-add:hover,
.btn-cancel-transfer:hover {
    background: #e0e0e0;
}

body.dark-mode .btn-cancel-add,
body.dark-mode .btn-cancel-transfer {
    background: #3a4553;
    color: #999;
}

body.dark-mode .btn-cancel-add:hover,
body.dark-mode .btn-cancel-transfer:hover {
    background: #4a5563;
}

.error-text {
    color: #E51938;
    font-size: 13px;
}

/* ========================================
   Searchable Dropdown Styles
   ======================================== */

.searchable-dropdown {
    position: relative;
    flex: 1;
}

.searchable-dropdown .form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

body.dark-mode .searchable-dropdown .form-input {
    background: #1a1f26;
    border-color: #3a4553;
    color: #E6E7E8;
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

body.dark-mode .dropdown-list {
    background: #252d38;
    border-color: #3a4553;
}

.dropdown-list.show {
    display: block;
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid #f0f0f0;
}

body.dark-mode .dropdown-item {
    border-bottom-color: #3a4553;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.active {
    background: #f5f7f9;
}

body.dark-mode .dropdown-item:hover,
body.dark-mode .dropdown-item.active {
    background: #1e252e;
}

.dropdown-item.no-results {
    color: #999;
    font-style: italic;
    cursor: default;
}

.dropdown-item.no-results:hover {
    background: transparent;
}

.dropdown-item-name {
    font-weight: 500;
    font-size: 13px;
    color: #333;
}

body.dark-mode .dropdown-item-name {
    color: #E6E7E8;
}

.dropdown-item-email {
    font-size: 12px;
    color: #666;
}

body.dark-mode .dropdown-item-email {
    color: #999;
}

/* ========================================
   Orphaned Events Section (Admin Only)
   ======================================== */

.orphaned-events-section {
    background: linear-gradient(135deg, #fff5f5, #ffe5e5);
    border: 1px solid #E51938;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

body.dark-mode .orphaned-events-section {
    background: linear-gradient(135deg, rgba(229, 25, 56, 0.1), rgba(229, 25, 56, 0.05));
    border-color: #E51938;
}

.orphaned-events-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.orphaned-events-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #E51938;
}

.orphaned-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
}

body.dark-mode .orphaned-description {
    color: #999;
}

.orphaned-actions {
    display: flex;
    gap: 8px;
}

.btn-detect-orphans {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: none;
    border: 1px solid #E51938;
    border-radius: 4px;
    color: #E51938;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-detect-orphans:hover {
    background: #E51938;
    color: white;
}

.orphaned-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orphaned-event-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #f0d0d0;
}

body.dark-mode .orphaned-event-card {
    background: #1a1f26;
    border-color: #3a4553;
}

.orphaned-event-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.orphaned-event-name {
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

body.dark-mode .orphaned-event-name {
    color: #E6E7E8;
}

.orphaned-event-meta {
    font-size: 12px;
    color: #666;
}

body.dark-mode .orphaned-event-meta {
    color: #999;
}

.orphaned-event-owner {
    font-size: 11px;
    color: #999;
}

body.dark-mode .orphaned-event-owner {
    color: #777;
}

.btn-claim-event {
    padding: 8px 16px;
    background: #00A2E1;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-claim-event:hover {
    background: #0077B5;
}
