/* ===============================================
   PopCash Manager - Modern UI Styles
   =============================================== */

:root {
    /* Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #f59e0b;
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --warning: #f97316;
    --info: #3b82f6;

    /* Backgrounds */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-input: #0f172a;

    /* Text */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border-color: #334155;
    --border-light: #475569;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.26);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.24);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    --gradient-green: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-orange: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);

    /* Sizing */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===============================================
   Base Styles
   =============================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
}

/* ===============================================
   Scrollbar
   =============================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* ===============================================
   Sidebar
   =============================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--transition-normal);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar.collapsed .logo span {
    display: none;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.nav-item a i {
    width: 22px;
    font-size: 1.1rem;
    text-align: center;
}

.nav-item a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
}

.nav-item.active a {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.nav-item.active a::before {
    content: '';
    position: absolute;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.sidebar.collapsed .nav-item a span {
    display: none;
}

.sidebar.collapsed .nav-item a {
    justify-content: center;
    padding: 14px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-balance {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
}

.sidebar.collapsed .user-details {
    display: none;
}

/* ===============================================
   Main Content
   =============================================== */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ===============================================
   Topbar
   =============================================== */

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 100;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.notification-badge {
    position: relative;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.notification-badge:hover {
    color: var(--text-primary);
}

.notification-badge .badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

/* ===============================================
   Pages Container
   =============================================== */

.pages-container {
    padding: 30px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   Stats Grid
   =============================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 24px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.gradient-purple {
    background: var(--gradient-purple);
}

.gradient-blue {
    background: var(--gradient-blue);
}

.gradient-green {
    background: var(--gradient-green);
}

.gradient-orange {
    background: var(--gradient-orange);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-content h3 {
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.9;
    color: white;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
}

/* ===============================================
   Dashboard Grid
   =============================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================================
   Cards
   =============================================== */

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i {
    color: var(--primary);
}

.card-body {
    padding: 24px;
}

/* ===============================================
   Buttons
   =============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-light);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
}

.btn-success {
    background: var(--secondary);
    color: white;
}

.btn-success:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ===============================================
   Tables
   =============================================== */

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-dark);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.data-table td {
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
}

/* ===============================================
   Status Badges
   =============================================== */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.status-running,
.status-approved {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-paused {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.status-blocked,
.status-banned {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.status-rejected {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.status-out-of-funds {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* ===============================================
   Forms
   =============================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-row.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.readonly-input {
    background: var(--bg-dark) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.input-group {
    display: flex;
    gap: 8px;
}

.input-group input {
    flex: 1;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.multi-select {
    min-height: 120px;
}

/* ===============================================
   Filter/Page Header
   =============================================== */

.page-header {
    margin-bottom: 24px;
}

.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-group select,
.filter-group input {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 160px;
}

.filter-group input {
    min-width: 200px;
}

/* ===============================================
   Pagination
   =============================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 8px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===============================================
   Modals
   =============================================== */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
    box-shadow: var(--shadow-xl);
}

.modal-lg {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: var(--primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-input);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

/* ===============================================
   Info List
   =============================================== */

.info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.info-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
}

/* ===============================================
   Reports
   =============================================== */

.reports-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.tab-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.report-filters .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

/* ===============================================
   Reference Buttons
   =============================================== */

.reference-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.reference-data-container {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

/* ===============================================
   Blacklist
   =============================================== */

.blacklist-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.blacklist-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 0.85rem;
}

.blacklist-tag button {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 2px;
    font-size: 0.8rem;
}

.blacklist-tag button:hover {
    color: var(--danger-dark);
}

.description {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ===============================================
   Toast Notifications
   =============================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease;
    min-width: 300px;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--secondary);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--secondary);
}

.toast.error i {
    color: var(--danger);
}

.toast.warning i {
    color: var(--warning);
}

.toast.info i {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* ===============================================
   Loading Overlay
   =============================================== */

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner-large {
    text-align: center;
    color: var(--primary);
}

.loading-spinner-large i {
    font-size: 3rem;
    margin-bottom: 16px;
}

.loading-spinner-large p {
    color: var(--text-secondary);
}

.loading-spinner {
    color: var(--text-muted);
    text-align: center;
    padding: 40px;
}

/* ===============================================
   Action Buttons in Tables
   =============================================== */

.action-buttons {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.85rem;
}

.action-btn-view {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.action-btn-edit {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.action-btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.action-btn-play {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.action-btn-pause {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

.action-btn-schedule {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* ===============================================
   URL Display
   =============================================== */

.url-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-cell a {
    color: var(--info);
}

.url-cell a:hover {
    text-decoration: underline;
}

/* ===============================================
   Responsive Design
   =============================================== */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .pages-container {
        padding: 16px;
    }

    .topbar {
        padding: 0 16px;
    }

    .modal-content {
        margin: 16px;
    }

    .report-filters {
        flex-direction: column;
    }

    .report-filters .form-group {
        width: 100%;
    }
}

/* ===============================================
   Detail View Styles
   =============================================== */

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-value {
    font-weight: 500;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    padding: 4px 10px;
    background: var(--bg-dark);
    border-radius: 12px;
    font-size: 0.8rem;
}

/* ===============================================
   Toggle Switches
   =============================================== */

.toggle-switch {
    width: 48px;
    height: 24px;
    background: var(--bg-dark);
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
}

.toggle-switch.active {
    background: var(--secondary);
    border-color: var(--secondary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* ===============================================
   Scheduler Page Styles
   =============================================== */

.scheduler-intro {
    margin-bottom: 24px;
}

.scheduler-features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.feature-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

.feature-item span {
    font-weight: 500;
}

.scheduler-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 1200px) {
    .scheduler-grid {
        grid-template-columns: 1fr;
    }
}

.weekday-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weekday-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.weekday-checkbox:hover {
    border-color: var(--primary);
}

.weekday-checkbox input:checked+span {
    color: var(--primary);
}

.weekday-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.schedulers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.scheduler-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.scheduler-card.active {
    border-color: var(--secondary);
}

.scheduler-card.paused {
    border-color: var(--text-muted);
}

.scheduler-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.scheduler-card-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scheduler-card-title h3 {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.scheduler-card-title h3 .campaign-id {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: normal;
}

.scheduler-card-status {
    display: flex;
    gap: 8px;
}

.scheduler-card-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.scheduler-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scheduler-info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.scheduler-info-value {
    font-size: 0.9rem;
    font-weight: 500;
}

.scheduler-progress {
    margin-bottom: 16px;
}

.scheduler-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.scheduler-progress-bar {
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

.scheduler-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.scheduler-progress-fill.warning {
    background: var(--gradient-orange);
}

.scheduler-progress-fill.complete {
    background: var(--gradient-green);
}

.scheduler-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.scheduler-time-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    font-size: 0.85rem;
}

.scheduler-time-display i {
    color: var(--primary);
}

.scheduler-time-display.inactive {
    opacity: 0.6;
}

.scheduler-time-display.inactive i {
    color: var(--text-muted);
}

/* Action Log */
.scheduler-log {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.scheduler-log-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.scheduler-log-entries {
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.8rem;
}

.scheduler-log-entry {
    display: flex;
    gap: 8px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

.scheduler-log-entry:last-child {
    border-bottom: none;
}

.scheduler-log-time {
    color: var(--text-muted);
    white-space: nowrap;
}

.scheduler-log-action {
    color: var(--primary);
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--secondary);
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: var(--text-muted);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Timezone display */
.timezone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Pacing indicator */
.pacing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-card);
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
    margin-top: 12px;
}

.pacing-indicator.on-pace {
    color: var(--secondary);
}

.pacing-indicator.ahead {
    color: var(--warning);
}

.pacing-indicator.behind {
    color: var(--info);
}

/* Quick stats */
.scheduler-quick-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.quick-stat {
    text-align: center;
}

.quick-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quick-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ===============================================
   Campaign Click Statistics View
   =============================================== */

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.stats-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.stats-header h3 i {
    color: var(--primary);
}

.campaign-id-badge {
    background: var(--bg-dark);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-primary .stat-icon {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.stat-success .stat-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.stat-warning .stat-icon {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.stat-info .stat-icon {
    background: rgba(6, 182, 212, 0.15);
    color: #06b6d4;
}

.stat-info-content {
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-section {
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.chart-section h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.simple-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 150px;
    gap: 10px;
    padding-top: 20px;
}

.chart-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.chart-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 5px;
    transition: height 0.3s ease;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-value {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.chart-label {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.data-table-section {
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    padding: 20px;
}

.data-table-section h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table th,
.stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.stats-table th {
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.stats-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.stats-table .today-row {
    background: rgba(168, 85, 247, 0.1);
}

.stats-table .today-row:hover {
    background: rgba(168, 85, 247, 0.15);
}

.stats-table .total-row {
    background: var(--bg-card);
}

.stats-table .total-row td {
    border-bottom: none;
}

.today-badge {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
}

.clicks-cell {
    font-weight: 600;
    color: var(--primary-light);
}

@media (max-width: 768px) {
    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .simple-chart {
        height: 100px;
    }

    .chart-value {
        font-size: 0.65rem;
    }
}

/* ===============================================
   Toggle Switch Styles
   =============================================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition-normal);
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-normal);
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--gradient-primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}