/* ========================================
   MODERN ADMIN PORTAL - DESIGN SYSTEM
   ======================================== */

:root {
    /* Primary Colors - Modern Purple/Blue Gradient */
    --primary-start: #667eea;
    --primary-end: #764ba2;
    --primary-light: #7c3aed;
    --primary-dark: #5b21b6;
    
    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    
    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Spacing */
    --sidebar-width: 280px;
    --topbar-height: 70px;
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    overflow-x: hidden;
}

/* ========================================
   LAYOUT
   ======================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    font-weight: 500;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

.nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

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

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.8;
}

.user-logout {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

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

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

.admin-topbar {
    background: white;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 900;
}

.topbar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.topbar-btn:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.topbar-btn .badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: var(--radius-full);
    border: 2px solid white;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
}

/* ========================================
   CARDS
   ======================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    transition: all var(--transition-base);
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-base);
}

.stat-card-clickable {
    cursor: pointer;
}

.stat-card-clickable:hover,
.stat-card-clickable:focus-visible {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.stat-card-clickable:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.stat-card-clickable .stat-detail-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card-clickable:hover .stat-detail-hint,
.stat-card-clickable:focus-visible .stat-detail-hint {
    opacity: 1;
}

.analytics-detail-count {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.analytics-detail-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.analytics-detail-empty i {
    font-size: 3rem;
    opacity: 0.3;
    display: block;
    margin-bottom: 1rem;
}

.analytics-detail-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.analytics-detail-summary-item {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    border: 1px solid var(--gray-200);
}

.analytics-detail-summary-item strong {
    display: block;
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.analytics-detail-summary-item span {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Analytics stat detail modal */
.analytics-stat-modal-dialog {
    width: min(1520px, calc(100vw - 1.5rem));
    max-width: min(1520px, calc(100vw - 1.5rem));
    height: min(90vh, 860px);
    max-height: min(90vh, 860px);
    margin: 0.75rem auto;
}

.analytics-stat-modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.analytics-stat-modal-header {
    flex-shrink: 0;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 100%);
}

.analytics-stat-modal-header-text {
    min-width: 0;
    padding-right: 1rem;
}

.analytics-stat-modal-header .modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.3;
}

.analytics-stat-modal-subtitle {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

.analytics-stat-modal-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #fff;
}

.analytics-stat-modal-footer {
    flex-shrink: 0;
    padding: 0.875rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.analytics-detail-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 1rem 1.25rem 1.25rem;
}

.analytics-detail-panel[hidden] {
    display: none !important;
}

.analytics-detail-panel--summary {
    justify-content: flex-start;
    overflow-y: auto;
}

.analytics-detail-table-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    gap: 0.75rem;
}

.analytics-detail-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 0.75rem;
}

.analytics-detail-record-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.analytics-detail-table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: #fff;
}

.analytics-detail-table {
    width: 100%;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8125rem;
    table-layout: fixed;
}

.analytics-detail-table th,
.analytics-detail-table td {
    padding: 0.5rem 0.625rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: top;
    line-height: 1.35;
}

.analytics-detail-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    background: var(--gray-100);
    box-shadow: 0 1px 0 var(--gray-200);
    white-space: nowrap;
}

.analytics-detail-table tbody tr:hover {
    background: #fafbfc;
}

.analytics-detail-table tbody tr:last-child td {
    border-bottom: none;
}

.analytics-detail-table .adc-email { width: 14%; }
.analytics-detail-table .adc-name { width: 9%; }
.analytics-detail-table .adc-company { width: 9%; }
.analytics-detail-table .adc-role { width: 7%; }
.analytics-detail-table .adc-event { width: 9%; }
.analytics-detail-table .adc-reaction { width: 8%; }
.analytics-detail-table .adc-comment { width: 26%; }
.analytics-detail-table .adc-demo { width: 6%; }
.analytics-detail-table .adc-broadcast { width: 11%; }
.analytics-detail-table .adc-cycle { width: 11%; }
.analytics-detail-table .adc-score { width: 5%; }
.analytics-detail-table .adc-category { width: 8%; }
.analytics-detail-table .adc-date { width: 10%; }
.analytics-detail-table .adc-actions { width: 9%; }

.analytics-detail-cell-truncate {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-detail-cell-wrap {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.analytics-detail-cell-muted {
    color: var(--text-secondary);
}

.analytics-detail-cell-nowrap {
    white-space: nowrap;
}

.analytics-detail-table .badge {
    font-size: 0.6875rem;
    padding: 0.2rem 0.45rem;
    white-space: nowrap;
}

.analytics-detail-summary-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.analytics-detail-toolbar .analytics-detail-scroll-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

@media (min-width: 1200px) {
    .analytics-detail-toolbar .analytics-detail-scroll-hint {
        display: none;
    }
}

@media (max-width: 768px) {
    .analytics-stat-modal-dialog {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        margin: 0;
    }

    .analytics-stat-modal-content {
        border-radius: 0;
        border: none;
    }

    .analytics-detail-panel {
        padding: 0.75rem;
    }
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.stat-icon.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-start) 0%, var(--primary-end) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   FORMS
   ======================================== */

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--danger);
    margin-left: 0.25rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    background: white;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-start);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--primary-start);
    border-color: var(--primary-start);
}

.form-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.form-error {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--danger);
}

/* ========================================
   TABLES
   ======================================== */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

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

.table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.table th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-primary);
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

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

/* ========================================
   BADGES
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    vertical-align: middle;
}

.badge i {
    font-size: 0.875em;
    line-height: 1;
    flex-shrink: 0;
}

.badge-primary {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-dark);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.12);
    color: #374151;
}

/* ========================================
   UTILITIES (Bootstrap grid used for layout)
   ======================================== */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.page-header-main {
    flex: 1;
    min-width: 220px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.list-card-row {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.list-card-main {
    flex: 1;
    min-width: 0;
    padding-top: 0.125rem;
}

.list-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.list-card-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.75rem;
    flex-shrink: 0;
    min-width: 0;
    padding-top: 0.125rem;
}

.list-card-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.list-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.broadcast-message-preview {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    max-width: 100%;
    min-width: 0;
}

/* Broadcast analytics accordion — prevent long text from widening layout */
.admin-accordion {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.admin-accordion .accordion-item {
    max-width: 100%;
    min-width: 0;
}

.admin-accordion .accordion-button {
    overflow: hidden;
    width: 100%;
}

.admin-accordion .accordion-header-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
}

.admin-accordion .accordion-title-wrap {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-accordion .accordion-stats {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    white-space: nowrap;
}

.admin-accordion .accordion-body {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
}

.broadcast-detail-panel {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: 6px;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.broadcast-detail-message {
    margin-top: 0.35rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.broadcast-detail-message img {
    max-width: 100%;
    height: auto;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.analytics-table th,
.analytics-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.analytics-table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--gray-100);
}

.analytics-table tbody tr:hover {
    background: #fafafa;
}

.stat-card .stat-icon {
    margin-bottom: 1rem;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }

.text-muted { color: var(--text-secondary); }
.text-primary { color: var(--primary-start); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.gap-2 { gap: 1rem; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }

    .list-card-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .list-card-main {
        flex: 1 1 calc(100% - 48px - 1.25rem);
    }

    .list-card-aside {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding-top: 0.75rem;
        margin-top: 0.25rem;
        border-top: 1px solid var(--gray-200);
    }

    .list-card-status {
        justify-content: flex-start;
    }

    .list-card-actions {
        justify-content: flex-end;
        padding-top: 0;
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideInRight var(--transition-base) ease-out;
}









