:root {
    --bg-base: #090d16;
    --bg-surface: #0f172a;
    --bg-card: rgba(22, 30, 49, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.15);
    
    --success: #10b981;
    --info: #38bdf8;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    
    --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(56, 189, 248, 0.08) 0px, transparent 50%),
        linear-gradient(180deg, #090d16 0%, #0d1322 100%);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

.ltr-text {
    direction: ltr !important;
    display: inline-block;
    text-align: left;
}

/* Glass panel effect */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    gap: 1.25rem;
    padding: 1.25rem;
    max-width: 1750px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    height: calc(100vh - 2.5rem);
    position: sticky;
    top: 1.25rem;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.brand-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #fff;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    direction: ltr;
    text-align: right;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
    width: 100%;
}

.nav-item i {
    font-size: 1.25rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--primary-light);
    color: #818cf8;
    border-right: 3px solid var(--primary);
    font-weight: 600;
}

/* Server Status Card in Sidebar */
.server-status-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    margin-top: 1.5rem;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--success);
}

.live-dot.pulse {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #e2e8f0;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.45rem;
}

.storage-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.6rem 0;
}

.storage-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #a855f7);
    border-radius: 3px;
}

.server-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.8rem;
}

.badge {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-family: monospace;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-info { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }

/* Main Body */
.main-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

/* Top bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.5rem;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    width: 380px;
    transition: border-color 0.2s;
}

.search-box:focus-within {
    border-color: var(--primary);
}

.search-box i {
    color: var(--text-dim);
    font-size: 1.1rem;
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.network-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-family: monospace;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.admin-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-right: 0.75rem;
    border-right: 1px solid var(--border-color);
}

.admin-badge img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.admin-badge span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Tabs */
.tab-contents {
    flex-grow: 1;
}

.tab-pane {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

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

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1.3rem 1.5rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.stat-icon.upload { background: rgba(16, 185, 129, 0.12); color: #34d399; }
.stat-icon.download { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.stat-icon.connections { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.stat-icon.throughput { background: rgba(99, 102, 241, 0.12); color: #818cf8; }

.stat-meta {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin: 0.2rem 0;
}

.stat-hint {
    font-size: 0.74rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.text-success { color: #34d399; }
.text-info { color: #38bdf8; }
.text-warning { color: #fbbf24; }
.text-muted { color: var(--text-muted); }

/* Buttons */
.primary-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    border: 1px solid var(--border-color);
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.btn-lg {
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
}

/* Upload Container */
.upload-container {
    padding: 1.5rem;
}

.upload-dropzone {
    border: 2px dashed rgba(99, 102, 241, 0.4);
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.03);
    padding: 2.5rem 1.5rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    transform: scale(0.995);
}

.drop-icon {
    font-size: 3.8rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.upload-dropzone h3 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    color: #fff;
}

.upload-dropzone p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.dropzone-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.hidden-input {
    display: none;
}

/* Upload in progress */
.dropzone-active-upload {
    text-align: right;
    max-width: 600px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

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

.upload-header-info h4 {
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.upload-header-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.icon-btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
}

.progress-container {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #38bdf8);
    transition: width 0.2s ease;
}

.upload-metrics {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Section Card */
.section-card {
    padding: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.card-header h2 {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 700;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.header-filters {
    display: flex;
    gap: 0.4rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Table */
.file-table-wrapper {
    overflow-x: auto;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.9rem;
}

.file-table th {
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.82rem;
    border-bottom: 1px solid var(--border-color);
}

.file-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.file-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.file-name-cell {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.file-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.file-type-icon.archive { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.file-type-icon.video { background: rgba(168, 85, 247, 0.12); color: #c084fc; }
.file-type-icon.database { background: rgba(56, 189, 248, 0.12); color: #38bdf8; }
.file-type-icon.iso { background: rgba(239, 68, 68, 0.12); color: #f87171; }

.file-details h5 {
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.2rem;
    direction: ltr;
    text-align: right;
    font-family: monospace;
}

.file-details span {
    font-size: 0.78rem;
    color: var(--text-dim);
}

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

.btn-download-action {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-download-action:hover {
    background: var(--primary);
    color: #fff;
}

/* Buckets Grid */
.buckets-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.bucket-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s;
}

.bucket-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-highlight);
}

.bucket-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.bucket-header i {
    font-size: 2rem;
    color: var(--primary);
}

.bucket-header h4 {
    font-size: 1rem;
    color: #fff;
    font-family: monospace;
    direction: ltr;
    text-align: right;
}

.bucket-header span {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.bucket-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
}

.metric-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.metric-line strong {
    color: #fff;
}

/* Speedtest tab */
.speedtest-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.speedtest-control-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    font-size: 0.88rem;
    color: #e2e8f0;
    font-weight: 500;
}

.pill-group {
    display: flex;
    gap: 0.6rem;
}

.pill-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-family: monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.pill-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.custom-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

.speedtest-actions {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.speedtest-gauges {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.gauge-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.4rem;
    text-align: center;
}

.gauge-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.gauge-value {
    font-size: 2.8rem;
    font-weight: 900;
    color: #38bdf8;
    margin: 0.5rem 0;
    letter-spacing: -1px;
}

.gauge-value small {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-dim);
}

.gauge-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0 0.85rem 0;
}

.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.3s ease;
}

.gauge-sub {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: monospace;
}

.gauge-info {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.speedtest-log-box {
    background: #050811;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.2rem;
    font-family: 'Courier New', Courier, monospace;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.5rem;
}

#speedtest-terminal {
    font-size: 0.8rem;
    color: #38bdf8;
    line-height: 1.6;
    max-height: 180px;
    overflow-y: auto;
    white-space: pre-wrap;
    direction: ltr;
    text-align: left;
}

/* Monitor tab */
.chart-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-color.download { background: #38bdf8; }
.legend-color.upload { background: #10b981; }

.canvas-container {
    width: 100%;
    background: rgba(5, 8, 17, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1.25rem;
    overflow: hidden;
}

#traffic-canvas {
    width: 100%;
    height: 280px;
    display: block;
}

.monitor-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.monitor-stat {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.monitor-stat span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.monitor-stat strong {
    font-size: 1.15rem;
}

/* API Docs tab */
.api-docs-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.api-endpoint-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.6rem;
}

.http-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: monospace;
}

.http-badge.get { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.http-badge.post { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.http-badge.head { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.endpoint-header code {
    font-size: 1rem;
    font-family: monospace;
    color: #fff;
    direction: ltr;
}

.api-endpoint-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.code-block {
    background: #050811;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: monospace;
    font-size: 0.82rem;
    color: #a5b4fc;
    overflow-x: auto;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 9999;
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.85rem 1.4rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.88rem;
    animation: toast-in 0.3s ease;
    border-right: 4px solid var(--primary);
}

.toast.success { border-right-color: var(--success); }
.toast.info { border-right-color: var(--info); }
.toast.error { border-right-color: var(--danger); }

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

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

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Responsive adjustments */
@media (max-width: 1300px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .buckets-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    .speedtest-grid {
        grid-template-columns: 1fr;
    }
    .monitor-details-grid {
        grid-template-columns: 1fr;
    }
}
