/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* About Page Tabs */
.about-tab-btn {
    position: relative;
    transition: all 0.2s ease;
}

.about-tab-btn:hover {
    color: #2563eb !important;
}

.about-tab-btn.active {
    color: #2563eb !important;
    border-bottom-color: #2563eb !important;
    font-weight: 600;
}

.about-tab-content {
    animation: fadeIn 0.3s ease;
}

/* Reporting & Analytics Styles */
.report-tab-content {
    animation: fadeIn 0.3s ease;
}

.summary-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.summary-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.summary-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: white;
    font-size: 24px;
}

.summary-card-content {
    flex: 1;
}

.summary-card-label {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 4px;
}

.summary-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
}

.chart-card {
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-card h4 {
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

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

:root {
    /* Modern Gradient Theme (Default) */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #ffffff;
    --border: #e2e8f0;
    --text: #334155;
    --text-light: #64748b;
    --sidebar-bg: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    --sidebar-text: #cbd5e1;
    --sidebar-hover: rgba(102, 126, 234, 0.2);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --topbar-bg: #ffffff;
    --stat-card-bg: #ffffff;

    /* Design tokens */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --font-sm: 13px;
    --font-md: 14px;
    --font-lg: 16px;
    --focus-ring: 0 0 0 3px rgba(102, 126, 234, 0.25);

    /* Modal / pop-up defaults (used by JS-generated modals) */
    --modal-body-bg: #1e293b;
    --modal-body-color: #e2e8f0;
    --modal-footer-bg: #f9fafb;
    --modal-footer-border: #e5e7eb;

    --alert-detail-surface-bg: #f9fafb;
    --alert-detail-surface-text: #111827;

    /* Generic light surface for JS-generated modal blocks */
    --modal-light-surface-bg: #f9fafb;
    --modal-light-surface-text: #111827;
}

/* Used by multiple JS 'View details' popups */
.modal-light-surface {
    background: var(--modal-light-surface-bg, #f9fafb) !important;
    color: var(--modal-light-surface-text, #111827) !important;
}

/* Professional CRM Theme */
body.theme-crm {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --dark: #1f2937;
    --light: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --text-light: #6b7280;
    --sidebar-bg: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    --sidebar-text: #f3f4f6;
    --sidebar-hover: rgba(37, 99, 235, 0.15);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --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);
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-success: linear-gradient(135deg, #059669 0%, #047857 100%);
    --gradient-warning: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    --gradient-danger: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    --card-bg: #ffffff;
    --card-border: #e5e7eb;
    --topbar-bg: #ffffff;
    --stat-card-bg: #f9fafb;
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.22);

    /* Make modals follow CRM theme (light surfaces) */
    --modal-body-bg: #ffffff;
    --modal-body-color: #111827;
    --modal-footer-bg: #ffffff;
    --modal-footer-border: #e5e7eb;

    --alert-detail-surface-bg: #f9fafb;
    --alert-detail-surface-text: #111827;

    /* Light surfaces in modals */
    --modal-light-surface-bg: #f9fafb;
    --modal-light-surface-text: #111827;
}

/* Override theme-aurora modal styles so modals follow active theme */
body.theme-crm .modal {
    background-color: rgba(0, 0, 0, 0.45) !important;
    backdrop-filter: blur(6px) !important;
}

body.theme-crm .modal-content {
    background: var(--card-bg) !important;
    border: 1px solid var(--card-border) !important;
    box-shadow: var(--shadow-lg) !important;
}

body.theme-crm .modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border) !important;
}

body.theme-crm .modal-body {
    background: #ffffff !important;
    color: #111827 !important;
}

body.theme-crm .modal-actions-footer {
    background: #ffffff !important;
    border-top: 1px solid var(--border) !important;
}

body.theme-crm .modal-actions-footer .btn-secondary {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
}

body.theme-crm .modal-actions-footer .btn-secondary:hover {
    background: #f9fafb !important;
}

body.theme-crm .modal .detail-item label {
    color: #6b7280 !important;
}

body.theme-crm .modal .detail-item span {
    color: #111827 !important;
}

body.theme-crm .alert-details-surface {
    background: var(--alert-detail-surface-bg) !important;
    color: var(--alert-detail-surface-text) !important;
}

/* Bet/Winnings details modals: keep light surfaces for CRM */
body.theme-crm .modal .detail-section,
body.theme-crm #bet-details-modal .detail-section,
body.theme-crm #winning-details-modal .detail-section {
    background: #ffffff !important;
    border-left-color: rgba(37, 99, 235, 0.35) !important;
}

body.theme-crm .modal .detail-section h3,
body.theme-crm #bet-details-modal .detail-section h3,
body.theme-crm #winning-details-modal .detail-section h3 {
    color: #111827 !important;
    border-bottom-color: rgba(148, 163, 184, 0.3) !important;
}

body.theme-crm .sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

body.theme-crm .card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

body.theme-crm .stat-card {
    background: var(--stat-card-bg);
    border: 1px solid var(--card-border);
}

body.theme-crm .top-bar {
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
}

body.theme-crm .nav-item.active {
    background: var(--sidebar-hover);
    border-left: 3px solid var(--primary);
}

body.theme-crm .btn-primary {
    background: var(--gradient-primary);
    border: none;
}

body.theme-crm .stat-icon {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
}

/* Global focus states (accessibility + consistency) */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
    position: relative;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
}

.nav-section-title {
    padding: 12px 20px 8px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(203, 213, 225, 0.75);
    user-select: none;
}

.nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 14px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    font-size: 20px;
    font-weight: 600;
}

/* Notifications Container */
.notifications-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.notifications-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--sidebar-text);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 18px;
}

.notifications-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
    border: 2px solid var(--sidebar-bg);
}

.notifications-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 350px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notifications-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
}

.notifications-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-item:hover {
    background: var(--stat-card-bg);
}

.notification-item.unread {
    background: #f0f9ff;
    border-left: 3px solid var(--primary);
}

