/* Traffic Filter Admin Panel - Minimalist Dark Theme */

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-card: #141414;
    --bg-hover: #1f1f1f;
    --bg-input: #0d0d0d;
    
    --border-primary: #2a2a2a;
    --border-secondary: #333333;
    --border-focus: #555555;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --text-dim: #444444;
    
    --accent-primary: #ffffff;
    --accent-success: #22c55e;
    --accent-warning: #eab308;
    --accent-danger: #ef4444;
    --accent-info: #3b82f6;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
    
    --transition: all 0.2s ease;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

    --sidebar-width: 240px;
    --icon-size: 18px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #0d0d0d;
    border-right: 1px solid var(--border-primary);
    position: fixed;
    height: 100vh;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 2px;
}

/* Brand / Logo */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--border-primary);
    flex-shrink: 0;
    text-decoration: none;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    border-radius: 9px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59,130,246,0.4);
}

.brand-icon svg,
.brand-icon i {
    width: 18px !important;
    height: 18px !important;
    stroke: #ffffff !important;
    stroke-width: 2 !important;
    flex-shrink: 0;
    display: block;
}

.brand-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}

/* Keep old .sidebar-header for login page etc */
.sidebar-header {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border-primary);
}

.sidebar-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Nav */
.sidebar-nav {
    padding: 10px 0;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    color: #6b7280;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
    font-size: 13px;
    font-weight: 500;
    margin: 2px 8px;
    border-radius: 8px;
    position: relative;
    line-height: 1;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: #e5e7eb;
}

.nav-item:hover i,
.nav-item:hover svg {
    stroke: #e5e7eb !important;
    opacity: 1;
}

.nav-item.active {
    background: rgba(59,130,246,0.12);
    color: #60a5fa;
}

.nav-item.active i,
.nav-item.active svg {
    stroke: #60a5fa !important;
    opacity: 1;
}

/* Active left bar — absolute so never shifts layout */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 5px;
    bottom: 5px;
    width: 3px;
    background: #3b82f6;
    border-radius: 0 2px 2px 0;
}

/* Lucide SVG icons inside nav items */
.nav-item > i,
.nav-item > svg {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0;
    stroke-width: 1.8;
    stroke: #6b7280;
    opacity: 0.9;
    transition: stroke 0.15s, opacity 0.15s;
    display: block;
}

/* Legacy .icon span support (fallback) */
.nav-item .icon {
    width: var(--icon-size);
    text-align: center;
    flex-shrink: 0;
}

/* Sidebar footer: logout pinned to bottom */
.sidebar-footer {
    flex-shrink: 0;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border-primary);
    margin-top: auto;
}

.nav-logout {
    color: #4b5563;
}

.nav-logout:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.08);
}

.nav-logout:hover i,
.nav-logout:hover svg {
    stroke: #ef4444 !important;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
    background: var(--bg-primary);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-primary);
}

.content-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-secondary);
    background: var(--bg-tertiary);
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    flex-shrink: 0;
}

.stat-icon svg,
.stat-icon i {
    width: 20px;
    height: 20px;
    stroke: var(--text-secondary);
    stroke-width: 1.75;
    flex-shrink: 0;
}

.stat-icon.icon-users svg   { stroke: var(--accent-success); }
.stat-icon.icon-bots svg    { stroke: var(--accent-warning); }
.stat-icon.icon-blocked svg { stroke: var(--accent-danger); }
.stat-icon.icon-info svg    { stroke: var(--accent-info); }

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
    font-family: var(--font-mono);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.stat-change {
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: var(--accent-success); }
.stat-change.negative { color: var(--accent-danger); }

/* Content Section */
.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}

.content-section h2 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
    letter-spacing: -0.01em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
}

.section-header h2 {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 280px;
    margin: 20px 0;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.chart-card h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: -4px;
    padding: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-primary);
}

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.data-table th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr.row-blocked {
    background: rgba(239, 68, 68, 0.05);
    border-left: 2px solid var(--accent-danger);
}

.data-table tbody tr.row-bot {
    background: rgba(234, 179, 8, 0.03);
    border-left: 2px solid var(--accent-warning);
}

.cell-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Country Flags */
.country-flag {
    font-size: 16px;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
}

.badge-success { 
    background: rgba(34, 197, 94, 0.1); 
    color: var(--accent-success);
    border-color: rgba(34, 197, 94, 0.2);
}

