/* Performist Dashboard - Mind-Blowing Premium Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Flat teal theme (no gradients or glow) */
     /* Solid teal background */
     --bg-primary: #f7f7f7;  
    --bg-secondary: #ffffff;            /* Light card background */
    --bg-tertiary: #f7f7f7;             /* Elevated elements */
    --bg-card: #ffffff;                 /* Solid white card */
    --bg-hover: rgba(255, 255, 255, 0.12); /* Simple light hover */
    --bg-glass: transparent;            /* No glass effect */
    --text-primary: #111111;            /* Near-black text for main content */
    --text-secondary: #444444;          /* Dark gray for secondary text */
    --text-muted: #777777;              /* Muted gray text */
    --accent-primary: rgb(15, 179, 167);          /* Teal accent */
    --accent-secondary: rgb(15, 179, 167);
    --accent-tertiary: rgb(15, 179, 167);
    --accent-success: rgb(15, 179, 167);
    --accent-warning: rgb(15, 179, 167);
    --accent-danger: rgb(15, 179, 167);
    --accent-info: rgb(15, 179, 167);
    --border-color: rgba(15, 179, 167, 0.35);
    --border-glow: rgba(15, 179, 167, 0.55);
    --shadow-glow: none;                /* No glow */
    --shadow-purple: none;
    --shadow-blue: none;
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.06); /* Soft neutral shadow */
    --gradient-primary: rgb(15, 179, 167);  /* Flat teal (no gradient) */
    --gradient-secondary: rgb(15, 179, 167);
    --gradient-mesh: none;              /* No mesh background */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary); /* solid teal only */
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

.material-icons {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 6px;
}

body::before {
    content: none; /* remove animated orbs */
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Header Checker Styles */
.header-checker-section {
    padding: 20px;
}

.tools-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .tools-container {
        grid-template-columns: 1fr;
    }
}

.header-checker-card, .play-store-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

.header-checker-card h3, .play-store-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
}

.header-checker-card h3 .material-icons, .play-store-card h3 .material-icons {
    color: var(--accent-primary);
    margin-right: 10px;
    font-size: 24px;
}

.url-input-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
}

.url-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-primary);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.url-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(15, 179, 167, 0.1);
}

