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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #fff;
    color: #000;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    background: #000 !important;
    padding: 40px !important;
    display: inline-block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.login-logo {
    width: 220px;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    display: block;
    filter: brightness(1.1);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 14px;
    color: #666;
}

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

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

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    transition: border-color 0.2s;
    background: #fafafa;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
    background: #fff;
}

.error-message {
    background: #000;
    color: #fff;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 13px;
    text-align: center;
}

.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: #000;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    padding: 10px 20px;
    background: #fff;
    color: #000;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
    border-radius: 6px;
    letter-spacing: -0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    box-sizing: border-box;
}

.btn-secondary:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    font-size: 12px;
    color: #999;
}

/* Card Styles */
.card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Form Elements */
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    font-size: 14px;
    font-family: monospace;
    margin-bottom: 15px;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: #000;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
}

thead {
    background: #000;
    color: #fff;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

tbody tr:hover {
    background: #fafafa;
}

/* Job Status */
.job-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 10px;
}

.job-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.job-institution {
    font-weight: 600;
    font-size: 15px;
}

.job-status {
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    background: #000;
    color: #fff;
}

.job-status.completed {
    background: #000;
}

.job-status.failed {
    background: #666;
}

.job-status.pending {
    background: #999;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    margin-top: 10px;
}

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

/* Guide Content */
.guide-content {
    max-width: 900px;
}

.guide-section {
    background: #fafafa;
    border-left: 4px solid #000;
    padding: 24px;
    margin-bottom: 24px;
}

.guide-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-section p {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 16px;
}

.guide-section ol,
.guide-section ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.guide-section li {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 8px;
}

.guide-section ol li {
    padding-left: 8px;
}

.guide-section strong {
    font-weight: 600;
    color: #000;
}

/* Action Buttons */
.btn-edit, .btn-delete, .btn-source, .btn-update {
    padding: 8px 14px;
    font-size: 13px;
    border: none;
    cursor: pointer;
    margin-right: 6px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.01em;
}

.btn-edit {
    background: #000;
    color: #fff;
}

.btn-edit:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-delete {
    background: #fff;
    color: #000;
    border: 2px solid #e0e0e0;
}

.btn-delete:hover {
    background: #000;
    color: #fff;
    border-color: #000;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-source {
    background: #0066cc;
    color: #fff;
}

.btn-source:hover {
    background: #0052a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.btn-update {
    background: #059669;
    color: #fff;
}

.btn-update:hover:not(:disabled) {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.btn-update:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

/* Spinning animation for loading */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-close:hover {
    opacity: 0.6;
}

/* Sources Button */
.btn-view-sources {
    padding: 8px 14px;
    font-size: 13px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: -0.01em;
}

.btn-view-sources:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.source-link {
    color: #000;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.source-link:hover {
    opacity: 0.6;
}

/* Sources Modal */
.modal-sources {
    max-width: 700px;
    width: 90%;
}

.sources-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.source-item {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    padding: 16px;
    border-radius: 6px;
}

.source-item.main-source {
    background: #fff9e6;
    border-color: #FFD700;
}

.source-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #666;
}

.source-header {
    display: flex;
    align-items: start;
    gap: 12px;
    margin-bottom: 8px;
}

.source-number {
    background: #000;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

.source-url {
    color: #0066cc;
    text-decoration: none;
    word-break: break-all;
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    transition: opacity 0.2s;
}

.source-url:hover {
    opacity: 0.6;
    text-decoration: underline;
}

.source-url-text {
    color: #666;
    font-size: 13px;
}

.source-details {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
    margin-top: 8px;
}

.source-divider {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    padding: 8px 0;
    margin-top: 8px;
    border-bottom: 2px solid #000;
}

/* Claude Verification */
.claude-verification {
    background: #fafafa;
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 6px;
}

.claude-verification.verified {
    background: #f0fff4;
    border-color: #22c55e;
}

.claude-verification.flagged {
    background: #fff5f5;
    border-color: #ef4444;
}

.verification-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 16px;
}

.claude-verification.verified .verification-status {
    color: #15803d;
}

.claude-verification.flagged .verification-status {
    color: #dc2626;
}

.claude-verification p {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.6;
}

