/**
 * TicketPayGo Admin Styles
 * Premium UI/UX Design System
 */

/* ============================================
   CSS Variables - Design Tokens
   ============================================ */
:root {
    --tpg-primary: #667eea;
    --tpg-primary-dark: #5a6fd6;
    --tpg-secondary: #764ba2;
    --tpg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --tpg-success: #10b981;
    --tpg-warning: #f59e0b;
    --tpg-danger: #ef4444;
    --tpg-info: #3b82f6;
    --tpg-text-primary: #1e293b;
    --tpg-text-secondary: #64748b;
    --tpg-text-muted: #94a3b8;
    --tpg-bg-primary: #ffffff;
    --tpg-bg-secondary: #f8fafc;
    --tpg-bg-tertiary: #f1f5f9;
    --tpg-border: #e2e8f0;
    --tpg-border-light: #f1f5f9;
    --tpg-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --tpg-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --tpg-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --tpg-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --tpg-radius-sm: 6px;
    --tpg-radius: 12px;
    --tpg-radius-lg: 16px;
    --tpg-radius-xl: 24px;
    --tpg-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Dashboard Stats Grid - Premium Design
   ============================================ */
.wrap .ticketpaygo-stats-grid,
.ticketpaygo-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 24px !important;
    margin: 24px 0 !important;
}

.wrap .stat-card,
.stat-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.wrap .stat-card::before,
.stat-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    opacity: 0;
    transition: var(--tpg-transition);
}

.wrap .stat-card:hover,
.stat-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border-color: #667eea !important;
}

.stat-card:hover::before {
    opacity: 1;
}

.wrap .stat-icon,
.stat-icon {
    width: 64px !important;
    height: 64px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 28px !important;
    flex-shrink: 0 !important;
    background: #f1f5f9 !important;
}

.stat-icon .dashicons {
    font-size: 32px !important;
    width: 32px !important;
    height: 32px !important;
}

.wrap .stat-card:nth-child(1) .stat-icon,
.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%) !important;
    color: #667eea !important;
}

.wrap .stat-card:nth-child(2) .stat-icon,
.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%) !important;
    color: #10b981 !important;
}

.wrap .stat-card:nth-child(3) .stat-icon,
.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%) !important;
    color: #f59e0b !important;
}

.wrap .stat-card:nth-child(4) .stat-icon,
.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%) !important;
    color: #3b82f6 !important;
}

.wrap .stat-content,
.stat-content {
    flex: 1 !important;
    min-width: 0 !important;
}

.wrap .stat-content h3,
.stat-content h3 {
    margin: 0 0 4px 0 !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    color: #1e293b !important;
    line-height: 1.1 !important;
    letter-spacing: -0.02em !important;
}

