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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-link {
    padding: 0.375rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border-radius: 6px;
    font-size: 0.875rem;
    text-decoration: none;
    transition: background 0.2s;
}

.header-link:hover {
    background: rgba(59, 130, 246, 0.2);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
}

.connection-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.connection-status.connected {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.connection-status.connected .status-dot {
    background: #4ade80;
}

.connection-status.disconnected {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.connection-status.disconnected .status-dot {
    background: #f87171;
}

.connection-status.connecting {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.connection-status.connecting .status-dot {
    background: #fbbf24;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Pi Status Indicator */
.header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.pi-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    cursor: help;
}

.pi-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pi-status.healthy {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.pi-status.healthy .status-dot {
    background: #4ade80;
}

.pi-status.degraded {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
}

.pi-status.degraded .status-dot {
    background: #fbbf24;
}

.pi-status.offline {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.pi-status.offline .status-dot {
    background: #f87171;
    animation: pulse 1s infinite;
}

.pi-status.unknown {
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}

.pi-status.unknown .status-dot {
    background: #64748b;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 9999px;
}

.user-email {
    font-size: 0.875rem;
    color: #94a3b8;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    font-size: 0.75rem;
    color: #f87171;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: rgba(248, 113, 113, 0.1);
    transition: background 0.2s;
}

.logout-btn:hover {
    background: rgba(248, 113, 113, 0.2);
}

/* Navigation Tabs */
.tabs {
    display: flex;
    gap: 0;
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 0 1rem;
}

.tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #e2e8f0;
}

.tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

.tab.warning {
    color: #f87171;
}

.tab.warning.active {
    color: #f87171;
    border-bottom-color: #f87171;
}

/* Main Content */
.content {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-content {
    display: none;
}

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

/* Summary Cards */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: #1e293b;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #334155;
}

.summary-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e2e8f0;
}

.summary-card.success .summary-value {
    color: #4ade80;
}

.summary-card.warning .summary-value {
    color: #fbbf24;
}

.summary-card.error .summary-value {
    color: #f87171;
}

/* Stat separator for combined 1h/24h display */
.stat-separator {
    color: #64748b;
    margin: 0 0.25rem;
    font-weight: 400;
}

.stat-secondary {
    font-size: 1.25rem;
    opacity: 0.7;
}

/* Queue Breakdown (User/BG in Queue card) */
.queue-breakdown {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #334155;
}

.queue-tier {
    font-size: 0.875rem;
    color: #94a3b8;
}

.queue-tier span {
    font-weight: 600;
}

.queue-tier.user span {
    color: #4ade80;
}

.queue-tier.bg span {
    color: #64748b;
}

/* Queue Stats Bar */
.queue-stats-bar {
    display: flex;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    flex-wrap: wrap;
}

.queue-stat {
    color: #94a3b8;
}

.queue-stat span {
    color: #e2e8f0;
}

.queue-stats-bar.warning {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.05);
}

.queue-stats-bar.full {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.05);
}

#queue-pending-card.warning {
    border-color: #fbbf24;
}

#queue-pending-card.warning .summary-value {
    color: #fbbf24;
}

#queue-pending-card.full {
    border-color: #f87171;
}

#queue-pending-card.full .summary-value {
    color: #f87171;
}

/* Priority Queue Breakdown */
.queue-stat-divider {
    color: #475569;
    margin: 0 0.25rem;
}

.queue-stat.priority-high span {
    color: #fbbf24;
    font-weight: 600;
}

.queue-stat.priority-standard span {
    color: #34d399;
}

.queue-stat.priority-background span {
    color: #64748b;
}

/* Cache Hit Rate Stats Bar */
.cache-stats-bar {
    background: #1a2332;
    border-color: #2d3a4d;
}

.cache-hit-stat {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
}

.cache-rate-good {
    color: #4ade80 !important;
    font-weight: 600;
}

.cache-rate-medium {
    color: #fbbf24 !important;
    font-weight: 600;
}

.cache-rate-low {
    color: #f87171 !important;
    font-weight: 600;
}

/* Live Queue View */
.queue-view {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.queue-view.collapsed .queue-list {
    display: none;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #0f172a;
    border-bottom: 1px solid #334155;
}

.queue-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    margin: 0;
}

.queue-list {
    max-height: 200px;
    overflow-y: auto;
}

.queue-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #334155;
    font-size: 0.875rem;
    animation: slideIn 0.2s ease;
}

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

.queue-item.new {
    background: rgba(59, 130, 246, 0.1);
}

.queue-item-position {
    color: #64748b;
    min-width: 24px;
    font-weight: 500;
}