.claude-verification .flags {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.claude-verification .flags ul {
    list-style: none;
    margin-left: 0;
}

.claude-verification .flags li {
    padding: 6px 0 6px 20px;
    position: relative;
    font-size: 13px;
    color: #666;
}

.claude-verification .flags li:before {
    content: "⚠";
    position: absolute;
    left: 0;
    color: #ef4444;
}

/* Status Button */
.btn-status {
    padding: 6px 12px;
    font-size: 12px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-status:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* Status Details Modal */
.modal-status {
    max-width: 800px;
    width: 90%;
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.summary-section {
    background: #f9fafb;
    padding: 20px;
    border-left: 4px solid #000;
    border-radius: 6px;
}

.summary-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.metrics-section h3,
.urls-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.metric-item {
    background: linear-gradient(135deg, #072441 0%, #0a3a5c 100%);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #0d4d6f;
    overflow: hidden;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

.urls-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.url-item {
    background: #fafafa;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.url-number {
    background: #000;
    color: #fff;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    flex-shrink: 0;
}

.url-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
    word-break: break-all;
    flex: 1;
}

.url-link:hover {
    text-decoration: underline;
}

.url-text {
    color: #666;
    font-size: 13px;
    flex: 1;
}

.warning-section {
    background: #fff5f5;
    border: 2px solid #ef4444;
    padding: 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
    }

    .content {
        height: calc(100vh - 200px);
    }

    .modal-sources,
    .modal-status {
        width: 95%;
        max-height: 85vh;
    }

    .source-details {
        flex-direction: column;
        gap: 8px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   DATA ANALYTICS DASHBOARD STYLES
   =========================== */

/* Danger Button (Red Clear History) */
.btn-danger {
    background: #ef4444;
    color: #fff;
    border: 2px solid #ef4444;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    height: 40px;
    box-sizing: border-box;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Metrics Cards Container */
.metrics-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #072441 0%, #0a3a5c 100%);
    border-radius: 12px;
    padding: 24px;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #0d4d6f;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(7, 36, 65, 0.3);
}

.metric-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.metric-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #fff;
}

.metric-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-change {
    font-size: 12px;
    margin-top: 8px;
    padding: 4px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    display: inline-block;
    color: rgba(255, 255, 255, 0.8);
}

.metric-change.positive {
    color: #10b981;
}

.metric-change.negative {
    color: #ef4444;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.chart-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.chart-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.chart-header {
    margin-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 16px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111827;
}

.chart-header h3 i {
    width: 20px;
    height: 20px;
    color: #6366f1;
}

.chart-header p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

.plotly-chart {
    min-height: 400px;
    width: 100%;
}

/* Full-width charts */
.chart-card.full-width {
    grid-column: 1 / -1;
}

/* Insights Panel */
.insights-panel {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 32px;
    margin-top: 30px;
    border: 1px solid #e2e8f0;
}

.insights-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #cbd5e1;
}

.insights-header h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.insights-header i {
    width: 28px;
    height: 28px;
    color: #8b5cf6;
}

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

.insight-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #6366f1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.insight-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.insight-description {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

.insight-item.highlight {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.insight-item.warning {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.insight-item.success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

/* Statistical Summary Section */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 24px;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
}

.stat-box {
    text-align: center;
    padding: 16px;
    border-radius: 6px;
    background: #f9fafb;
}

.stat-box-value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.stat-box-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Data Quality Indicators */
.quality-indicators {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.quality-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

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

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

.quality-badge.fair {
    background: #fed7aa;
    color: #92400e;
}

.quality-badge.poor {
    background: #fecaca;
    color: #991b1b;
}

/* ===========================
   FILTER BAR STYLES
   =========================== */

.filter-bar {
    background: #fff;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.filter-bar .filter-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
    background: #f9fafb;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.filter-bar .filter-search:focus-within {
    border-color: #072441;
    background: #fff;
}

.filter-bar .filter-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 100%;
    color: #333;
}

.filter-bar .filter-search input::placeholder {
    color: #9ca3af;
}

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

.filter-bar .filter-group label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
}

.filter-bar select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    min-width: 140px;
    transition: all 0.2s;
}

.filter-bar select:hover {
    border-color: #d1d5db;
}

.filter-bar select:focus {
    outline: none;
    border-color: #072441;
}

.btn-clear-filters {
    padding: 8px 16px;
    font-size: 13px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-clear-filters:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.btn-filter-action {
    padding: 8px 16px;
    font-size: 13px;
    background: #072441;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-filter-action:hover {
    background: #0a3a5c;
}

.filter-divider {
    width: 1px;
    height: 32px;
    background: #e5e7eb;
    margin: 0 8px;
}

.results-count {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
    padding: 0 4px;
}

/* User Management Styles */
.user-filter-btn {
    opacity: 0.6;
    transition: all 0.2s;
}

.user-filter-btn.active {
    opacity: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-filter-btn:hover {
    opacity: 0.9;
}

/* Responsive Design for Analytics Dashboard */
@media (max-width: 1024px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .metrics-cards-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .metrics-cards-container {
        grid-template-columns: 1fr;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-card {
        padding: 16px;
    }

    .plotly-chart {
        min-height: 300px;
    }
}