.check-btn {
    padding: 12px 20px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.check-btn:hover {
    background: rgb(12, 155, 145);
    transform: translateY(-1px);
}

.check-btn:active {
    transform: translateY(0);
}

.head-only-note {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 8px;
}

.head-only-note .material-icons {
    font-size: 14px;
    margin-right: 4px;
    color: var(--accent-info);
}

.csv-upload-section {
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
}

.upload-divider {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.upload-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
}

.upload-divider span {
    background: var(--bg-card);
    padding: 0 15px;
    color: var(--text-secondary);
    font-size: 14px;
    position: relative;
}

.file-input-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.file-input {
    display: none;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.file-input-label:hover {
    border-color: var(--accent-primary);
    background: rgba(15, 179, 167, 0.05);
}

.file-name {
    color: var(--text-muted);
    font-size: 14px;
    font-style: italic;
}

.process-btn {
    padding: 12px 20px;
    background: var(--accent-success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.process-btn:hover:not(:disabled) {
    background: rgb(12, 155, 145);
    transform: translateY(-1px);
}

.process-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.header-results {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.header-results h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.results-content {
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
}

.results-content .header-item {
    margin-bottom: 8px;
    padding: 4px 0;
}

.results-content .header-name {
    font-weight: 600;
    color: var(--accent-primary);
}

.results-content .header-value {
    color: var(--text-secondary);
}

/* Risk Analysis Tables */
.risk-analysis-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.risk-analysis-table th {
    background: var(--accent-primary);
    color: white;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    font-size: 0.9rem;
    border-left: none;
}

.risk-analysis-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.risk-analysis-table tbody tr:last-child td {
    border-bottom: none;
}

 .risk-analysis-table tbody tr,
 .risk-analysis-table tbody tr:nth-child(even),
 .risk-analysis-table tbody tr:nth-child(odd) {
     background: transparent !important;
     transform: none !important;
 }

 .risk-analysis-table tbody tr:hover,
 .risk-analysis-table tbody tr:nth-child(even):hover {
     background: transparent !important;
     transform: none !important;
 }

 .risk-analysis-table tr.alert-critical,
 .risk-analysis-table tr.alert-high,
 .risk-analysis-table tr.alert-medium,
 .risk-analysis-table tr.alert-low {
     background: transparent !important;
     color: inherit !important;
 }

 .risk-analysis-table tr.alert-critical td,
 .risk-analysis-table tr.alert-high td,
 .risk-analysis-table tr.alert-medium td,
 .risk-analysis-table tr.alert-low td {
     background: transparent !important;
     color: inherit !important;
     border-left: none !important;
 }



/* Responsive table */
@media (max-width: 768px) {
    .risk-analysis-table {
        font-size: 0.75rem;
    }
    
    .risk-analysis-table th,
    .risk-analysis-table td {
        padding: 8px;
    }
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
}

.sidebar-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 24px;
    text-transform: uppercase;
    animation: shimmer 3s ease-in-out infinite;
    text-align: center;
}

.sidebar-logo {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 24px;
}

@keyframes shimmer {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.sync-btn {
    background-color: var(--accent-primary);
    color: #ffffff;
    border: none;
    padding: 16px 24px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    width: 100%;
    box-shadow: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.sync-btn::before {
    content: none; /* no shine effect */
}

.sync-btn:hover::before {
    left: 100%;
}

.sync-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.sync-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.sync-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.header-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.logout-btn {
    background-color: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 12px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn:hover {
    background-color: #dc2626;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.logout-btn:active {
    transform: translateY(-1px);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(120, 77, 211, 0.3); }
    50% { box-shadow: 0 4px 32px rgba(120, 77, 211, 0.5); }
}

/* Progress Bar */
.progress-container {
    margin: 16px 24px;
    background: var(--bg-tertiary);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

.progress-bar {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-primary);
    width: 0%;
    border-radius: 20px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    position: relative;
}

.progress-fill::after {
    content: none;
}

@keyframes progressShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables List */
.tables-list {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
}

.tables-list h3 {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tables-list h3::before {
    content: '';
    width: 16px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.tables-list ul {
    list-style: none;
}

.tables-list li {
    padding: 14px 18px;
    margin: 6px 0;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

.tables-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.tables-list li:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-left-color: var(--accent-primary);
    transform: translateX(4px);
}

.tables-list li.active {
    background: rgba(15, 179, 167, 0.10);
    color: var(--accent-primary);
    border-left-color: var(--accent-primary);
    box-shadow: var(--shadow-glow), inset 0 0 20px rgba(15, 179, 167, 0.05);
    font-weight: 600;
}

.tables-list li.active::after {
    content: '→';
    position: absolute;
    right: 16px;
    color: var(--accent-primary);
    font-weight: 700;
}

.record-count {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 8px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    margin-top: auto;
}

.sidebar-footer .risk-btn {
    width: 100%;
    justify-content: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    background: transparent;
    min-height: 100vh;
    width: 80% !important;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    display: none;
}

.content-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.content-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
}

.last-updated {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

/* Welcome Section */
.welcome-section {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    padding: 60px 48px;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.welcome-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(120, 77, 211, 0.03) 0%, transparent 50%);
    animation: welcomePulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes welcomePulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.welcome-section h2 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.welcome-section p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.welcome-section p strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
    position: relative;
    z-index: 1;
}

.stat-card {
    background: var(--bg-tertiary);
    backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: -1;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    border-color: var(--border-glow);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover::after {
    opacity: 0.05;
}

.stat-card h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 700;
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 900;
    display: block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

/* Data Table Section */
.data-table-section {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(0, 245, 212, 0.03) 0%, transparent 100%);
}

.table-info {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-info::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

.table-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120, 77, 211, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    background: var(--accent-primary);
    color: #000000;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(120, 77, 211, 0.3);
}

/* Table */
.table-container {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead {
    background: var(--bg-tertiary);
    position: sticky;
    top: 0;
    z-index: 10;
}

thead th {
    padding: 18px 24px;
    text-align: left;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1.5px;
    position: relative;
}

thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-primary), transparent);
    opacity: 0.3;
}

tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: rgba(120, 77, 211, 0.05);
    transform: scale(1.005);
}

tbody td {
    padding: 16px 24px;
    white-space: nowrap;
    color: var(--text-secondary);
    font-weight: 500;
}

tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:nth-child(even):hover {
    background: rgba(120, 77, 211, 0.05);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    gap: 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.page-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-btn:hover:not(:disabled) {
    background: var(--accent-primary);
    color: #000000;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(120, 77, 211, 0.3);
}

.page-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#pageInfo {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 13px;
    background: var(--bg-secondary);
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Loading */
.loading-section {
    text-align: center;
    padding: 100px 20px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.loading-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(120, 77, 211, 0.05) 0%, transparent 70%);
    animation: loadingPulse 2s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.loading-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent-primary);
    border-right: 3px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 28px;
    position: relative;
    z-index: 1;
}

.loading-section p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Section */
.error-section {
    text-align: center;
    padding: 60px;
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(239, 68, 68, 0.3);
    position: relative;
    overflow: hidden;
}

.error-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-danger), var(--accent-warning));
}