.queue-item-type {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.queue-item-payload {
    flex: 1;
    color: #e2e8f0;
    font-family: monospace;
}

.queue-item-time {
    color: #64748b;
    font-size: 0.75rem;
}

.queue-empty {
    padding: 1.5rem;
    text-align: center;
    color: #64748b;
}

/* Filters */
.filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filters select,
.filters input {
    padding: 0.5rem 0.75rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #e2e8f0;
    font-size: 0.875rem;
}

.filters select:focus,
.filters input:focus {
    outline: none;
    border-color: #3b82f6;
}

.btn {
    padding: 0.5rem 1rem;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn:hover {
    background: #2563eb;
}

.btn.secondary {
    background: #475569;
}

.btn.secondary:hover {
    background: #64748b;
}

.btn.danger {
    background: #dc2626;
}

.btn.danger:hover {
    background: #b91c1c;
}

.btn.small {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Tables */
.table-container {
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.data-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #334155;
}

.data-table th {
    background: #0f172a;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

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

.preview-cell {
    cursor: pointer;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-cell:hover {
    color: #60a5fa;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.pending {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
}

.status-badge.in_progress,
.status-badge.assigned {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.status-badge.completed {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.status-badge.failed {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.status-badge.healthy {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.status-badge.quarantined {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.status-badge.offline {
    background: rgba(100, 116, 139, 0.2);
    color: #64748b;
}

.status-badge.fresh {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.status-badge.stale {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.status-badge.expired {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* Dongle Grid */
.dongle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.dongle-card {
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    padding: 1rem;
}

.dongle-card.healthy {
    border-color: #4ade80;
}

.dongle-card.quarantined {
    border-color: #fbbf24;
}

.dongle-card.offline {
    border-color: #64748b;
}

.dongle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.dongle-id {
    font-weight: 600;
    font-size: 1rem;
}

.dongle-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    font-size: 0.875rem;
}

.dongle-stat {
    display: flex;
    justify-content: space-between;
}

.dongle-stat-label {
    color: #94a3b8;
}

.dongle-stat-value {
    font-weight: 500;
}

/* Last Seen - Prominent Display */
.dongle-last-seen {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    text-align: center;
}

.last-seen-relative {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #4ade80;
}

.dongle-card.offline .last-seen-relative {
    color: #f87171;
}

.dongle-card.quarantined .last-seen-relative {
    color: #fbbf24;
}

.last-seen-absolute {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.last-seen-never {
    font-size: 1rem;
    color: #64748b;
}

.dongle-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #334155;
}

/* Consecutive Failure Alert in Dongle Card */
.consecutive-failure-alert {
    padding: 0.5rem;
    margin-bottom: 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.consecutive-failure-alert.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.consecutive-failure-alert.critical {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.dongle-card.failure-warning {
    border-color: rgba(251, 191, 36, 0.5);
}

.dongle-card.failure-critical {
    border-color: rgba(248, 113, 113, 0.5);
}

.dongle-stat-value.warning {
    color: #fbbf24;
}

.dongle-stat-value.critical {
    color: #f87171;
}

/* Pi Health Panel */
.pi-health-panel {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
}

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

.pi-health-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.pi-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.pi-health-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 1rem;
}

.pi-health-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #334155;
}

.pi-name {
    font-weight: 600;
    font-size: 1rem;
}

.pi-health-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.pi-health-status.ok {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.pi-health-status.warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.pi-health-status.critical {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.pi-health-status.degraded {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.pi-health-status.unreachable,
.pi-health-status.unknown {
    background: rgba(100, 116, 139, 0.2);
    color: #94a3b8;
}

.pi-health-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.pi-health-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.pi-health-row .label {
    color: #94a3b8;
}

.pi-health-row .value {
    font-weight: 500;
}

.pi-health-row .value.temp-ok {
    color: #4ade80;
}

.pi-health-row .value.temp-warning {
    color: #fbbf24;
}

.pi-health-row .value.temp-critical {
    color: #f87171;
}

.pi-health-row .value.healthy {
    color: #4ade80;
}

.pi-health-row .value.unhealthy {
    color: #f87171;
}

.pi-health-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #334155;
}

.pi-health-actions .btn {
    flex: 1;
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
}

/* Pi Alert Banner */
.pi-alert-banner {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pi-alert-banner.hidden {
    display: none;
}

.pi-alert-banner .alert-icon {
    color: #f87171;
    font-size: 1.25rem;
}

.pi-alert-banner .alert-message {
    color: #fca5a5;
    font-size: 0.875rem;
}

/* Accumulator Tabs */
.accumulator-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.accumulator-tab {
    padding: 0.5rem 1rem;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 6px;
    color: #94a3b8;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.accumulator-tab:hover {
    color: #e2e8f0;
    border-color: #475569;
}

.accumulator-tab.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.cache-section {
    display: none;
}

.cache-section.active {
    display: block;
}

/* Error List */
.card {
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    padding: 1rem;
}

.card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.error-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.error-entry {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(248, 113, 113, 0.05);
    border-radius: 6px;
    border-left: 3px solid #f87171;
}

.error-entry.api_down {
    border-left-color: #f87171;
}

.error-entry.rate_limited {
    border-left-color: #fbbf24;
}

.error-entry.captcha_failed {
    border-left-color: #a78bfa;
}

.error-entry.network_error {
    border-left-color: #fb923c;
}

.error-entry.invalid_input {
    border-left-color: #94a3b8;
}

.error-time {
    color: #64748b;
    font-size: 0.75rem;
    white-space: nowrap;
}

.error-content {
    flex: 1;
}

.error-message {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.error-meta {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #1e293b;
    border-radius: 8px;
    border: 1px solid #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-color: #4ade80;
}

.toast.error {
    border-color: #f87171;
}

.toast.info {
    border-color: #3b82f6;
}

.toast-message {
    font-size: 0.875rem;
}

.toast-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    padding: 1rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5vh;
}

.modal-content {
    background: #1e293b;
    border-radius: 12px;
    border: 1px solid #334155;
    max-width: 800px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.2s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #334155;
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #e2e8f0;
}

.modal-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-body pre {
    background: #0f172a;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-x: auto;
    color: #e2e8f0;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .tabs {
        overflow-x: auto;
    }

    .content {
        padding: 1rem;
    }

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

    .filters {
        flex-direction: column;
    }

    .filters select,
    .filters input,
    .btn {
        width: 100%;
    }

    /* Table scrolling on mobile */
    .data-table {
        min-width: 700px;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    /* Accumulator tabs scrolling */
    .accumulator-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.5rem;
    }

    .accumulator-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}
