/**
 * Events Marketing CSS
 * v=20260126a
 */

/* ==========================================
   Version Badge
   ========================================== */
.version-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    background: #E5E7EB;
    color: #6B7280;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 8px;
}

/* ==========================================
   Events Page Layout
   ========================================== */
.events-page {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================
   Page Header
   ========================================== */
.events-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.events-header-left {
    flex: 1;
}

.events-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 4px 0;
}

.events-subtitle {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

.events-header-right {
    flex-shrink: 0;
}

.events-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #6366F1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.events-create-btn:hover {
    background: #4F46E5;
}

/* ==========================================
   Filter Tabs
   ========================================== */
.events-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 12px;
}

.events-filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    color: #6B7280;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.events-filter-tab:hover {
    background: #F3F4F6;
    color: #374151;
}

.events-filter-tab.active {
    background: #EEF2FF;
    color: #6366F1;
}

.events-filter-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #EF4444;
    color: white;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
}

/* ==========================================
   Events Table
   ========================================== */
.events-table-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

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

.events-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.events-table td {
    padding: 16px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

.events-table tr:last-child td {
    border-bottom: none;
}

.events-table tbody tr {
    cursor: pointer;
    transition: background 0.15s;
}

.events-table tbody tr:hover {
    background: #F9FAFB;
}

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

.event-name-cell strong {
    color: #111827;
}

.event-host {
    font-size: 12px;
    color: #9CA3AF;
}

/* Event Type Badge */
.event-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.event-type-badge.community {
    background: #EDE9FE;
    color: #7C3AED;
}

.event-type-badge.own {
    background: #DBEAFE;
    color: #2563EB;
}

/* Event Status Badge */
.event-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.event-status-badge.confirmed {
    background: #D1FAE5;
    color: #059669;
}

.event-status-badge.pending {
    background: #FEF3C7;
    color: #D97706;
}

.event-status-badge.invitation {
    background: #FEE2E2;
    color: #DC2626;
}

.event-status-badge.completed {
    background: #E5E7EB;
    color: #6B7280;
}

/* Action Buttons */
.events-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 6px;
}

.events-action-btn:last-child {
    margin-right: 0;
}

.events-action-btn.accept {
    background: #10B981;
    color: white;
}

.events-action-btn.accept:hover {
    background: #059669;
}

.events-action-btn.decline {
    background: #F3F4F6;
    color: #6B7280;
}

.events-action-btn.decline:hover {
    background: #E5E7EB;
    color: #374151;
}

.events-action-btn.view {
    background: #EEF2FF;
    color: #6366F1;
}

.events-action-btn.view:hover {
    background: #E0E7FF;
}

/* Empty State */
.events-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #9CA3AF;
}

.events-empty svg {
    color: #D1D5DB;
    margin-bottom: 16px;
}

.events-empty h3 {
    font-size: 16px;
    font-weight: 600;
    color: #6B7280;
    margin: 0 0 8px 0;
}

.events-empty p {
    font-size: 14px;
    margin: 0;
}

/* Loading State */
.events-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: #6B7280;
    font-size: 14px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #E5E7EB;
    border-top-color: #6366F1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ==========================================
   Event Detail View
   ========================================== */
.event-detail-view {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.event-breadcrumb {
    margin-bottom: 20px;
}

.event-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6B7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.event-breadcrumb a:hover {
    color: #6366F1;
}

.event-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.event-detail-info {
    flex: 1;
}

.event-detail-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #EDE9FE;
    color: #7C3AED;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.event-detail-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
}

.event-detail-host {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

.event-detail-status .status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.status-badge.confirmed {
    background: #D1FAE5;
    color: #059669;
}

.status-badge.pending {
    background: #FEF3C7;
    color: #D97706;
}

/* ==========================================
   Event Tabs
   ========================================== */
.event-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #E5E7EB;
    margin-bottom: 24px;
}

.event-tab {
    padding: 12px 20px;
    background: transparent;
    color: #6B7280;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.event-tab:hover {
    color: #374151;
}

.event-tab.active {
    color: #6366F1;
}

.event-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #6366F1;
}

/* ==========================================
   Tab Content
   ========================================== */
.event-tab-content {
    min-height: 400px;
}