.wrap .stat-content p,
.stat-content p {
    margin: 0 0 6px 0 !important;
    color: #64748b !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* ============================================
   Today's Stats - Premium Card
   ============================================ */
.wrap .ticketpaygo-today-stats,
.ticketpaygo-today-stats {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 28px !important;
    margin: 24px 0 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.wrap .ticketpaygo-today-stats h2,
.ticketpaygo-today-stats h2 {
    margin: 0 0 20px 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.ticketpaygo-today-stats h2::before {
    content: '';
    display: none;
}

.wrap .today-stats-grid,
.today-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 16px !important;
}

.wrap .today-stat,
.today-stat {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 18px 20px !important;
    background: #f8fafc !important;
    border-radius: 12px !important;
    border-left: 4px solid #667eea !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.wrap .today-stat:hover,
.today-stat:hover {
    background: #f1f5f9 !important;
    transform: translateX(4px) !important;
}

.wrap .today-stat:nth-child(2),
.today-stat:nth-child(2) {
    border-left-color: #10b981 !important;
}

.wrap .today-stat:nth-child(3),
.today-stat:nth-child(3) {
    border-left-color: #f59e0b !important;
}

.wrap .today-stat .label,
.today-stat .label {
    font-weight: 600 !important;
    color: #64748b !important;
    font-size: 14px !important;
}

.wrap .today-stat .value,
.today-stat .value {
    color: #1e293b !important;
    font-weight: 800 !important;
    font-size: 20px !important;
}

/* ============================================
   Chart Container - Premium Design
   ============================================ */
.wrap .ticketpaygo-chart-container,
.ticketpaygo-chart-container {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 28px !important;
    margin: 24px 0 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.wrap .ticketpaygo-chart-container h2,
.ticketpaygo-chart-container h2 {
    margin: 0 0 24px 0 !important;
    color: #1e293b !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid #f1f5f9 !important;
}

.ticketpaygo-chart-container h2::before {
    content: '';
    display: none;
}

/* ============================================
   Top Events Table - Premium Design
   ============================================ */
.wrap .ticketpaygo-top-events,
.ticketpaygo-top-events {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 28px !important;
    margin: 24px 0 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.wrap .ticketpaygo-top-events h2,
.ticketpaygo-top-events h2 {
    margin: 0 0 24px 0 !important;
    color: #1e293b !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid #f1f5f9 !important;
}

.ticketpaygo-top-events h2::before {
    content: '';
    display: none;
}

.events-table-container {
    margin-top: 0;
    overflow-x: auto;
    border-radius: var(--tpg-radius);
}

.events-table-container table {
    border-collapse: separate;
    border-spacing: 0;
}

.events-table-container th {
    background: var(--tpg-bg-secondary);
    color: var(--tpg-text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
    padding: 14px 16px;
}

.events-table-container td {
    padding: 16px;
    border-bottom: 1px solid var(--tpg-border-light);
}

.events-table-container tr:hover td {
    background: var(--tpg-bg-secondary);
}

/* ============================================
   Quick Actions - Premium Design
   ============================================ */
.wrap .ticketpaygo-quick-actions,
.ticketpaygo-quick-actions {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 28px !important;
    margin: 24px 0 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.wrap .ticketpaygo-quick-actions h2,
.ticketpaygo-quick-actions h2 {
    margin: 0 0 24px 0 !important;
    color: #1e293b !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding-bottom: 16px !important;
    border-bottom: 2px solid var(--tpg-border-light);
}

.ticketpaygo-quick-actions h2::before {
    content: '';
    display: none;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: var(--tpg-bg-secondary);
    border: 2px solid var(--tpg-border);
    border-radius: var(--tpg-radius);
    text-decoration: none;
    color: var(--tpg-text-primary);
    transition: var(--tpg-transition);
    position: relative;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--tpg-gradient);
    opacity: 0;
    transition: var(--tpg-transition);
}

.quick-action-btn:hover {
    background: var(--tpg-bg-primary);
    border-color: var(--tpg-primary);
    transform: translateY(-3px);
    box-shadow: var(--tpg-shadow);
    color: var(--tpg-primary);
}

.quick-action-btn:hover::before {
    opacity: 1;
}

.quick-action-btn:focus {
    outline: none;
    border-color: var(--tpg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.action-icon {
    font-size: 28px;
    margin-right: 16px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tpg-bg-tertiary);
    border-radius: var(--tpg-radius-sm);
    transition: var(--tpg-transition);
}

.action-icon .dashicons {
    font-size: 24px !important;
    width: 24px !important;
    height: 24px !important;
}

.quick-action-btn:hover .action-icon {
    background: rgba(102, 126, 234, 0.1);
}

.action-text {
    font-weight: 700;
    font-size: 15px;
}

/* ============================================
   Events Form - Premium Design
   ============================================ */
.ticketpaygo-form-container {
    background: var(--tpg-bg-primary);
    border: 1px solid var(--tpg-border);
    border-radius: var(--tpg-radius-lg);
    padding: 32px;
    margin: 24px 0;
    box-shadow: var(--tpg-shadow-sm);
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--tpg-border-light);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h2 {
    margin: 0 0 24px 0;
    color: var(--tpg-text-primary);
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tpg-primary);
    display: inline-block;
}

.form-section .form-table {
    margin-top: 0;
}

/* ============================================
   Status Indicators - Premium Badges
   ============================================ */
.status-active,
.status-inactive,
.status-draft,
.status-pending,
.status-completed,
.status-failed,
.status-cancelled {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--tpg-success);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--tpg-danger);
}

.status-draft {
    background: rgba(245, 158, 11, 0.1);
    color: var(--tpg-warning);
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--tpg-warning);
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--tpg-success);
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--tpg-danger);
}

.status-cancelled {
    background: rgba(100, 116, 139, 0.1);
    color: var(--tpg-text-secondary);
}

/* ============================================
   Settings - Premium Design
   ============================================ */
.ticketpaygo-settings-container {
    background: var(--tpg-bg-primary);
    border: 1px solid var(--tpg-border);
    border-radius: var(--tpg-radius-lg);
    padding: 32px;
    margin: 24px 0;
    box-shadow: var(--tpg-shadow-sm);
}

.settings-section {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--tpg-border-light);
}