.notification-item.read {
    opacity: 0.7;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-title .severity-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.notification-title .severity-badge.critical {
    background: var(--danger);
    color: white;
}

.notification-title .severity-badge.high {
    background: var(--warning);
    color: white;
}

.notification-title .severity-badge.medium {
    background: var(--primary);
    color: white;
}

.notification-message {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.notifications-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    background: var(--card-bg);
}

.notifications-footer a {
    color: var(--primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.notifications-footer a:hover {
    text-decoration: underline;
}

.logo-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.logo i {
    color: var(--primary);
    font-size: 24px;
}

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.nav-item.active .nav-badge {
    background: rgba(0, 0, 0, 0.3);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: calc(100vw - 260px);
    width: calc(100vw - 260px);
    position: relative;
    z-index: 1;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
    position: relative;
    z-index: 1;
    width: 100%;
}

.top-bar-left {
    flex: 1;
    min-width: 0; /* Permite textului să se trunceze dacă e necesar */
}

.top-bar-left h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.top-bar-left p {
    color: var(--text-light);
    font-size: 14px;
}

/* Pages */
.page {
    display: none;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
}

.page.active {
    display: block;
}

/* Regulă generală pentru toate paginile - asigură poziționarea corectă */
[id$="-page"] {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

/* Asigură că toate paginile specifice respectă margin-left-ul */
[id$="-page"] .page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.page-header {
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
    width: 100%;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--text-light);
    font-size: 14px;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue { background: var(--primary); }
.stat-icon.green { background: var(--success); }
.stat-icon.orange { background: var(--warning); }
.stat-icon.red { background: var(--danger); }

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Financial Section */
.financial-section {
    margin-top: 30px;
}

.card {
    background: white;
    border-radius: var(--radius-md);
    padding: var(--space-6);
    box-shadow: var(--shadow);
    border: 1px solid var(--card-border);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark);
}

.financial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.financial-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.financial-item .label {
    font-size: 14px;
    color: var(--text-light);
}

.financial-item .value {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
}

/* Filters */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.time-filters-row {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.filter-label {
    font-weight: 600;
    color: var(--text);
    margin-right: 10px;
    white-space: nowrap;
}

.time-filter-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-time-filter {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: var(--text);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9em;
}

.btn-time-filter:hover {
    background: #e8e8e8;
    border-color: #bbb;
}

.btn-time-filter.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}

.input, .select {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--font-md);
    background: white;
    color: var(--text);
    min-width: 150px;
}

.input {
    flex: 1;
    min-width: 200px;
}

.input::placeholder {
    color: rgba(100, 116, 139, 0.85);
}

.input:disabled, .select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    background: #f8fafc;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

/* Table */
.table-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

/* Users Cards Layout */
.users-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.user-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

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

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

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

.user-card-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-card-id {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.user-card-contact {
    font-size: 13px;
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-card-contact i {
    width: 16px;
    color: var(--primary);
}

.user-card-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.user-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.user-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.user-card-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-card-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 4px;
}

.user-card-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.user-card-stat:last-child {
    border-bottom: none;
}

.user-card-stat-label {
    font-size: 13px;
    color: var(--text-light);
}

.user-card-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.user-card-stat-value.success {
    color: var(--success);
}

.user-card-stat-value.danger {
    color: var(--danger);
}

.user-card-stat-value.warning {
    color: var(--warning);
}

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

.user-card-activity {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

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

.user-card-action-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary);
    color: white;
}

.user-card-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.user-card-action-btn i {
    font-size: 12px;
}

/* Compact Filters */
.users-filters {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.filters-row-compact {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.filter-group i {
    color: var(--text-light);
    font-size: 14px;
}

.input-compact {
    min-width: 200px;
    padding: 10px 12px;
    font-size: 13px;
}

.filter-select-compact {
    min-width: 140px;
    padding: 10px 12px;
    font-size: 13px;
}

.btn-compact {
    padding: 10px 16px;
    font-size: 13px;
}

/* Loading State */
#users-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-light);
}

#users-loading i {
    font-size: 24px;
    margin-right: 12px;
}

/* Empty State */
.users-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.users-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--border);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--border);
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 8px 0;
    color: var(--text);
    font-size: 18px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .users-cards-container {
        grid-template-columns: 1fr;
    }
    
    .filters-row-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .input-compact,
    .filter-select-compact {
        width: 100%;
        min-width: auto;
    }
    
    .user-card-body {
        grid-template-columns: 1fr;
    }
    
    .user-details-content {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .user-profile-header {
        padding: 20px;
        border-radius: 0;
    }
    
    .user-profile-header h2 {
        font-size: 22px;
    }
    
    .user-profile-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .user-profile-actions .btn {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .player-profile-tabs .tabs-header {
        padding: 0 16px;
        overflow-x: auto;
    }
    
    .player-profile-tabs .tab-button {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .player-profile-tabs .tabs-content {
        padding: 20px;
    }
    
    .user-stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

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

/* Prevent horizontal overflow on all tables */
.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.table thead {
    background: var(--light);
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.table tbody tr:hover {
    background: rgba(102, 126, 234, 0.06);
}

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

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

.loading {
    text-align: center;
    padding: 40px !important;
    color: var(--text-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 20px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination .page-number {
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.pagination .page-number.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Sync Section */
.sync-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.sync-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.sync-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.help-text {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-light);
}

textarea.input {
    resize: vertical;
    min-height: 44px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .sync-form-grid {
        grid-template-columns: 1fr;
    }
}

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

.sync-btn {
    background: var(--light);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text);
}

.sync-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.sync-btn i {
    font-size: 28px;
}

.sync-status {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
}

.sync-status.loading {
    background: #fef3c7;
    color: #92400e;
}

.sync-status.success {
    background: #d1fae5;
    color: #065f46;
}

.sync-status.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Database Information */
.database-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.db-info-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.db-info-card h4 {
    margin: 0 0 15px 0;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.db-info-card h4 i {
    color: var(--primary);
}

.db-info-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.db-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

/* Rules toolbars (Ledger + Detection) */
.rules-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.rules-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.rules-stat {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.rules-stat .label {
    font-size: 12px;
    color: var(--text-light);
}

.rules-stat .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.rules-filters {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 10px;
}

@media (max-width: 1024px) {
    .rules-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .rules-filters {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .rules-filters {
        grid-template-columns: 1fr;
    }
}

.db-info-item:last-child {
    border-bottom: none;
}

.db-info-label {
    font-weight: 600;
    color: var(--text-light);
}

.db-info-value {
    color: var(--text);
    font-family: 'Courier New', monospace;
}

/* Database Management */
.db-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.db-action-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

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

.db-action-card h4 {
    margin: 0 0 10px 0;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.db-action-card h4 i {
    color: var(--primary);
}

.db-action-card p {
    margin: 10px 0 15px 0;
    color: var(--text-light);
    font-size: 0.9em;
}

.db-action-card .btn {
    width: 100%;
}

/* Database Statistics Modal */
#db-stats-modal {
    z-index: 10000;
}

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

.db-stat-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.db-stat-card h4 {
    margin: 0 0 10px 0;
    color: var(--text-light);
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.db-stat-card h4 i {
    color: var(--primary);
}

.db-stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: var(--primary);
}

/* Utility */
.modified-row {
    background: #fef3c7 !important;
}

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 1024px) {
    /* Main Content - Păstrăm margin-left pentru sidebar */
    .main-content {
        margin-left: 260px;
        max-width: calc(100vw - 260px);
        width: calc(100vw - 260px);
    }
    
    /* Asigură că toate paginile respectă margin-left-ul pe laptop */
    [id$="-page"] {
        width: 100%;
        max-width: 100%;
    }
    
    [id$="-page"] .page {
        width: 100%;
        max-width: 100%;
    }
    
    .dashboard-charts-grid,
    .financial-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .financial-details-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .financial-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Ensure no horizontal overflow */
    .page {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
    }
    
    .table-wrapper {
        overflow-x: auto;
        width: 100%;
        max-width: 100%;
    }
    
    /* Optimize filters */
    .filters-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .filters-row .input,
    .filters-row .select {
        flex: 1 1 auto;
        min-width: 150px;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        z-index: 1000;
        height: 100vh;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px 0;
    }
    
    .top-bar-right {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .global-search-container {
        width: 100%;
        margin-right: 0;
    }
    
    .global-search-input {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .financial-kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-charts-grid,
    .financial-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }
    
    .table {
        width: 100%;
        table-layout: auto;
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* Prevent horizontal scroll on all pages */
    .page {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
    }
    
    .card {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
    }
    
    .filters-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters-row .input,
    .filters-row .select {
        width: 100%;
        max-width: 100%;
    }
    
    .date-range-picker,
    .amount-range-filter {
        width: 100%;
        max-width: 100%;
    }
    
    .amount-range-filter {
        flex-direction: column;
        gap: 10px;
    }
    
    .amount-range-filter span {
        display: none;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .user-details-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        height: 100vh;
        max-height: 100vh;
    }
    
    .tabs-header {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-button {
        padding: 8px 12px;
        font-size: 0.85em;
    }
    
    .report-templates-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .user-profile-actions {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .user-profile-actions .btn {
        font-size: 0.8em;
        padding: 6px 10px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .table-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .table-toolbar-left,
    .table-toolbar-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .financial-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .alert-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .alert-filters .select-sm {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .top-bar-left h1 {
        font-size: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.9em;
        width: 100%;
    }
    
    .btn-sm {
        padding: 6px 10px;
        font-size: 0.8em;
    }
    
    .modal-content {
        padding: 15px;
        width: 98% !important;
        max-width: 98% !important;
        margin: 10px auto;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
    }
    
    .page-header h2 {
        font-size: 1.3em;
    }
    
    .kpi-value {
        font-size: 1.2em;
    }
    
    .chart-container {
        height: 250px !important;
    }
    
    .table {
        font-size: 11px;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    /* Stack all buttons vertically on very small screens */
    .page-header-actions,
    .card-header-actions {
        flex-direction: column;
    }
    
    .page-header-actions .btn,
    .card-header-actions .btn {
        width: 100%;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-item,
    .tab-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .row-checkbox,
    .select-all-checkbox {
        width: 24px;
        height: 24px;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
    }
    
    .alert-item {
        padding: 20px;
    }
    
    .modal-actions-footer .btn {
        min-width: 100px;
    }
}

/* Only hide text labels on very small screens - REMOVED margin-left conflict */
/* Această regulă a fost eliminată pentru a preveni conflictul cu regula de la 768px */
/* Sidebar-ul pe mobile (< 768px) este complet ascuns, deci margin-left trebuie să fie 0 */


/* Modal Styles */
/* Fraud Alert Details Modal - Always at top and centered */
#fraud-alert-details-modal {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
    padding-top: 2vh !important;
    padding-bottom: 2vh !important;
    top: 0 !important;
    left: 0 !important;
    position: fixed !important;
    overflow-y: auto !important;
}

#fraud-alert-details-modal .modal-content {
    margin-top: 2vh !important;
    margin-bottom: 2vh !important;
    max-height: 96vh !important;
    overflow-y: auto !important;
    position: relative !important;
}

/* User Details Modal */
.user-details-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.user-details-content {
    background-color: #1e293b;
    margin: 2% auto;
    border-radius: 16px;
    width: 95%;
    max-width: 1600px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

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

.user-profile-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
}

.user-profile-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.user-profile-header > div {
    position: relative;
    z-index: 1;
}

.user-profile-header h2 {
    margin: 0 0 8px 0;
    color: white;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-profile-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 15px;
    font-weight: 400;
}

.user-profile-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.user-profile-actions .btn {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(10px);
}

.user-profile-actions .btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-profile-actions .btn.btn-warning {
    background: rgba(245, 158, 11, 0.9);
    border-color: rgba(245, 158, 11, 0.5);
}

.user-profile-actions .btn.btn-danger {
    background: rgba(239, 68, 68, 0.9);
    border-color: rgba(239, 68, 68, 0.5);
}

.user-profile-header .close {
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.1);
    margin-left: 12px;
}

/* Professional Overview Cards */
.overview-card-group {
    margin-bottom: 24px;
}

.overview-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
}

.overview-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.overview-card-header {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e5e7eb;
}

.overview-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-right: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.overview-card-title-group {
    flex: 1;
}

.overview-card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: -0.3px;
}

.overview-card-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
}

.overview-card-body {
    padding: 24px;
}

/* Wallet Balance Card */
.wallet-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.wallet-card .overview-card-header {
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.wallet-card .overview-card-title,
.wallet-card .overview-card-subtitle {
    color: white;
}

.wallet-balance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.wallet-balance-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.wallet-balance-item:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.wallet-balance-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 12px;
}

.wallet-balance-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stat-item.warning {
    background: #fef3c7;
    border-color: #fbbf24;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

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

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.stat-amount {
    font-size: 14px;
    font-weight: 600;
    margin-top: 4px;
}

/* Professional Modal Styles */
/* Professional Modal Styles - Applied to all modals */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background-color: #1e293b;
    margin: 2% auto;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

/* Large modals (like bet details, user details) */
.modal-content[style*="max-width: 1200px"],
.modal-content[style*="max-width: 1400px"],
.modal-content[style*="max-width: 1600px"] {
    max-width: 95%;
    width: 95%;
}

.modal-header {
    padding: 24px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.modal-header h2,
.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    z-index: 1;
}

.modal-header .close,
.modal-close,
.close-btn {
    color: white;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    border: none;
    padding: 0;
}

.modal-header .close:hover,
.modal-close:hover,
.close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.modal-body {
    padding: 32px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    background: var(--modal-body-bg, #1e293b);
    color: var(--modal-body-color, #e2e8f0);
}

.modal-actions-footer {
    padding: 20px 32px;
    background: var(--modal-footer-bg, #f9fafb);
    border-top: 1px solid var(--modal-footer-border, #e5e7eb);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-radius: 0 0 16px 16px;
}

.modal-actions-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-actions-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-footer {
    padding: 20px 32px;
    background: var(--modal-footer-bg, #f9fafb);
    border-top: 1px solid var(--modal-footer-border, #e5e7eb);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-radius: 0 0 16px 16px;
}

.modal-footer .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Player Profile Tabs */
.player-profile-tabs {
    margin-top: 0;
}

.tabs-header {
    display: flex;
    gap: 8px;
    padding: 0 32px;
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
    scrollbar-width: thin;
}

.tab-button {
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.tab-button:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tabs-content {
    padding: 32px;
    min-height: 400px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.user-profile-header .close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Responsive Design for Overview Cards */
@media (max-width: 768px) {
    .wallet-balance-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .overview-card-icon {
        margin-bottom: 12px;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .tabs-header {
        padding: 0 16px;
        overflow-x: auto;
    }
    
    .tab-button {
        padding: 12px 16px;
        font-size: 13px;
    }
}

#user-details-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    background: #f8fafc;
}

/* Irregularity Details Styles */
.irregularity-details-container {
    padding: 20px;
}

.detail-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.detail-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

/* Bet Details & modals: no white/light background – text must be visible */
.modal .detail-section,
#bet-details-modal .detail-section {
    background: rgba(15, 23, 42, 0.6) !important;
    border-left-color: rgba(124, 58, 237, 0.6) !important;
}
.modal .detail-section h3,
#bet-details-modal .detail-section h3 {
    color: #e2e8f0 !important;
    border-bottom-color: rgba(148, 163, 184, 0.3) !important;
}
.modal .tab-pane,
#bet-details-modal .tab-pane {
    background: transparent !important;
}
#user-details-body {
    background: #1e293b !important;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

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

.detail-item label {
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.detail-item span {
    color: #333;
    font-size: 1em;
}

pre.detail-json {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: hidden;
}

/* Alert details modal surfaces (must respect active theme) */
.alert-details-surface {
    background: var(--alert-detail-surface-bg, #f9fafb) !important;
    color: var(--alert-detail-surface-text, #111827) !important;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
}

.alert-details-json {
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    max-height: 300px;
    overflow-y: auto;
}

/* Modal: dark body so text must be light */
.modal .detail-item label { color: #94a3b8 !important; }
.modal .detail-item span { color: #e2e8f0 !important; }
.modal .detail-section h3,
.modal .tab-pane h3 { color: #e2e8f0 !important; }
.modal .tabs-container,
.modal .tabs-container .tabs { background: #0f172a !important; border-bottom-color: rgba(148,163,184,0.2) !important; }
.modal .tab-btn,
.modal .tab-button { color: #cbd5e1 !important; }
.modal .tab-btn.active,
.modal .tab-button.active { color: #f1f5f9 !important; border-bottom-color: #7c3aed !important; }
.modal-footer .btn-secondary,
.modal-actions-footer .btn-secondary { background: rgba(148,163,184,0.2) !important; color: #f1f5f9 !important; border-color: rgba(148,163,184,0.3) !important; }
.modal .badge.badge-warning { background: rgba(251,191,36,0.35) !important; color: #1e293b !important; }
.modal .overview-card { background: rgba(15,23,42,0.7) !important; border-color: rgba(148,163,184,0.2) !important; }
.modal .overview-card-header { background: rgba(15,23,42,0.5) !important; }
.modal .overview-card-title,
.modal .overview-card-subtitle { color: #e2e8f0 !important; }
.modal .stat-label { color: #94a3b8 !important; }
.modal .stat-value,
.modal .stat-amount { color: #e2e8f0 !important; }

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-marker {
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #007bff;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-marker.modification {
    background: #dc3545;
}

.timeline-marker.version {
    background: #28a745;
}

.timeline-content {
    background: #fff;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-date {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.timeline-details {
    color: #666;
    font-size: 0.9em;
}

/* Tabs */
.tabs-container {
    width: 100%;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    gap: 0;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.2s;
    position: relative;
    bottom: -2px;
}

.tab-button:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tabs-content {
    position: relative;
    min-height: 200px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-pane.active {
    display: block;
}

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

/* Sync Communication Widget Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes pulse-strong {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(16, 185, 129, 0.5); }
    50% { box-shadow: 0 0 20px rgba(16, 185, 129, 0.8); }
}

@keyframes glow-error {
    0%, 100% { box-shadow: 0 0 5px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8); }
}

@keyframes glow-warning {
    0%, 100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.8); }
}

/* Sync Communication Widget Styles */
#sync-communication-widget {
    position: relative;
    border-left: 4px solid #ddd;
    transition: all 0.3s ease;
}

#sync-communication-widget.status-active {
    border-left-color: var(--success);
    animation: glow 2s ease-in-out infinite;
}

#sync-communication-widget.status-slow {
    border-left-color: var(--warning);
    animation: glow-warning 2s ease-in-out infinite;
}

#sync-communication-widget.status-warning {
    border-left-color: var(--warning);
    animation: pulse 2s ease-in-out infinite;
}

#sync-communication-widget.status-error {
    border-left-color: var(--danger);
    animation: glow-error 2s ease-in-out infinite, shake 0.5s ease-in-out;
}

#sync-communication-widget.status-checking {
    border-left-color: #94a3b8;
}

#sync-communication-icon {
    transition: all 0.3s ease;
}

#sync-communication-icon.status-active {
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

#sync-communication-icon.status-slow {
    background: var(--warning);
    animation: pulse 2s ease-in-out infinite;
}

#sync-communication-icon.status-warning {
    background: var(--warning);
    animation: pulse-strong 1.5s ease-in-out infinite;
}

#sync-communication-icon.status-error {
    background: var(--danger);
    animation: pulse-strong 1s ease-in-out infinite;
}

#sync-communication-icon.status-checking {
    background: #94a3b8;
}

#sync-communication-icon.status-checking i {
    animation: rotate 1s linear infinite;
}

#sync-communication-status {
    transition: color 0.3s ease;
}

#sync-communication-status.status-active {
    color: var(--success);
}

#sync-communication-status.status-slow {
    color: var(--warning);
}

#sync-communication-status.status-warning {
    color: var(--warning);
}

#sync-communication-status.status-error {
    color: var(--danger);
    font-weight: 700;
}

#sync-communication-status.status-checking {
    color: #94a3b8;
}

/* System Health Grid */
.system-health-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.health-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85em;
    color: var(--text-light);
}

.health-item i {
    width: 16px;
    text-align: center;
    font-size: 0.9em;
}

.health-item .status-ok {
    color: var(--success);
}

.health-item .status-warning {
    color: var(--warning);
}

.health-item .status-error {
    color: var(--danger);
}

.health-item .status-checking {
    color: #94a3b8;
    animation: pulse 1.5s ease-in-out infinite;
}

.health-item span.status-ok {
    color: var(--success);
    font-weight: 500;
}

.health-item span.status-warning {
    color: var(--warning);
    font-weight: 500;
}

.health-item span.status-error {
    color: var(--danger);
    font-weight: 600;
}

.health-item span.status-checking {
    color: #94a3b8;
}

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

.modal-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.text-mono {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-mono {
    font-family: 'Courier New', monospace;
}

/* Enhanced Tables */
.table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.table-toolbar-left,
.table-toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.selected-count {
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.875em;
    font-weight: 500;
}

.table th.sortable {
    user-select: none;
    position: relative;
    padding-right: 24px;
}

.table th.sortable i {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75em;
    color: var(--text-light);
    opacity: 0.5;
}

.table th.sortable:hover i {
    opacity: 1;
}

.table th.sortable[data-sort="asc"] i,
.table th.sortable[data-sort="desc"] i {
    opacity: 1;
    color: var(--primary);
}

.table th.sortable[data-sort="asc"] i {
    color: var(--primary);
}

.table th.sortable[data-sort="desc"] i {
    color: var(--primary);
}

.row-checkbox,
.select-all-checkbox {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.table-wrapper {
    overflow-x: auto;
    max-width: 100%;
}

/* Enhanced Dashboard */
.enhanced-kpi {
    position: relative;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.85em;
}

.trend-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75em;
}

.trend-indicator.trend-up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.trend-indicator.trend-down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.trend-indicator.trend-neutral {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-light);
}

.trend-value {
    font-weight: 600;
    color: var(--text);
}

.trend-period {
    color: var(--text-light);
    font-size: 0.8em;
}

.trend-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    margin-left: 8px;
}

.trend-badge.trend-up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.trend-badge.trend-down {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.trend-badge.trend-neutral {
    background: rgba(100, 116, 139, 0.1);
    color: var(--text-light);
}

.dashboard-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

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

.card-header h3 {
    margin: 0;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.select-sm {
    padding: 6px 12px;
    font-size: 0.875em;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
}

.chart-container {
    position: relative;
    width: 100%;
}

/* Global Search */
.global-search-container {
    position: relative;
    margin-right: 15px;
}

.global-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.global-search-input {
    width: 300px;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9em;
    background: white;
}

.global-search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    pointer-events: none;
}

.global-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.global-search-results-header {
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    background: #f8f9fa;
}

.search-result-section {
    padding: 8px 0;
}

.search-result-section strong {
    display: block;
    padding: 8px 16px;
    font-size: 0.85em;
    color: var(--text-light);
    text-transform: uppercase;
}

.search-result-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item i {
    color: var(--primary);
    width: 20px;
}

/* Enhanced Filters */
.date-range-picker {
    position: relative;
    display: inline-block;
}

.date-range-input {
    padding-right: 36px;
    cursor: pointer;
}

.date-range-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
}

.amount-range-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.amount-range-filter .input-sm {
    width: 100px;
    padding: 6px 10px;
}

.amount-range-filter span {
    color: var(--text-light);
}

.input-sm {
    font-size: 0.875em;
    padding: 6px 10px;
}

/* Financial Dashboard */
.financial-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

.financial-kpi-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 4px solid var(--primary);
}

.financial-kpi-card.revenue {
    border-left-color: var(--success);
}

.financial-kpi-card.payouts {
    border-left-color: var(--danger);
}

.financial-kpi-card.profit {
    border-left-color: var(--primary);
}

.financial-kpi-card.margin {
    border-left-color: var(--warning);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.financial-kpi-card.revenue .kpi-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.financial-kpi-card.payouts .kpi-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.financial-kpi-card.profit .kpi-icon {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.financial-kpi-card.margin .kpi-icon {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.kpi-content {
    flex: 1;
}

.kpi-label {
    font-size: 0.85em;
    color: var(--text-light);
    margin-bottom: 5px;
}

.kpi-value {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 5px;
}

.kpi-change {
    font-size: 0.8em;
    color: var(--text-light);
}

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

.financial-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.financial-details-table {
    padding: 10px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row.highlight {
    background: rgba(102, 126, 234, 0.05);
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    font-weight: 600;
}

.detail-label {
    color: var(--text-light);
}

.detail-value {
    font-weight: 600;
    color: var(--text);
}

/* Enhanced Player Profile */
.user-profile-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.player-profile-tabs {
    width: 100%;
    background: white;
}

.player-profile-tabs .tabs-header {
    border-bottom: 2px solid var(--border);
    margin: 0;
    padding: 0 32px;
    background: white;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.player-profile-tabs .tabs-header::-webkit-scrollbar {
    height: 4px;
}

.player-profile-tabs .tabs-header::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.player-profile-tabs .tab-button {
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    position: relative;
    margin-bottom: -2px;
}

.player-profile-tabs .tab-button:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.player-profile-tabs .tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.player-profile-tabs .tab-button .badge {
    margin-left: 8px;
    font-size: 11px;
    padding: 2px 6px;
}

.player-profile-tabs .tabs-content {
    min-height: 400px;
    padding: 32px;
}

.player-profile-tabs .tab-pane {
    display: none;
    animation: fadeInTab 0.3s ease;
}

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

.player-profile-tabs .tab-pane.active {
    display: block;
}

.communication-history {
    padding: 20px 0;
}

.communication-item {
    padding: 15px;
    border-left: 3px solid var(--primary);
    background: #f8f9fa;
    margin-bottom: 15px;
    border-radius: 4px;
}

.communication-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.communication-item-method {
    font-weight: 600;
    color: var(--primary);
}

.communication-item-date {
    font-size: 0.85em;
    color: var(--text-light);
}

.communication-item-message {
    color: var(--text);
    margin-top: 8px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group .input,
.form-group .select {
    width: 100%;
}

.modal-actions-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* Reports Page */
.reports-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

/* Quick Reports Grid */
.quick-reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    width: 100%;
}

.quick-report-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.quick-report-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #667eea;
}

.quick-report-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.quick-report-card-body h4 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #1e293b;
    font-size: 16px;
    font-weight: 600;
}

.quick-report-card-body p {
    color: #666;
    font-size: 14px;
    margin-bottom: 16px;
    flex: 1;
}

/* Date Range Inputs in Quick Reports */
.quick-report-date-range {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    width: 100%;
}

.quick-report-date-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    color: #1e293b;
    box-sizing: border-box;
    min-width: 0;
    flex: 1;
}

.quick-report-date-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.quick-report-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 4px;
    margin-left: 4px;
}

/* Responsive adjustments for Quick Reports */
@media (max-width: 1200px) {
    .quick-reports-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .quick-reports-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .quick-report-card {
        min-height: auto;
    }
    
    .quick-report-date-range {
        flex-direction: column;
    }
}

.report-template-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.report-template-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.report-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.report-template-card h4 {
    margin: 10px 0;
    color: var(--text);
}

.report-template-card p {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.report-builder-form {
    padding: 20px 0;
}

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

.form-row:last-child {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

/* Alert Management */
.alerts-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.alert-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.alerts-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px 0;
}

.alert-item {
    padding: 15px;
    border-left: 4px solid var(--primary);
    background: white;
    margin-bottom: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow);
}

.alert-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.alert-item.alert-priority-critical {
    border-left-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.alert-item.alert-priority-high {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.alert-item.alert-priority-medium {
    border-left-color: var(--primary);
}

.alert-item.alert-priority-low {
    border-left-color: var(--text-light);
}

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

.alert-item-title {
    font-weight: 600;
    color: var(--text);
    font-size: 1.05em;
}

.alert-item-priority {
    display: flex;
    gap: 8px;
}

.alert-item-message {
    color: var(--text);
    margin-bottom: 8px;
}

.alert-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    color: var(--text-light);
    margin-top: 8px;
}

.alert-item-user {
    margin-left: 15px;
}

.rule-conditions {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.rule-conditions h4 {
    margin-bottom: 15px;
    color: var(--text);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 0.75em;
}

/* User Preferences */
.preferences-tabs {
    width: 100%;
}

.theme-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.theme-option {
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
}

.theme-option:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.theme-preview {
    width: 100%;
    height: 80px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 2px solid var(--border);
}

.theme-preview.light-theme {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
}

.theme-preview.dark-theme {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.theme-preview.auto-theme {
    background: linear-gradient(135deg, #ffffff 0%, #1e293b 100%);
}

.theme-preview.crm-theme {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 50%, #1f2937 100%);
    position: relative;
    overflow: hidden;
}

.theme-preview.crm-theme::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.theme-preview.crm-theme::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: #1f2937;
}

.theme-preview.modern-theme {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
}

.theme-preview.modern-theme::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.8) 0%, rgba(118, 75, 162, 0.8) 100%);
}

/* Theme Support */
body.theme-dark {
    --light: #1e293b;
    --text: #e2e8f0;
    --text-light: #94a3b8;
    --border: #334155;
    --sidebar-bg: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

body.theme-dark .card {
    background: #1e293b;
    color: #e2e8f0;
}

/* Professional CRM Theme Enhancements */
body.theme-crm .stat-card.enhanced-kpi {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.theme-crm .stat-card.enhanced-kpi:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

body.theme-crm .stat-icon {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.theme-crm .card {
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

body.theme-crm .card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.theme-crm .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

body.theme-crm .btn-primary:hover {
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

body.theme-crm .integrity-card {
    border-left: 4px solid #2563eb;
}

body.theme-crm .integrity-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

body.theme-crm .top-bar {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Modern Gradient Theme (Default) - Uses default :root variables */
/* No additional styles needed for theme-modern - it uses :root variables */

body.theme-dark .table {
    background: #1e293b;
    color: #e2e8f0;
}

body.theme-dark .table th {
    background: #0f172a;
    color: #e2e8f0;
}

body.theme-dark .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}

/* Analytics Page */
.analytics-section {
    width: 100%;
}

.analytics-controls {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

.analytics-metric {
    text-align: center;
    padding: 20px;
}

.metric-value {
    font-size: 2.5em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.metric-label {
    font-size: 0.9em;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Fraud Detection Styles */
.integrity-status {
    padding: 20px;
}

/* Statistics Cards */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* Quick Actions */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 20px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.quick-action-btn:hover {
    border-color: var(--primary);
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.quick-action-btn i {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 10px;
}

.quick-action-btn span:not(.badge) {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9em;
}

.quick-action-btn .badge {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Recent Activity Feed */
.recent-activity-feed {
    padding: 15px;
}

.activity-feed-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s;
}

.activity-feed-item:hover {
    background: #f8f9fa;
}

.activity-feed-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

.activity-description {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 5px;
}

.activity-time {
    font-size: 0.85em;
    color: var(--text-light);
}

/* Recent Modifications List */
.recent-modifications-list {
    padding: 15px;
}

.modification-item {
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    background: white;
    transition: all 0.3s;
}

.modification-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: var(--warning);
}

.modification-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.modification-id {
    font-weight: 600;
    color: var(--text);
}

.modification-time {
    font-size: 0.85em;
    color: var(--text-light);
    margin-left: auto;
}

.modification-details {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.modification-amounts {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modification-amounts .amount {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

.modification-amounts .amount.original {
    background: #fee2e2;
    color: #991b1b;
}

.modification-amounts .amount.new {
    background: #dcfce7;
    color: #166534;
}

.modification-change {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

.modification-change.positive {
    background: #dcfce7;
    color: #166534;
}

.modification-change.negative {
    background: #fee2e2;
    color: #991b1b;
}

.modification-actions {
    display: flex;
    gap: 10px;
}

/* Stat Icon Colors */
.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.stat-icon.teal {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.stat-icon.cyan {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.stat-icon.indigo {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #ddd;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}

.integrity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.integrity-item {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

.integrity-label {
    font-size: 0.9em;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.integrity-value {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text);
}

.fraud-filters, .event-filters, .chain-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.fraud-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Fraud Alert Grouped Cards */
.fraud-alerts-grouped {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fraud-alert-group-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
}

.fraud-alert-group-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.fraud-alert-group-card.critical {
    border-left: 4px solid #dc3545;
}

.fraud-alert-group-card.high {
    border-left: 4px solid #fd7e14;
}

.fraud-alert-group-card.medium {
    border-left: 4px solid #ffc107;
}

.fraud-alert-group-card.resolved {
    opacity: 0.7;
    background: #f8f9fa;
}

.fraud-alert-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.fraud-alert-group-title h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.fraud-alert-group-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.fraud-alert-group-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.entity-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.entity-label {
    font-weight: 600;
    color: #666;
    min-width: 120px;
}

.entity-phone {
    color: #888;
    font-size: 0.9em;
}

.fraud-alert-group-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.alert-summary-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.alert-summary-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-summary-list li:last-child {
    border-bottom: none;
}

.fraud-alert-card {
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--border);
    background: white;
    box-shadow: var(--shadow);
}

.fraud-alert-card.critical {
    border-left-color: var(--danger);
    background: #fef2f2;
}

.fraud-alert-card.high {
    border-left-color: var(--warning);
    background: #fffbeb;
}

.fraud-alert-card.medium {
    border-left-color: #3b82f6;
    background: #eff6ff;
}

.fraud-alert-card.low {
    border-left-color: var(--success);
    background: #f0fdf4;
}

.fraud-alert-card.resolved {
    opacity: 0.7;
}

.fraud-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.fraud-alert-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fraud-alert-actions {
    display: flex;
    gap: 10px;
}

.fraud-alert-body {
    margin-top: 10px;
}

.fraud-alert-meta {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.9em;
    color: var(--text-light);
}

.event-timeline {
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
}

.event-timeline-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
}

.event-timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 30px;
    bottom: -20px;
    width: 2px;
    background: var(--border);
}

.event-timeline-marker {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.event-timeline-content {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.event-timeline-header {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.event-type {
    font-weight: 600;
    color: var(--primary);
}

.event-id {
    color: var(--text-light);
    font-size: 0.9em;
}

.event-time {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.85em;
}

.event-payload {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.event-payload-item {
    font-size: 0.9em;
}

.event-hash {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-family: monospace;
    font-size: 0.85em;
}

.hash-chain {
    padding: 20px;
}

.hash-chain-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.hash-chain-item {
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.hash-chain-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.event-type-badge {
    padding: 4px 8px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 0.85em;
}

.hash-chain-hash {
    display: flex;
    gap: 10px;
    align-items: center;
}

.hash-label {
    font-weight: 600;
    color: var(--text-light);
}

.hash-value {
    font-family: monospace;
    font-size: 0.9em;
    color: var(--text);
    word-break: break-all;
}

.hash-chain-arrow {
    text-align: center;
    color: var(--primary);
    font-size: 1.5em;
    margin: 10px 0;
}

/* Modification Details Cell */
.modification-details-cell {
    font-size: 0.85em;
    line-height: 1.4;
}

.mod-original {
    color: var(--text-light);
}

.mod-current {
    font-weight: 600;
    color: var(--text);
}

.mod-change {
    font-weight: 600;
    margin-top: 2px;
}

.mod-count {
    margin-top: 4px;
}

/* Fraud Alert Row Highlighting */
.fraud-alert-row {
    background-color: #fef2f2 !important;
}

.fraud-alert-row:hover {
    background-color: #fee2e2 !important;
}

/* Action Buttons in Bet Details */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.text-mono {
    font-family: 'Courier New', monospace;
}

/* Page Header with About Link */
.page-header-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.about-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s;
}

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

/* About Modal Content */
.about-section {
    margin-bottom: 30px;
}

.about-section h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.about-section h4 {
    color: var(--text);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.about-subsection {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid var(--primary);
}

.about-subsection ul {
    margin-top: 10px;
    margin-left: 20px;
}

.about-subsection li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.code-block {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--text);
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.security-item {
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
}

.security-item i {
    font-size: 2em;
    color: var(--primary);
    margin-bottom: 10px;
}

.security-item h4 {
    margin: 10px 0;
    color: var(--text);
}

.security-item p {
    font-size: 0.9em;
    color: var(--text-light);
    line-height: 1.5;
}

.tech-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.tech-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

/* Ledger Rules Page Styles */
.rules-stats-bar {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary);
}

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

.section-actions {
    display: flex;
    gap: 0.5rem;
}

.empty-config-state,
.empty-query-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    background: var(--bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
}

.empty-config-state i,
.empty-query-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
    display: block;
}

.empty-config-state p,
.empty-query-state p {
    margin: 0;
    font-style: italic;
}

.info-box {
    padding: 1rem;
    background: #e3f2fd;
    border-left: 4px solid var(--info);
    border-radius: 4px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.info-box i {
    color: var(--info);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.info-box p {
    margin: 0;
    color: var(--text);
    flex-wrap: wrap;
}

.stats-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.filter-controls select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
}

.rules-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.rules-type-section {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1.5rem;
}

.rules-type-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text);
}

.rules-type-header .badge {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.rule-card {
    background: var(--bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.rule-card.enabled {
    border-left: 4px solid var(--success);
}

.rule-card.disabled {
    border-left: 4px solid var(--text-secondary);
    opacity: 0.7;
}

.rule-card.priority-critical {
    border-top: 3px solid var(--danger);
}

.rule-card.priority-high {
    border-top: 3px solid var(--warning);
}

.rule-card.priority-medium {
    border-top: 3px solid var(--info);
}

.rule-card.priority-low {
    border-top: 3px solid var(--text-secondary);
}

.rule-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.rule-title-section {
    flex: 1;
}

.rule-title-section h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.1rem;
}

.rule-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.rule-badge.priority-critical {
    background: var(--danger);
    color: white;
}

.rule-badge.priority-high {
    background: var(--warning);
    color: white;
}

.rule-badge.priority-medium {
    background: var(--info);
    color: white;
}

.rule-badge.priority-low {
    background: var(--text-secondary);
    color: white;
}

.rule-badge.status-enabled {
    background: var(--success);
    color: white;
}

.rule-badge.status-disabled {
    background: var(--text-secondary);
    color: white;
}

.rule-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text);
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--card-bg);
    border-color: var(--primary);
    color: var(--primary);
}

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

.rule-card-body {
    margin-bottom: 1rem;
}

.rule-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.rule-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.rule-config-preview {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.rule-config-preview pre {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.rule-card-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 1rem 0 0.5rem 0;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

#rule-config-fields, #rule-conditions-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
}

.form-help-text {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-left: 3px solid var(--primary);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

#rule-config-section h4,
#rule-conditions-section h4 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#rule-config-fields select[multiple],
#rule-conditions-fields select[multiple] {
    min-height: 120px;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg);
    color: var(--text);
}

#rule-config-fields select[multiple]:focus,
#rule-conditions-fields select[multiple]:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .rules-stats-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-controls {
        margin-left: 0;
        width: 100%;
    }
    
    .filter-controls select {
        flex: 1;
    }
}


.dedup-settings-grid, .monitoring-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

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

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

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

.form-group input[type='number'], .form-group input[type='text'] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type='checkbox'] {
    margin-right: 8px;
}

#archive-status, #vacuum-status, #monitor-status, #dedup-save-status, #monitor-save-status {
    min-height: 20px;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
}


/* Sync Settings Tabs */
.sync-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.sync-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sync-tab:hover {
    color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.sync-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: rgba(102, 126, 234, 0.1);
}

.sync-tab-content {
    display: none;
}

.sync-tab-content.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Detection Rules Status Indicators */
.status-running {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
    font-weight: 600;
}

.status-recent {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.status-old {
    background-color: rgba(156, 163, 175, 0.1);
    color: #6b7280;
}

.status-due {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
    font-weight: 600;
}

.status-overdue {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    font-weight: 600;
}

.status-scheduled {
    background-color: rgba(102, 126, 234, 0.1);
    color: #5568d3;
}

.sync-tab i {
    font-size: 16px;
}

/* Integrity System Widgets - Professional Design */
.integrity-card {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.integrity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.integrity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    animation: pulse 2s infinite;
}

.status-indicator.status-active {
    background-color: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-indicator.status-stopped {
    background-color: var(--danger);
    animation: none;
}

.status-indicator.status-warning {
    background-color: var(--warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* Pattern Detection Cards */
.pattern-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pattern-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Investigation Case Items */
.investigation-case-item:hover {
    background: #f0f0f0 !important;
}

/* Toggle Switch for Automated Actions */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #10b981;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.workers-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.worker-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.worker-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.integrity-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px;
}

.integrity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.integrity-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.integrity-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.integrity-icon.wallet {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.integrity-icon.odds {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.integrity-icon.rules {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.integrity-icon.workers {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

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

.integrity-label {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin-bottom: 4px;
    font-weight: 500;
}

.integrity-value {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.integrity-detail {
    font-size: 0.8em;
    color: var(--text-secondary);
    line-height: 1.4;
}

.recent-fraud-alerts {
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.fraud-alert-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.fraud-alert-item:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.fraud-alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.fraud-alert-type {
    font-size: 0.85em;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.fraud-alert-message {
    font-size: 0.9em;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.fraud-alert-time {
    font-size: 0.75em;
    color: var(--text-secondary);
}

/* Responsive adjustments for integrity widgets */
@media (max-width: 768px) {
    .integrity-overview-grid {
        grid-template-columns: 1fr;
    }
    
    .workers-status-grid {
        grid-template-columns: 1fr;
    }
    
    .integrity-item {
        padding: 12px;
    }
    
    .integrity-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* Detection Rules Page - Fit to Page - No Horizontal Scroll */
/* Detection Rules Page - Reorganized Layout */
#detection-rules-page {
    padding: 24px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

#detection-rules-page .page-header {
    margin-bottom: 32px;
}

#detection-rules-page .page-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

#detection-rules-page .page-header p {
    font-size: 15px;
    color: #6c757d;
}

.detection-rules-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.detection-rules-header {
    padding: 24px 28px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.detection-rules-header-main {
    margin-bottom: 20px;
}

.detection-rules-header-main h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.detection-rules-filters-section {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.detection-rules-filters-section .filter-group {
    flex: 1;
    min-width: 200px;
}

.detection-rules-filters-section .search-input,
.detection-rules-filters-section .filter-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #ffffff;
}

.detection-rules-table-wrapper {
    padding: 0;
    overflow-x: auto;
}

.detection-rules-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.detection-rules-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.detection-rules-table thead th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.detection-rules-table tbody td {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    font-size: 14px;
    line-height: 1.6;
}

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

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

/* Rule Name Cell */
.rule-name-cell-detailed {
    min-width: 250px;
}

.rule-name-main {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.rule-name-main strong {
    font-size: 15px;
    font-weight: 600;
    color: #212529;
}

.rule-description-text {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 10px;
    line-height: 1.5;
}

.rule-meta-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.rule-id-badge {
    font-size: 12px;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
}

.rule-threshold-info {
    font-size: 12px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Priority Display */
.priority-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.priority-value {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
}

.priority-label {
    font-size: 12px;
    color: #6c757d;
}

/* Alert Type Display */
.alert-type-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.alert-type-display .badge {
    font-size: 13px;
    padding: 6px 12px;
}

.email-indicator {
    font-size: 12px;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 4px;
}

.severity-indicator {
    font-size: 12px;
    color: #6c757d;
}

/* Status Badge */
.status-badge-detection {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge-detection.status-enabled {
    background: #d4edda;
    color: #155724;
}

.status-badge-detection.status-disabled {
    background: #f8d7da;
    color: #721c24;
}

/* Schedule Display */
.schedule-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.schedule-interval {
    font-size: 13px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
}

.schedule-next {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.schedule-next.due-soon {
    color: #856404;
    font-weight: 500;
}

.schedule-next.overdue {
    color: #dc3545;
    font-weight: 500;
}

/* Last Run Display */
.last-run-display {
    font-size: 13px;
    color: #495057;
}

.last-run-display.recent {
    color: #28a745;
}

.last-run-display.old {
    color: #6c757d;
}

/* Table Actions */
.table-actions-detection {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-actions-detection .btn-icon {
    padding: 8px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.table-actions-detection .btn-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Badge Type Detection */
.badge-type-detection {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    background: #e7f3ff;
    color: #0066cc;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1200px) {
    .detection-rules-table {
        font-size: 13px;
    }
    
    .detection-rules-table thead th,
    .detection-rules-table tbody td {
        padding: 14px 16px;
    }
}

@media (max-width: 768px) {
    #detection-rules-page {
        padding: 16px;
    }
    
    .detection-rules-header {
        padding: 20px;
    }
    
    .detection-rules-filters-section {
        flex-direction: column;
    }
    
    .detection-rules-filters-section .filter-group {
        width: 100%;
    }
    
    .detection-rules-table {
        font-size: 12px;
    }
    
    .detection-rules-table thead th,
    .detection-rules-table tbody td {
        padding: 12px;
    }
}

#detection-rules-page {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

#detection-rules-page .page {
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
}

#detection-rules-page .card {
    overflow: hidden;
    max-width: 100%;
}

.detection-rules-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    max-width: 100%;
}

.search-input-compact {
    min-width: 140px;
    max-width: 180px;
    font-size: 0.875em;
    padding: 6px 10px;
    flex: 0 0 auto;
}

.filter-select-compact {
    min-width: 110px;
    max-width: 140px;
    font-size: 0.875em;
    padding: 6px 10px;
    flex: 0 0 auto;
}

.table-wrapper-responsive {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.rules-table-compact {
    width: 100%;
    table-layout: fixed;
    font-size: 0.875em;
    border-collapse: collapse;
}

.rules-table-compact th {
    padding: 10px 6px;
    font-size: 0.8em;
    white-space: nowrap;
    font-weight: 600;
    text-overflow: ellipsis;
    overflow: hidden;
}

.rules-table-compact td {
    padding: 10px 6px;
    font-size: 0.875em;
    vertical-align: top;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rules-table-compact td code {
    font-size: 0.8em;
    padding: 2px 5px;
    white-space: nowrap;
    max-width: 100%;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rules-table-compact .badge {
    font-size: 0.75em;
    padding: 3px 6px;
    white-space: nowrap;
    display: inline-block;
}

.rules-table-compact small {
    font-size: 0.7em;
    display: block;
    margin-top: 2px;
    line-height: 1.3;
}

.rules-table-compact .table-actions {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
    justify-content: center;
}

.rules-table-compact .btn-icon {
    padding: 4px 6px;
    font-size: 0.8em;
    min-width: 26px;
    width: 26px;
    height: 26px;
}

/* Optimize card header for detection rules */
#detection-rules-page .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px 20px;
    max-width: 100%;
}

#detection-rules-page .card-header h3 {
    margin: 0;
    font-size: 1.05em;
    flex: 1 1 auto;
    min-width: 180px;
    max-width: 100%;
}

#detection-rules-page .card-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex: 1 1 auto;
    justify-content: flex-end;
    max-width: 100%;
}

/* Column width optimization */
.rules-table-compact th:nth-child(1),
.rules-table-compact td:nth-child(1) {
    width: 50px; /* ID */
}

.rules-table-compact th:nth-child(2),
.rules-table-compact td:nth-child(2) {
    width: 180px; /* Rule Name */
    max-width: 180px;
}

.rules-table-compact th:nth-child(3),
.rules-table-compact td:nth-child(3) {
    width: 100px; /* Type */
}

.rules-table-compact th:nth-child(4),
.rules-table-compact td:nth-child(4) {
    width: 90px; /* Threshold */
}

.rules-table-compact th:nth-child(5),
.rules-table-compact td:nth-child(5) {
    width: 70px; /* Priority */
}

.rules-table-compact th:nth-child(6),
.rules-table-compact td:nth-child(6) {
    width: 100px; /* Alert Type */
}

.rules-table-compact th:nth-child(7),
.rules-table-compact td:nth-child(7) {
    width: 70px; /* Severity */
}

.rules-table-compact th:nth-child(8),
.rules-table-compact td:nth-child(8) {
    width: 80px; /* Status */
}

.rules-table-compact th:nth-child(9),
.rules-table-compact td:nth-child(9) {
    width: 80px; /* Interval */
}

.rules-table-compact th:nth-child(10),
.rules-table-compact td:nth-child(10) {
    width: 120px; /* Last Run */
}

.rules-table-compact th:nth-child(11),
.rules-table-compact td:nth-child(11) {
    width: 120px; /* Next Run */
}

.rules-table-compact th:nth-child(12),
.rules-table-compact td:nth-child(12) {
    width: 100px; /* Actions */
}

/* Responsive table for detection rules */
@media (max-width: 1600px) {
    .rules-table-compact {
        font-size: 0.85em;
    }
    
    .rules-table-compact th,
    .rules-table-compact td {
        padding: 8px 5px;
    }
}

@media (max-width: 1400px) {
    .rules-table-compact th:nth-child(4),
    .rules-table-compact td:nth-child(4) {
        display: none; /* Hide Threshold */
    }
    
    .rules-table-compact th:nth-child(5),
    .rules-table-compact td:nth-child(5) {
        display: none; /* Hide Priority */
    }
}

@media (max-width: 1200px) {
    .rules-table-compact th:nth-child(7),
    .rules-table-compact td:nth-child(7) {
        display: none; /* Hide Severity */
    }
    
    .detection-rules-filters {
        width: 100%;
    }
    
    .search-input-compact,
    .filter-select-compact {
        flex: 1;
        min-width: 120px;
        max-width: none;
    }
}

@media (max-width: 992px) {
    .rules-table-compact th:nth-child(9),
    .rules-table-compact td:nth-child(9) {
        display: none; /* Hide Interval */
    }
    
    #detection-rules-page .card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    #detection-rules-page .card-header-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .search-input-compact,
    .filter-select-compact {
        flex: 1;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .rules-table-compact {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .rules-table-compact thead,
    .rules-table-compact tbody,
    .rules-table-compact tr {
        display: block;
    }
    
    .rules-table-compact thead {
        display: none;
    }
    
    .rules-table-compact tr {
        margin-bottom: 15px;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 10px;
        background: var(--card-bg);
    }
    
    .rules-table-compact td {
        display: block;
        text-align: right;
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid var(--border);
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .rules-table-compact td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--text-light);
    }
    
    .rules-table-compact td:last-child {
        border-bottom: none;
    }
}

/* Bet Reporting Page - Fit to Page */
#bet-reporting-page {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 1;
}

#bet-reporting-page .page {
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
    position: relative;
    z-index: 1;
}

#bet-reporting-page .card,
#bet-reporting-page .table-section {
    overflow: hidden;
    max-width: 100%;
}

.bet-reporting-filters-grid {
    align-items: flex-start;
}

.bet-reporting-filters-grid > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bet-reporting-filters-grid label {
    margin-bottom: 0 !important;
}

.bet-reporting-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.amount-inputs {
    display: flex;
    gap: 8px;
}

.amount-inputs .input {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .bet-reporting-filters-grid .filters-amount,
    .bet-reporting-filters-grid .filters-flags,
    .bet-reporting-filters-grid .filters-actions {
        grid-column: 1 / -1;
    }
    .bet-reporting-filters-grid .filters-actions {
        align-items: flex-start;
    }
}

.table-wrapper-bet-reporting {
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.bet-reporting-table {
    width: 100%;
    table-layout: fixed;
    font-size: 13px;
    border-collapse: collapse;
}

.bet-reporting-table th {
    padding: 10px 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    vertical-align: middle;
}

.bet-reporting-table td {
    padding: 10px 6px;
    font-size: 13px;
    vertical-align: middle;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bet-reporting-table .badge {
    font-size: 11px;
    padding: 3px 6px;
    white-space: nowrap;
    display: inline-block;
}

.bet-reporting-table .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    min-width: 28px;
}

.bet-reporting-table .text-right {
    text-align: right;
}

/* Column width optimization for Bet Reporting */
.bet-reporting-table .col-checkbox {
    width: 40px;
    min-width: 40px;
}

.bet-reporting-table .col-type {
    width: 70px;
    min-width: 70px;
}

.bet-reporting-table .col-id {
    width: 60px;
    min-width: 60px;
}

.bet-reporting-table .col-bet-id {
    width: 100px;
    min-width: 100px;
}

.bet-reporting-table .col-reference {
    width: 90px;
    min-width: 90px;
}

.bet-reporting-table .col-player {
    width: 100px;
    min-width: 100px;
}

.bet-reporting-table .col-phone {
    width: 110px;
    min-width: 110px;
}

.bet-reporting-table .col-amount {
    width: 95px;
    min-width: 95px;
}

.bet-reporting-table .col-status {
    width: 80px;
    min-width: 80px;
}

.bet-reporting-table .col-share-code {
    width: 90px;
    min-width: 90px;
}

.bet-reporting-table .col-stake-type {
    width: 70px;
    min-width: 70px;
}

.bet-reporting-table .col-country {
    width: 70px;
    min-width: 70px;
}

.bet-reporting-table .col-version {
    width: 50px;
    min-width: 50px;
}

.bet-reporting-table .col-ledger {
    width: 60px;
    min-width: 60px;
    text-align: center;
}

.bet-reporting-table .col-fraud {
    width: 70px;
    min-width: 70px;
    text-align: center;
}

.bet-reporting-table .col-mod {
    width: 70px;
    min-width: 70px;
    text-align: center;
}

.bet-reporting-table .col-date {
    width: 120px;
    min-width: 120px;
}

.bet-reporting-table .col-actions {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

/* Optimize filters for Bet Reporting */
#bet-reporting-page .filters-section {
    max-width: 100%;
    overflow-x: hidden;
}

#bet-reporting-page .filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

#bet-reporting-page .filters-row .input,
#bet-reporting-page .filters-row .select {
    flex: 1 1 auto;
    min-width: 120px;
    max-width: 200px;
    font-size: 13px;
}

#bet-reporting-page .date-range-picker {
    min-width: 180px;
    max-width: 220px;
}

#bet-reporting-page .amount-range-filter {
    display: flex;
    gap: 5px;
    align-items: center;
    min-width: 150px;
}

#bet-reporting-page .amount-range-filter .input-sm {
    width: 70px;
    font-size: 13px;
}

#bet-reporting-page .time-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

#bet-reporting-page .btn-time-filter {
    font-size: 12px;
    padding: 6px 10px;
}

/* Responsive adjustments for Bet Reporting */
@media (max-width: 1600px) {
    .bet-reporting-table {
        font-size: 12.5px;
    }
    
    .bet-reporting-table th {
        font-size: 11.5px;
        padding: 9px 5px;
    }
    
    .bet-reporting-table td {
        font-size: 12.5px;
        padding: 9px 5px;
    }
}

@media (max-width: 1400px) {
    .bet-reporting-table .col-reference,
    .bet-reporting-table .col-share-code {
        display: none;
    }
}

@media (max-width: 1200px) {
    .bet-reporting-table .col-phone,
    .bet-reporting-table .col-country,
    .bet-reporting-table .col-version {
        display: none;
    }
    
    #bet-reporting-page .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    #bet-reporting-page .filters-row .input,
    #bet-reporting-page .filters-row .select {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .bet-reporting-table .col-player {
        display: none;
    }
    
    .bet-reporting-table .col-mod {
        display: none;
    }
}

@media (max-width: 768px) {
    .bet-reporting-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .bet-reporting-table thead,
    .bet-reporting-table tbody,
    .bet-reporting-table tr {
        display: block;
    }
    
    .bet-reporting-table thead {
        display: none;
    }
    
    .bet-reporting-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 10px;
        background: var(--card-bg);
    }
    
    .bet-reporting-table td {
        display: block;
        text-align: right;
        padding: 8px 10px;
        border: none;
        border-bottom: 1px solid var(--border);
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .bet-reporting-table td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: var(--text-light);
    }
    
    .bet-reporting-table td:last-child {
        border-bottom: none;
    }
}

/* Modification Details Additional Styles */
.detail-item.full-width {
    grid-column: 1 / -1;
}

.sync-detection-item {
    background: #f9fafb;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
}

.sync-detection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.sync-detection-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.event-ledger-timeline {
    position: relative;
    padding-left: 40px;
}

.event-ledger-timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.event-ledger-item {
    position: relative;
    margin-bottom: 24px;
}

.event-ledger-item.current {
    background: #fef3c7;
    border-radius: 10px;
    padding: 16px;
    margin-left: -16px;
    border: 2px solid #fbbf24;
}

.event-ledger-marker {
    position: absolute;
    left: -31px;
    top: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 3px solid #e5e7eb;
    color: #9ca3af;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.event-ledger-item.current .event-ledger-marker {
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    border-color: #f59e0b;
    color: white;
}

.event-ledger-content {
    background: white;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.event-ledger-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.event-id {
    font-weight: 700;
    color: #1f2937;
    font-size: 14px;
}

.event-time {
    font-size: 12px;
    color: #6b7280;
}

.event-ledger-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-ledger-body .detail-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.event-ledger-body .detail-item:last-child {
    border-bottom: none;
}

.event-ledger-body .detail-item label {
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
}

.event-ledger-body .detail-item span {
    font-size: 13px;
    color: #1f2937;
}
/* Exposure Dashboard Styles */
.exposure-tab-content {
    animation: fadeIn 0.3s ease;
}

.exposure-tab-content .table-wrapper {
    margin-top: 20px;
}

.exposure-tab-content .info {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-style: italic;
}

/* FAZA 1: RISK MANAGEMENT STYLES */

/* Risk Management Page */
#risk-management-page {
    padding: 24px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

#risk-management-page .page-header {
    margin-bottom: 32px;
}

#risk-management-page .page-header h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Risk Score Display */
.risk-score-display {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.risk-score-value {
    font-size: 20px;
    font-weight: 700;
}

.risk-score-value.critical {
    color: #dc3545;
}

.risk-score-value.high {
    color: #fd7e14;
}

.risk-score-value.medium {
    color: #ffc107;
}

.risk-score-label {
    font-size: 12px;
    color: #6c757d;
}

/* Risk Profile Modal */
.risk-profile-overview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.risk-score-card {
    display: flex;
    align-items: center;
    justify-content: center;
}

.risk-score-main {
    text-align: center;
    padding: 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-width: 150px;
}

.risk-score-main.critical {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.risk-score-main.high {
    background: linear-gradient(135deg, #fd7e14 0%, #e55a00 100%);
}

.risk-score-main.medium {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
}

.risk-score-main.low {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.risk-score-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.risk-score-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.risk-level-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.risk-factor-item {
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.risk-factor-item label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.risk-factor-value {
    display: block;
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

.risk-section {
    margin-bottom: 32px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.risk-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-accounts-list,
.alerts-list,
.velocity-list,
.bonus-abuse-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.related-account-item,
.alert-item,
.velocity-item,
.bonus-abuse-item {
    padding: 12px 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.alert-item.critical {
    border-left-color: #dc3545;
}

.alert-item.high {
    border-left-color: #fd7e14;
}

.alert-item.medium {
    border-left-color: #ffc107;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.alert-message {
    color: #6c757d;
    font-size: 14px;
    width: 100%;
}

.alert-time {
    font-size: 12px;
    color: #9ca3af;
}

.player-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.player-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 992px) {
    .risk-profile-overview {
        grid-template-columns: 1fr;
    }
    
    .risk-factors-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    #risk-management-page {
        padding: 16px;
    }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE ENHANCEMENTS
   Optimizat pentru PC, Laptop, Tabletă și Telefon Mobil
   ============================================ */

/* Tablet Breakpoint (992px) - Optimizare pentru tablete */
@media (max-width: 992px) {
    /* Main Layout - Păstrăm margin-left pentru sidebar */
    .main-content {
        margin-left: 260px;
        padding: 20px;
        max-width: calc(100vw - 260px);
        width: calc(100vw - 260px);
    }
    
    /* Asigură că toate paginile respectă margin-left-ul pe tabletă */
    [id$="-page"] {
        width: 100%;
        max-width: 100%;
    }
    
    [id$="-page"] .page {
        width: 100%;
        max-width: 100%;
    }
    
    /* Stats Grid - 2 coloane pe tabletă */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Financial KPI Grid */
    .financial-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Charts Grid */
    .dashboard-charts-grid,
    .financial-charts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tables - Optimizare pentru tabletă */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }
    
    .table {
        font-size: 13px;
    }
    
    .table th,
    .table td {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    /* Filters - Layout îmbunătățit */
    .filters-row {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .filters-row .input,
    .filters-row .select {
        flex: 1 1 calc(50% - 6px);
        min-width: 150px;
        max-width: 100%;
    }
    
    /* Date Range Picker */
    .date-range-picker {
        width: 100%;
        max-width: 100%;
    }
    
    /* Amount Range Filter */
    .amount-range-filter {
        width: 100%;
        max-width: 100%;
    }
    
    /* Cards */
    .card {
        padding: 20px;
    }
    
    /* Modals - Dimensiuni optimizate pentru tabletă */
    .modal-content {
        width: 90% !important;
        max-width: 90% !important;
        margin: 20px auto;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    /* Form Rows */
    .form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Detail Grids */
    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    /* Top Bar */
    .top-bar {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .top-bar-right {
        flex: 1 1 100%;
    }
    
    /* Global Search */
    .global-search-container {
        width: 100%;
    }
    
    /* Page Header Actions */
    .page-header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Card Header Actions */
    .card-header-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* Table Toolbar */
    .table-toolbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    /* User Cards Container */
    .users-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Quick Actions Grid */
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Report Templates Grid */
    .report-templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Sync Detection Details */
    .sync-detection-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Breakpoint (768px) - Optimizare pentru telefoane mobile */
@media (max-width: 768px) {
    /* Mobile Menu Toggle - Vizibil pe mobile */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: 8px;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-md);
    }
    
    /* Sidebar - Ascuns pe mobile, apare când este deschis */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        position: fixed;
        z-index: 1000;
        height: 100vh;
        width: 280px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    /* Overlay pentru sidebar pe mobile */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    /* Main Content - Full width pe mobile */
    .main-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
        max-width: 100%;
    }
    
    /* Asigură că toate paginile sunt full width pe mobile */
    [id$="-page"] {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }
    
    [id$="-page"] .page {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }
    
    /* Top Bar - Stack vertical pe mobile */
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px 0;
        margin-top: 50px; /* Spațiu pentru mobile menu toggle */
    }
    
    .top-bar-left h1 {
        font-size: 24px;
    }
    
    .top-bar-left p {
        font-size: 13px;
    }
    
    .top-bar-right {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    /* Global Search - Full width pe mobile */
    .global-search-container {
        width: 100%;
        margin-right: 0;
    }
    
    .global-search-input {
        width: 100%;
    }
    
    /* Stats Grid - O coloană pe mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .financial-kpi-grid {
        grid-template-columns: 1fr;
    }
    
    /* Charts - Full width pe mobile */
    .dashboard-charts-grid,
    .financial-charts-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tables - Scroll orizontal pe mobile */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    .table {
        width: 100%;
        table-layout: auto;
        font-size: 12px;
        min-width: 600px; /* Lățime minimă pentru scroll */
    }
    
    .table th,
    .table td {
        padding: 10px 8px;
        font-size: 12px;
        white-space: nowrap;
    }
    
    /* Prevent horizontal scroll on pages */
    .page {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
    }
    
    /* Cards - Full width pe mobile */
    .card {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
        padding: 15px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    /* Filters - Stack vertical pe mobile */
    .filters-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters-row .input,
    .filters-row .select {
        width: 100%;
        max-width: 100%;
    }
    
    /* Date Range Picker - Full width pe mobile */
    .date-range-picker {
        width: 100%;
        max-width: 100%;
    }
    
    /* Amount Range Filter - Stack vertical pe mobile */
    .amount-range-filter {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .amount-range-filter span {
        display: none;
    }
    
    /* Modals - Full width pe mobile */
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3em;
    }
    
    /* Form Rows - O coloană pe mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Detail Grids - O coloană pe mobile */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Buttons - Full width pe mobile */
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 10px;
        font-size: 13px;
    }
    
    /* Page Header Actions - Stack vertical */
    .page-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .page-header-actions .btn {
        width: 100%;
    }
    
    /* Card Header Actions - Stack vertical */
    .card-header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .card-header-actions .btn {
        width: 100%;
    }
    
    /* Table Toolbar - Stack vertical */
    .table-toolbar {
        flex-direction: column;
        gap: 10px;
    }
    
    .table-toolbar-left,
    .table-toolbar-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* User Cards - O coloană pe mobile */
    .users-cards-container {
        grid-template-columns: 1fr;
    }
    
    /* Quick Actions - O coloană pe mobile */
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    /* Report Templates - O coloană pe mobile */
    .report-templates-grid {
        grid-template-columns: 1fr;
    }
    
    /* Sync Detection Details - O coloană pe mobile */
    .sync-detection-details {
        grid-template-columns: 1fr;
    }
    
    /* Tabs - Scroll orizontal pe mobile */
    .tabs-header {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 5px;
        padding: 0 10px;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
        white-space: nowrap;
    }
    
    /* User Profile Actions - Wrap pe mobile */
    .user-profile-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .user-profile-actions .btn {
        flex: 1 1 auto;
        min-width: 120px;
    }
    
    /* Financial Controls - Stack vertical */
    .financial-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    /* Alert Filters - Stack vertical */
    .alert-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .alert-filters .select-sm {
        width: 100%;
    }
    
    /* Chart Container - Înălțime redusă pe mobile */
    .chart-container {
        height: 250px !important;
    }
    
    /* Stat Cards - Padding redus pe mobile */
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 1.8em;
    }
    
    /* KPI Values - Font size redus pe mobile */
    .kpi-value {
        font-size: 1.3em;
    }
    
    /* Page Header - Font size redus */
    .page-header h2 {
        font-size: 1.4em;
    }
}

/* Small Mobile Breakpoint (480px) - Optimizare pentru telefoane mici */
@media (max-width: 480px) {
    .main-content {
        padding: 10px;
    }
    
    .top-bar {
        margin-top: 60px;
        padding: 10px 0;
    }
    
    .top-bar-left h1 {
        font-size: 20px;
    }
    
    .top-bar-left p {
        font-size: 12px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.5em;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 8px;
        font-size: 12px;
    }
    
    .modal-content {
        padding: 12px;
        width: 98% !important;
        max-width: 98% !important;
        margin: 5px auto;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
    }
    
    .page-header h2 {
        font-size: 1.3em;
    }
    
    .kpi-value {
        font-size: 1.2em;
    }
    
    .chart-container {
        height: 200px !important;
    }
    
    .table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
        font-size: 11px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card-header h3 {
        font-size: 1.1em;
    }
    
    /* Hide less important elements on very small screens */
    .top-bar-left p {
        display: none;
    }
}

/* Extra Small Mobile (360px) - Optimizare pentru telefoane foarte mici */
@media (max-width: 360px) {
    .main-content {
        padding: 8px;
    }
    
    .top-bar-left h1 {
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 1.3em;
    }
    
    .table {
        font-size: 10px;
        min-width: 450px;
    }
    
    .table th,
    .table td {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    .btn {
        padding: 8px;
        font-size: 12px;
    }
}

/* Touch-friendly improvements - Pentru dispozitive touch */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .nav-item,
    .tab-button,
    .row-checkbox,
    .select-all-checkbox {
        min-height: 44px;
        min-width: 44px;
    }
    
    .row-checkbox,
    .select-all-checkbox {
        width: 24px;
        height: 24px;
    }
    
    .table th,
    .table td {
        padding: 12px 8px;
    }
    
    .alert-item {
        padding: 20px;
    }
    
    .modal-actions-footer .btn {
        min-width: 100px;
        min-height: 44px;
    }
    
    /* Increase touch target size for mobile */
    .nav-item {
        padding: 15px 20px;
    }
    
    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .main-content {
        padding: 12px;
    }
    
    .top-bar {
        margin-top: 50px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-container {
        height: 200px !important;
    }
    
    .modal-content {
        max-height: 85vh;
    }
}

/* Large Desktop Optimization (1400px+) */
@media (min-width: 1400px) {
    .main-content {
        margin-left: 260px; /* Păstrăm margin pentru sidebar */
        max-width: calc(100vw - 260px);
        width: calc(100vw - 260px);
    }
    
    /* Asigură că toate paginile respectă margin-left-ul pe desktop mare */
    [id$="-page"] {
        width: 100%;
        max-width: 100%;
    }
    
    [id$="-page"] .page {
        width: 100%;
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .financial-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Print Styles - Optimizare pentru print */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    .top-bar-right,
    .page-header-actions,
    .card-header-actions,
    .table-toolbar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .page {
        display: block !important;
    }
    
    .card {
        page-break-inside: avoid;
    }
    
    .table {
        font-size: 10px;
    }
}

/* High DPI / Retina Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion - Pentru utilizatori cu preferințe de accesibilitate */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .sidebar {
        transition: none;
    }
}

/* Dark Mode Support (dacă este implementat) */
@media (prefers-color-scheme: dark) {
    /* Păstrăm tema actuală, dar putem adăuga suport pentru dark mode în viitor */
}

/* Focus Visible - Pentru accesibilitate */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Ensure all interactive elements are accessible */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================================
   LOGIN PAGE STYLES
   ============================================================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    animation: slideUp 0.3s ease;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    max-width: 120px;
    max-height: 120px;
    margin-bottom: 20px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
}

.login-card .form-group {
    margin-bottom: 20px;
}

.login-card .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

.login-card .form-group .input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

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

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid #fcc;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-footer p {
    color: var(--text-light);
    font-size: 12px;
}

/* User Info in Header */
.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 12px;
}

.user-email {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Login */
@media (max-width: 768px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-logo {
        max-width: 100px;
        max-height: 100px;
    }
}

/* ============================================================================
   GROUPS MANAGEMENT STYLES
   ============================================================================ */

#groups-page .table {
    width: 100%;
}

#groups-page .table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

#groups-page .badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

#groups-page .badge-info {
    background: #17a2b8;
    color: white;
}

#groups-page .badge-warning {
    background: #ffc107;
    color: #333;
}

#groups-page .badge-success {
    background: #28a745;
    color: white;
}

#groups-page .badge-secondary {
    background: #6c757d;
    color: white;
}

#groups-page .form-group {
    margin-bottom: 20px;
}

#groups-page .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
    font-size: 14px;
}

#groups-page .form-group .input,
#groups-page .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

#groups-page .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

#groups-page .form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-light);
    font-size: 12px;
}

/* Responsive Groups */
@media (max-width: 768px) {
    #groups-page .table {
        font-size: 12px;
    }
    
    #groups-page .table th,
    #groups-page .table td {
        padding: 8px 6px;
    }
    
    #groups-page .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
}

/* ============================================================================
   RISK MANAGEMENT - NEW TABBED INTERFACE
   ============================================================================ */

/* Main Tabs Container */
.risk-management-tabs-container {
    background: white;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.risk-management-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.risk-management-tabs::-webkit-scrollbar {
    height: 6px;
}

.risk-management-tabs::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.risk-management-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.risk-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
}

.risk-tab-btn:hover {
    background: #f1f5f9;
    color: #334155;
}

.risk-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.risk-tab-btn.active i {
    color: white;
}

.risk-tab-btn i {
    font-size: 16px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.risk-tab-btn.active i {
    color: white;
}

.tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.tab-badge:empty {
    display: none !important;
}

.risk-tab-btn:not(.active) .tab-badge {
    background: #ef4444;
    color: white;
}

/* Tab Content */
.risk-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.risk-tab-content.active {
    display: block;
}

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

/* Worker Status Widget */
.worker-status-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.worker-status-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.worker-status-card.running::before {
    transform: scaleX(1);
}

.worker-status-card.stopped {
    border-color: #fca5a5;
    background: #fef2f2;
}

.worker-status-card.stopped::before {
    background: #ef4444;
    transform: scaleX(1);
}

.worker-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.worker-status-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.worker-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.worker-status-card.stopped .worker-status-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.worker-status-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.worker-status-description {
    font-size: 13px;
    color: #64748b;
    margin-top: 4px;
}

.worker-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.worker-status-badge.running {
    background: #d1fae5;
    color: #065f46;
}

.worker-status-badge.stopped {
    background: #fee2e2;
    color: #991b1b;
}

.worker-status-body {
    margin-top: 16px;
}

.worker-status-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.worker-status-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.worker-status-info-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 600;
}

.worker-status-info-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.worker-status-last-run {
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.worker-status-last-run-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 4px;
}

.worker-status-last-run-value {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
}

.worker-status-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.worker-status-stat {
    text-align: center;
}

.worker-status-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.worker-status-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    font-weight: 600;
}
/* ============================================================================
   FUTURISTIC DASHBOARD STYLES
   ============================================================================ */

/* Futuristic Dashboard Container */
.futuristic-dashboard {
    padding: 24px;
    background: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.futuristic-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.futuristic-dashboard > * {
    position: relative;
    z-index: 1;
}

/* Metrics Grid */
.dashboard-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Futuristic Card */
.futuristic-card {
    position: relative;
    background: #ffffff;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.futuristic-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.futuristic-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08),
        0 0 40px rgba(99, 102, 241, 0.1);
}

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

.futuristic-card:hover .card-glow {
    opacity: 1;
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

/* Card Content */
.card-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.2);
    flex-shrink: 0;
}

.card-info {
    flex: 1;
}

.card-label {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
    line-height: 1.2;
}

.card-trend {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.5);
}

/* Card Type Colors */
.exposure-card .card-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

.approvals-card .card-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
}

.rules-card .card-icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(124, 58, 237, 0.1));
    color: #7c3aed;
    border-color: rgba(139, 92, 246, 0.3);
}

.fraud-card .card-icon {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.1), rgba(219, 39, 119, 0.1));
    color: #db2777;
    border-color: rgba(236, 72, 153, 0.3);
}

.risk-card .card-icon {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.1), rgba(234, 88, 12, 0.1));
    color: #ea580c;
    border-color: rgba(251, 146, 60, 0.3);
}

.health-card .card-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: #059669;
    border-color: rgba(16, 185, 129, 0.3);
}

/* Section Cards */
.dashboard-sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.futuristic-section-card {
    background: #ffffff;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.futuristic-section-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.section-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header h3 i {
    color: rgba(99, 102, 241, 1);
}

.btn-futuristic {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #6366f1;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-futuristic:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateX(4px);
}

.section-content {
    color: rgba(0, 0, 0, 0.8);
}

/* Metrics Row */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.metric-item {
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.metric-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.metric-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Recent Items */
.recent-items {
    margin-top: 24px;
}

.recent-items h4 {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.7);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.items-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.items-list::-webkit-scrollbar {
    width: 6px;
}

.items-list::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 3px;
}

.items-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.items-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.item-entry {
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    border-left: 3px solid rgba(99, 102, 241, 0.5);
    transition: all 0.2s;
}

.item-entry:hover {
    background: #ffffff;
    border-left-color: rgba(99, 102, 241, 1);
}

.item-entry-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.item-entry-details {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
}

.status-indicator.active {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.status-indicator.warning {
    background: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.status-indicator.error {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

.status-info {
    flex: 1;
}

.status-label {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

/* Workers Grid */
.workers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.worker-item {
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

.worker-item:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
}

.worker-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
}

.worker-status {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 4px;
}

.worker-last-run {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.4);
}

/* Quick Actions */
.quick-actions-futuristic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.action-btn {
    padding: 16px 20px;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    color: #6366f1;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.15);
}

.action-btn i {
    font-size: 18px;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

.futuristic-card,
.futuristic-section-card {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sections-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .quick-actions-futuristic {
        grid-template-columns: 1fr;
    }
}