.error-section h3 {
    color: var(--accent-danger);
    margin-bottom: 16px;
    font-size: 1.5rem;
    font-weight: 700;
}

#errorMessage {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: 14px;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .table-controls {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .welcome-section {
        padding: 32px 20px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.welcome-section,
.data-table-section {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

/* Data Analysis Page */
.data-analysis-section {
    margin-top: 0;
}

.data-analysis-section h3 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.data-analysis-section > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.analysis-card {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.analysis-card:nth-child(2) { animation-delay: 0.1s; }
.analysis-card:nth-child(3) { animation-delay: 0.2s; }
.analysis-card:nth-child(4) { animation-delay: 0.3s; }
.analysis-card:nth-child(5) { animation-delay: 0.4s; }
.analysis-card:nth-child(6) { animation-delay: 0.5s; }

.analysis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.analysis-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    transform: translateX(4px);
}

.analysis-card:hover::before {
    opacity: 1;
}

.analysis-card h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analysis-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
}

.analysis-card p strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* Responsive adjustments for data analysis */
@media (max-width: 768px) {
    .analysis-card {
        padding: 16px;
    }

    .data-analysis-section h3 {
        font-size: 1.25rem;
    }
}

.analytics-section h3 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-section > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.analytics-card {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.analytics-card:nth-child(2) { animation-delay: 0.1s; }
.analytics-card:nth-child(3) { animation-delay: 0.2s; }
.analytics-card:nth-child(4) { animation-delay: 0.3s; }
.analytics-card:nth-child(5) { animation-delay: 0.4s; }

.analytics-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.analytics-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    transform: translateX(4px);
}

.analytics-card:hover::before {
    opacity: 1;
}

.analytics-card h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.alert-item {
    padding: 14px 18px;
    margin: 10px 0;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.alert-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(120, 77, 211, 0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.alert-item:hover::before {
    transform: translateX(100%);
}

.alert-high {
    background: rgba(120, 77, 211, 0.1);
    border: 1px solid rgba(120, 77, 211, 0.2);
    border-left: 4px solid var(--accent-primary);
    color: #d4b5ff;
}

.alert-critical {
    background: transparent;
    border: 1px solid rgba(120, 77, 211, 0.3);
    border-left: 4px solid var(--accent-primary);
    color: #d4b5ff;
    font-weight: 600;
}

.alert-medium {
    background: rgba(120, 77, 211, 0.08);
    border: 1px solid rgba(120, 77, 211, 0.15);
    border-left: 4px solid var(--accent-primary);
    color: #e8d5ff;
}

.alert-low {
    background: rgba(120, 77, 211, 0.05);
    border: 1px solid rgba(120, 77, 211, 0.1);
    border-left: 4px solid var(--accent-primary);
    color: #f0ebff;
}

.alert-item:hover {
    transform: translateX(6px);
}

.alert-item strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* Charts Section */
.charts-section {
    margin-top: 48px;
}

.charts-section h3 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.charts-section > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 48px;
    width: 80%;
}

.chart-card {
    background: var(--bg-secondary);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.chart-card:nth-child(1) { animation-delay: 0.1s; }
.chart-card:nth-child(2) { animation-delay: 0.2s; }
.chart-card:nth-child(3) { animation-delay: 0.3s; }
.chart-card:nth-child(4) { animation-delay: 0.4s; }

.chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.chart-card:hover {
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow), var(--shadow-card);
    transform: translateX(4px);
}

.chart-card:hover::before {
    opacity: 1;
}

.chart-card h4 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card canvas {
    width: 100% !important;
    height: 300px !important;
}

@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Last sync time styling */
.stat-number small {
    font-size: 0.75em;
    color: inherit;
    font-weight: 400;
}