.badge-warning { 
    background: rgba(234, 179, 8, 0.1); 
    color: var(--accent-warning);
    border-color: rgba(234, 179, 8, 0.2);
}

.badge-danger { 
    background: rgba(239, 68, 68, 0.1); 
    color: var(--accent-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.badge-info { 
    background: rgba(59, 130, 246, 0.1); 
    color: var(--accent-info);
    border-color: rgba(59, 130, 246, 0.2);
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-info);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Trust Score */
.trust-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 10px;
    border-radius: 100px;
    font-weight: 700;
    font-size: 12px;
    font-family: var(--font-mono);
}

.trust-high { 
    background: rgba(34, 197, 94, 0.15); 
    color: var(--accent-success);
}

.trust-medium { 
    background: rgba(234, 179, 8, 0.15); 
    color: var(--accent-warning);
}

.trust-low { 
    background: rgba(239, 68, 68, 0.15); 
    color: var(--accent-danger);
}

/* Trust Distribution Bar */
.trust-distribution {
    padding: 16px 0;
}

.trust-bar {
    display: flex;
    height: 40px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.trust-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    min-width: 80px;
    transition: var(--transition);
}

.trust-segment:hover {
    filter: brightness(1.1);
}

.trust-segment.high { 
    background: var(--accent-success); 
    color: #000;
}

.trust-segment.medium { 
    background: var(--accent-warning); 
    color: #000;
}

.trust-segment.low { 
    background: var(--accent-danger); 
    color: #fff;
}

/* Lucide icons in headings and general UI */
h1 svg, h1 i {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 8px;
    stroke-width: 1.75;
}

.content-section h2 i,
.content-section h2 svg,
.section-header h2 i,
.section-header h2 svg {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 6px;
    opacity: 0.6;
    stroke-width: 2;
}

.btn i, .btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 2;
    flex-shrink: 0;
}

.btn-icon i, .btn-icon svg {
    width: 16px;
    height: 16px;
}

.empty-message .icon i,
.empty-message .icon svg {
    width: 48px;
    height: 48px;
    stroke-width: 1;
    opacity: 0.25;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-secondary);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.btn-primary:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--accent-success);
    border-color: rgba(34, 197, 94, 0.3);
}

.btn-success:hover {
    background: rgba(34, 197, 94, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-info);
    border-color: rgba(59, 130, 246, 0.3);
}

.btn-info:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px;
    min-width: 36px;
}

.action-buttons {
    display: flex;
    gap: 6px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    background: var(--bg-secondary);
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-dim);
}

.form-inline {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.form-inline .form-group {
    margin-bottom: 0;
}

.form-inline input {
    min-width: 180px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-vertical .form-group {
    margin-bottom: 24px;
}

/* Filters */
.filters-form {
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 0;
    margin-top: 16px;
    border-top: 1px solid var(--border-primary);
}

.page-info {
    color: var(--text-muted);
    font-size: 13px;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
    color: var(--accent-success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--accent-info);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.tab-btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.tab-btn.active {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.tab-content {
    display: none;
    padding: 20px 0;
}

.tab-content.active {
    display: block;
}

/* Info Box */
.info-box {
    padding: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}

.info-box code {
    background: var(--bg-input);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
}

/* Empty Message */
.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 24px;
    font-size: 14px;
}

.empty-message .icon {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 16px;
}

/* Code Block */
.code-block {
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 20px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

code {
    background: var(--bg-tertiary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-primary);
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.setting-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    padding: 24px;
}

.setting-card h3 {
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-primary);
}

.setting-card ul {
    list-style: none;
}

.setting-card li {
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
}

.setting-card li:last-child {
    border-bottom: none;
}

.setting-card li strong {
    color: var(--text-primary);
}

/* Domain Stats Card */
.domain-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.domain-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.domain-card:hover {
    border-color: var(--border-secondary);
}

.domain-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
}

.domain-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.domain-id {
    font-size: 11px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 4px;
}

.domain-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-success);
}

.domain-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.domain-stat {
    text-align: center;
}