.settings-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.settings-section h2 {
    margin: 0 0 24px 0;
    color: var(--tpg-text-primary);
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--tpg-primary);
    display: inline-block;
}

.settings-section h3 {
    color: var(--tpg-text-secondary);
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    border-bottom: 1px solid var(--tpg-border-light);
    padding-bottom: 8px;
}

.form-table th {
    width: 220px;
    padding: 16px 16px 16px 0;
    vertical-align: top;
    color: var(--tpg-text-primary);
    font-weight: 600;
}

.form-table td {
    padding: 16px 0;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="number"],
.form-table input[type="url"],
.form-table select,
.form-table textarea {
    border: 1px solid var(--tpg-border);
    border-radius: var(--tpg-radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    transition: var(--tpg-transition);
}

.form-table input:focus,
.form-table select:focus,
.form-table textarea:focus {
    border-color: var(--tpg-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.description {
    color: var(--tpg-text-muted);
    font-style: normal;
    margin-top: 8px;
    font-size: 13px;
}

.description a {
    color: var(--tpg-primary);
    text-decoration: none;
    font-weight: 500;
}

.description a:hover {
    text-decoration: underline;
}

/* Loading States */
.ticketpaygo-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ticketpaygo-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .today-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .today-stat {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

/* Accessibility */
.quick-action-btn:focus,
.button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .ticketpaygo-stats-grid,
    .ticketpaygo-today-stats,
    .ticketpaygo-quick-actions {
        break-inside: avoid;
    }
    
    .quick-action-btn {
        display: none;
    }
}

/* Orders Page Styles */
.orders .column-order {
    width: 120px;
}

.orders .column-event {
    width: 200px;
}

.orders .column-customer {
    width: 180px;
}

.orders .column-quantity {
    width: 80px;
    text-align: center;
}

.orders .column-amount {
    width: 120px;
    text-align: right;
}

.orders .column-status {
    width: 100px;
}

.orders .column-date {
    width: 140px;
}

.orders .column-actions {
    width: 150px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-refunded {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.no-orders-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-orders-message .dashicons {
    font-size: 48px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-orders-message h3 {
    color: #666;
    margin-bottom: 10px;
}

.order-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.order-actions .button {
    font-size: 11px;
    padding: 4px 8px;
    height: auto;
    line-height: 1.2;
}

/* Analytics Page Styles */
.wrap .analytics-filters,
.analytics-filters {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 25px !important;
    margin: 20px 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.wrap .filter-form,
.filter-form {
    display: flex !important;
    align-items: end !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
}

.wrap .filter-group,
.filter-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.wrap .filter-group label,
.filter-group label {
    font-weight: 600 !important;
    font-size: 13px !important;
    color: #1e293b !important;
}

.wrap .filter-group input,
.wrap .filter-group select,
.filter-group input,
.filter-group select {
    padding: 10px 12px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
    min-width: 140px !important;
    color: #1e293b !important;
}

.wrap .filter-group input:focus,
.wrap .filter-group select:focus,
.filter-group input:focus,
.filter-group select:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
}

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

.filter-actions .button-primary {
    background: linear-gradient(135deg, #0A4974 0%, #42963B 100%);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(10, 73, 116, 0.3);
}

.filter-actions .button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(10, 73, 116, 0.4);
}

.filter-actions .button-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-actions .button-secondary:hover {
    background: #f1f5f9;
    color: #1e293b;
    transform: translateY(-1px);
}

.analytics-dashboard {
    margin: 20px 0;
}

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

.stat-card {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: box-shadow 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card.revenue .stat-icon {
    background: rgba(0, 115, 170, 0.1);
    color: #0073aa;
}

.stat-card.orders .stat-icon {
    background: rgba(0, 163, 42, 0.1);
    color: #00a32a;
}

.stat-card.tickets .stat-icon {
    background: rgba(214, 54, 56, 0.1);
    color: #d63638;
}

.stat-card.events .stat-icon {
    background: rgba(255, 140, 0, 0.1);
    color: #ff8c00;
}

.stat-content h3 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.stat-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.stat-period {
    font-size: 12px;
    color: #999;
}

.analytics-charts {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.chart-header h2 {
    margin: 0;
    font-size: 22px;
    color: #2c3e50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-header h2:before {
    content: "\f185";
    font-family: dashicons;
    font-size: 24px;
}

.chart-controls {
    display: flex;
    gap: 8px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 12px;
}

.chart-toggle {
    font-size: 13px;
    padding: 8px 16px;
    height: auto;
    line-height: 1.2;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: transparent;
    color: #666;
}

.chart-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-1px);
}

.chart-toggle[data-active="true"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chart-container {
    position: relative;
    height: 320px;
    background: #fafbfc;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-empty-state {
    text-align: center;
    color: #8e9aaf;
    font-size: 16px;
    max-width: 400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* Hide the large chart icon - it was appearing as a watermark */
.chart-empty-state > .dashicons.dashicons-chart-line {
    display: none !important;
}

.chart-empty-state h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-weight: 700;
    font-size: 20px;
}

.chart-empty-state p {
    margin: 0 0 20px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #718096;
}

.chart-empty-state .button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    z-index: 1 !important;
}

.chart-empty-state .button .dashicons {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    line-height: 16px !important;
    position: relative !important;
    z-index: 2 !important;
}

.chart-empty-state .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: #fff;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.analytics-widget {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(102, 126, 234, 0.08);
    transition: all 0.3s ease;
}

.analytics-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.widget-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #f1f3f4;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-header h3:before {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    content: "";
    display: inline-block;
}

.widget-action {
    font-size: 13px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.widget-action:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #5a67d8;
    text-decoration: none;
    transform: translateY(-1px);
}

.widget-content {
    padding: 25px;
}

.no-data {
    text-align: center;
    padding: 50px 20px;
    color: #8e9aaf;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin: 10px;
}

.no-data .dashicons {
    font-size: 48px;
    color: #cbd5e0;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-data h3 {
    margin: 0 0 10px 0;
    color: #5a6c7d;
    font-weight: 600;
    font-size: 18px;
}

.no-data p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.top-events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.event-rank {
    width: 30px;
    height: 30px;
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.event-info {
    flex: 1;
}

.event-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.event-stats {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.event-progress {
    width: 120px;
    text-align: right;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background: #0073aa;
    transition: width 0.3s ease;
}

.locations-list,
.recent-orders-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item,
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.location-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.location-count {
    font-size: 13px;
    color: #666;
}

.payment-methods-chart {
    position: relative;
    height: 200px;
    margin-bottom: 20px;
}

.payment-methods-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 2px;
}

.legend-label {
    flex: 1;
    font-size: 13px;
    color: #333;
}

.legend-value {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.order-info strong {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.order-details {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.order-status {
    text-align: right;
}

.order-status small {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-actions {
        justify-content: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .event-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .event-progress {
        width: 100%;
    }
}

/* Customization Page Styles */
.customization-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-top: 20px;
}

.section-group {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.section-group h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.preview-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

#card_preview {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    aspect-ratio: 16/9; /* Default aspect ratio, will be overridden by JS */
    position: relative;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto;
    max-width: 600px; /* Default max-width, will be overridden by JS */
    transition: all 0.3s ease;
}

.preview-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
}

.preview-title {
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.preview-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}

.preview-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 10px;
}

@media (max-width: 1200px) {
    .customization-container {
        grid-template-columns: 1fr;
    }
    
    .preview-section {
        position: static;
    }
}

/* Print Styles */
@media print {
    .wp-admin,
    .update-nag,
    .updated,
    .error,
    .notice,
    .inline-edit-row,
    .find-box {
        display: none !important;
    }
    
    .quick-action-btn {
        display: none;
    }
}

/* ============================================
   Premium Dashboard Header
   ============================================ */
.wrap .ticketpaygo-dashboard-header,
.ticketpaygo-dashboard-header {
    background: #f8fafc !important;
    border-radius: 24px !important;
    padding: 32px 40px !important;
    margin: -10px 0 32px 0 !important;
    color: #1e293b !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
}

.ticketpaygo-dashboard-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.ticketpaygo-dashboard-header::after {
    content: '';
    position: absolute;
    bottom: -60%;
    left: 20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.dashboard-header-content {
    position: relative;
    z-index: 1;
}

.dashboard-header-content .dashboard-logo {
    max-width: 240px;
    height: auto;
    margin: 0 0 12px 0;
    display: block;
}

.dashboard-header-content h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.dashboard-header-content p {
    margin: 0;
    opacity: 0.7;
    font-size: 16px;
    color: #64748b;
}

.dashboard-header-badge {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: var(--tpg-radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #1e293b;
}

.dashboard-header-badge .version {
    background: white;
    color: var(--tpg-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

/* ============================================
   Analytics Page - Fixed Stat Cards
   ============================================ */
.analytics-dashboard .stats-grid .stat-card {
    position: relative;
}

.analytics-dashboard .stats-grid .stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--tpg-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.analytics-dashboard .stats-grid .stat-card .stat-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    line-height: 1;
}

.analytics-dashboard .stats-grid .stat-card.revenue .stat-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    color: var(--tpg-primary);
}

.analytics-dashboard .stats-grid .stat-card.orders .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: var(--tpg-success);
}

.analytics-dashboard .stats-grid .stat-card.tickets .stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: var(--tpg-danger);
}

.analytics-dashboard .stats-grid .stat-card.events .stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: var(--tpg-warning);
}

.analytics-dashboard .stats-grid .stat-card .stat-content {
    display: flex;
    flex-direction: column;
}

.analytics-dashboard .stats-grid .stat-card .stat-content p {
    font-size: 12px;
    font-weight: 600;
    color: var(--tpg-text-secondary);
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    order: 1;
}

.analytics-dashboard .stats-grid .stat-card .stat-content h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--tpg-text-primary);
    margin: 0 0 4px 0;
    line-height: 1.1;
    order: 2;
}

.analytics-dashboard .stats-grid .stat-card .stat-content .stat-period {
    font-size: 12px;
    color: var(--tpg-text-muted);
    font-weight: 400;
    order: 3;
}

/* ============================================
   Global Button Improvements
   ============================================ */
.wrap .button-primary {
    background: linear-gradient(135deg, #0A4974 0%, #42963B 100%);
    border: none;
    border-radius: var(--tpg-radius-sm);
    padding: 8px 20px;
    font-weight: 600;
    transition: var(--tpg-transition);
    box-shadow: 0 2px 8px rgba(10, 73, 116, 0.3);
}

.wrap .button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 73, 116, 0.4);
}

.wrap .button-secondary {
    border-radius: var(--tpg-radius-sm);
    transition: var(--tpg-transition);
}

/* ============================================
   Page Title Improvements
   ============================================ */
.wrap > h1.wp-heading-inline,
.wrap > h1:first-of-type {
    font-size: 28px;
    font-weight: 800;
    color: var(--tpg-text-primary);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

/* ============================================
   Notice Improvements
   ============================================ */
.wrap .notice {
    border-radius: var(--tpg-radius-sm);
    border-left-width: 4px;
    padding: 12px 16px;
    margin: 16px 0;
}

.wrap .notice-success {
    border-left-color: var(--tpg-success);
    background: rgba(16, 185, 129, 0.08);
}

.wrap .notice-error {
    border-left-color: var(--tpg-danger);
    background: rgba(239, 68, 68, 0.08);
}

.wrap .notice-warning {
    border-left-color: var(--tpg-warning);
    background: rgba(245, 158, 11, 0.08);
}

.wrap .notice-info {
    border-left-color: var(--tpg-info);
    background: rgba(59, 130, 246, 0.08);
}

/* ============================================
   Settings Page Tab Styling - Outlined Blue
   ============================================ */
.ticketpaygo-lite-settings .nav-tab-wrapper,
.tpgl-settings-page .nav-tab-wrapper {
    border-bottom: 2px solid #0A4974;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ticketpaygo-lite-settings .nav-tab,
.tpgl-settings-page .nav-tab,
.wrap .nav-tab-wrapper .nav-tab {
    background: #fff;
    border: 2px solid #0A4974;
    border-bottom: none;
    color: #0A4974;
    font-weight: 600;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
    padding: 8px 18px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.ticketpaygo-lite-settings .nav-tab:hover,
.tpgl-settings-page .nav-tab:hover,
.wrap .nav-tab-wrapper .nav-tab:hover {
    background: rgba(10, 73, 116, 0.08);
    color: #0A4974;
}

.ticketpaygo-lite-settings .nav-tab-active,
.tpgl-settings-page .nav-tab-active,
.wrap .nav-tab-wrapper .nav-tab-active,
.wrap .nav-tab-wrapper .nav-tab-active:hover {
    background: #0A4974;
    color: #fff;
    border-color: #0A4974;
}