.event-tab-panel {
    display: none;
}

.event-tab-panel.active {
    display: block;
}

/* Event Details Tab */
.event-details-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.event-details-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-details-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-details-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
}

.event-details-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-details-card p {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.6;
    margin: 0;
}

.event-detail-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.event-detail-row:last-child {
    margin-bottom: 0;
}

.event-detail-row svg {
    flex-shrink: 0;
    color: #6B7280;
    margin-top: 2px;
}

.event-detail-row div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-detail-row strong {
    font-size: 14px;
    color: #111827;
}

.event-detail-row span {
    font-size: 13px;
    color: #6B7280;
}

/* Event Stats */
.event-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.event-stat:last-child {
    margin-bottom: 0;
}

.event-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.event-stat-label {
    font-size: 13px;
    color: #6B7280;
}

/* Schedule List */
.event-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.schedule-time {
    font-size: 13px;
    font-weight: 600;
    color: #6366F1;
    min-width: 80px;
}

.schedule-title {
    font-size: 14px;
    color: #374151;
}

/* Sponsors List */
.event-sponsors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sponsor-item {
    padding: 6px 12px;
    background: #F3F4F6;
    color: #374151;
    border-radius: 6px;
    font-size: 13px;
}

/* ==========================================
   Event Page Tab (Booth Setup)
   ========================================== */
.event-page-setup {
    max-width: 600px;
}

.event-page-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.event-page-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px 0;
}

.event-page-hint {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 20px 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: white;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #9CA3AF;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #6366F1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: #4F46E5;
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   Event Day Tab
   ========================================== */
.event-day-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.event-day-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-day-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.event-day-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
}

.event-day-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
}

/* QR Code */
.event-day-qr {
    text-align: center;
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    margin-bottom: 16px;
}

.qr-placeholder {
    color: #9CA3AF;
    font-size: 14px;
}

.qr-hint {
    font-size: 12px;
    color: #6B7280;
    margin-top: 8px;
}

.qr-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #F3F4F6;
    color: #374151;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

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

/* Event Day Stats */
.event-day-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.event-day-stat {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.event-day-stat .stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #6366F1;
}

.event-day-stat .stat-label {
    font-size: 13px;
    color: #6B7280;
    margin-top: 4px;
}

/* Recent Check-ins */
.recent-checkins-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.recent-checkin-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #F9FAFB;
    border-radius: 8px;
}

.checkin-name {
    font-size: 14px;
    color: #111827;
    font-weight: 500;
}

.checkin-time {
    font-size: 12px;
    color: #9CA3AF;
}

.empty-state {
    text-align: center;
    color: #9CA3AF;
    font-size: 14px;
    padding: 20px;
}

/* ==========================================
   Post-Event Tab
   ========================================== */
.post-event-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
}

.post-event-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-event-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.post-event-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
}

.post-event-card h3 {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
}

/* Results Stats */
.post-event-stats {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

.post-event-stats h3 {
    color: rgba(255, 255, 255, 0.9);
}

.results-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.result-stat {
    text-align: center;
}

.result-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.result-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 4px;
}

/* Card Header with Actions */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h3 {
    margin: 0;
}

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

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

/* Leads Table */
.leads-table-container {
    overflow-x: auto;
}

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

.leads-table th {
    text-align: left;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.leads-table td {
    padding: 12px;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

/* Follow-up Card */
.followup-hint {
    font-size: 13px;
    color: #6B7280;
    margin: 0 0 20px 0;
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 1024px) {
    .event-details-grid,
    .event-day-grid,
    .post-event-grid {
        grid-template-columns: 1fr;
    }

    .event-details-sidebar,
    .event-day-sidebar,
    .post-event-sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .events-page,
    .event-detail-view {
        padding: 16px;
    }

    .events-header {
        flex-direction: column;
        gap: 16px;
    }

    .events-filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .events-table th:nth-child(3),
    .events-table td:nth-child(3),
    .events-table th:nth-child(4),
    .events-table td:nth-child(4) {
        display: none;
    }

    .event-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .event-tab {
        white-space: nowrap;
    }

    .results-stats {
        grid-template-columns: 1fr;
    }

    .event-day-stats {
        grid-template-columns: 1fr;
    }
}