.domain-stat-value {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.domain-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.domain-stat-value.users { color: var(--accent-success); }
.domain-stat-value.bots { color: var(--accent-warning); }
.domain-stat-value.blocked { color: var(--accent-danger); }

/* Mini chart in domain card */
.domain-mini-chart {
    height: 40px;
    margin-top: 16px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.mini-bar {
    flex: 1;
    background: var(--border-primary);
    border-radius: 2px 2px 0 0;
    transition: var(--transition);
}

.mini-bar:hover {
    background: var(--text-secondary);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-content.modal-large {
    max-width: 900px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    background: none;
    border: none;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-primary);
}

.details-table {
    width: 100%;
}

.details-table th,
.details-table td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-primary);
    text-align: left;
    vertical-align: top;
}

.details-table th {
    width: 120px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
}

.details-table pre {
    margin: 0;
    font-size: 12px;
    max-height: 200px;
    overflow: auto;
    font-family: var(--font-mono);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-form input {
    padding: 10px 14px;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 13px;
    min-width: 160px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form {
    margin-bottom: 24px;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 12px;
}

/* Captcha Group */
.captcha-group {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.captcha-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.captcha-icon {
    font-size: 18px;
}

.captcha-question {
    color: var(--accent-info);
    font-size: 18px;
    font-family: var(--font-mono);
    padding: 4px 8px;
    background: var(--bg-input);
    border-radius: 4px;
}

.captcha-group input {
    text-align: center;
    font-size: 18px;
    font-family: var(--font-mono);
    letter-spacing: 2px;
}

/* Lockout Timer */
.lockout-timer {
    text-align: center;
    margin-top: 20px;
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: var(--accent-danger);
}

.lockout-timer #countdown {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 18px;
}

/* Disabled state for login */
.login-form input:disabled,
.login-form button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

/* Real-time indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--accent-success);
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Responsive */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 200px;
    }
    
    .main-content {
        padding: 24px;
    }
    
    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-primary);
    }
    
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 8px;
    }
    
    .nav-item {
        padding: 10px 16px;
        border-left: none;
        border-radius: var(--radius-md);
    }
    
    .nav-item.active {
        border-left-color: transparent;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .admin-layout {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .inline-form {
        flex-direction: column;
        width: 100%;
    }
    
    .inline-form input {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .domain-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .stat-value {
        font-size: 24px;
    }
}

/* ===== Notification Center ===== */
.notify-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    pointer-events: none;
}

.notify {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: notifySlideIn 0.3s ease-out;
    pointer-events: auto;
    min-width: 280px;
}

.notify.notify-hiding {
    animation: notifySlideOut 0.3s ease-in forwards;
}

.notify-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notify-content {
    flex: 1;
}

.notify-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notify-message {
    font-size: 13px;
    color: var(--text-secondary);
}

.notify-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    transition: var(--transition);
}

.notify-close:hover {
    color: var(--text-primary);
}

.notify.notify-success {
    border-left: 3px solid var(--accent-success);
}

.notify.notify-success .notify-icon {
    color: var(--accent-success);
}

.notify.notify-error {
    border-left: 3px solid var(--accent-danger);
}

.notify.notify-error .notify-icon {
    color: var(--accent-danger);
}

.notify.notify-warning {
    border-left: 3px solid var(--accent-warning);
}

.notify.notify-warning .notify-icon {
    color: var(--accent-warning);
}

.notify.notify-info {
    border-left: 3px solid var(--accent-info);
}

.notify.notify-info .notify-icon {
    color: var(--accent-info);
}

@keyframes notifySlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notifySlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ===== Confirm Modal ===== */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: modalFadeIn 0.2s ease-out;
    backdrop-filter: blur(4px);
}

.confirm-modal.confirm-hiding {
    animation: modalFadeOut 0.2s ease-in forwards;
}

.confirm-dialog {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.2s ease-out;
}

.confirm-hiding .confirm-dialog {
    animation: modalSlideOut 0.2s ease-in forwards;
}

.confirm-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

.confirm-message {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.5;
}

.confirm-message code {
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--text-primary);
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-actions .btn {
    min-width: 100px;
    padding: 10px 20px;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

/* ===== Row highlight for blocked ===== */
.data-table tbody tr.row-blocked {
    background: rgba(239, 68, 68, 0.1);
}

.data-table tbody tr.row-blocked td {
    color: #f87171;
}

.data-table tbody tr.row-blocked:hover {
    background: rgba(239, 68, 68, 0.15);
}

.data-table tbody tr.row-trusted {
    background: rgba(34, 197, 94, 0.1);
}

.data-table tbody tr.row-trusted td {
    color: #4ade80;
}

.data-table tbody tr.row-trusted:hover {
    background: rgba(34, 197, 94, 0.15);
}
