/* ==========================================
   Domain Checker — Premium Dark Theme
   With Auction Support
   ========================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #111118;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --bg-input: #1a1a25;
    --bg-sidebar: #0d0d14;

    --border: #252533;
    --border-hover: #3a3a4d;
    --border-focus: #6366f1;

    --text-primary: #e8e8ef;
    --text-secondary: #9595a8;
    --text-muted: #5c5c6e;

    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-soft: rgba(99, 102, 241, 0.15);

    --success: #10b981;
    --success-soft: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.15);
    --info: #3b82f6;
    --info-soft: rgba(59, 130, 246, 0.15);

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ==================== LOGIN PAGE ==================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 30%, rgba(99, 102, 241, 0.08) 0%, transparent 60%),
                var(--bg-primary);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.5s ease;
}

.login-logo .logo-icon { font-size: 48px; display: block; margin-bottom: 16px; }

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }

.btn-google {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 32px;
    background: #fff;
    color: #333;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-google:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); transform: translateY(-1px); }

.login-note { margin-top: 24px; font-size: 12px; color: var(--text-muted); }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: 13px; text-align: left; }
.alert-error { background: var(--danger-soft); border: 1px solid rgba(239, 68, 68, 0.3); color: #fca5a5; }

/* ==================== APP LAYOUT ==================== */
.app-layout { display: flex; min-height: 100vh; }

/* ==================== SIDEBAR ==================== */
.sidebar {
    width: 200px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.logo-icon-sm { font-size: 22px; }

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav { padding: 12px; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
}

.nav-item:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.04); }
.nav-item.active { color: var(--accent); background: var(--accent-soft); }
.nav-icon { font-size: 16px; }

/* Sidebar Auction Section */
.sidebar-section {
    padding: 8px 12px;
    flex: 1;
    overflow-y: auto;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 8px 14px 4px;
}

.auction-list { display: flex; flex-direction: column; gap: 2px; }

.auction-sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-secondary);
    text-decoration: none;
}

.auction-sidebar-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text-primary); }
.auction-sidebar-item.active { background: rgba(255, 255, 255, 0.06); color: var(--text-primary); }

.auction-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.auction-sidebar-count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 8px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; overflow: hidden; }

.user-avatar { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--border); }

.user-avatar-placeholder {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600; flex-shrink: 0;
    border: 2px solid var(--border);
}

.user-details { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
    padding: 8px; color: var(--text-muted); text-decoration: none; font-size: 18px;
    transition: var(--transition); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; margin-left: 4px;
}
.btn-logout:hover { color: var(--danger); background: var(--danger-soft); }

/* ==================== MAIN CONTENT ==================== */
.main-content { flex: 1; margin-left: 200px; padding: 16px 20px; min-height: 100vh; }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ==================== STATS BAR ==================== */
.stats-bar {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.stat-value { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.stat-auctions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: stretch;
}

.stat-auction-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    min-width: 140px;
    border-left: 4px solid;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-auction-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
    pointer-events: none;
}

.stat-auction-card:hover { background: var(--bg-card-hover); transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-auction-card .stat-value { font-size: 22px; margin-bottom: 2px; }
.stat-auction-card .stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

/* ==================== TOOLBAR ==================== */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}

.toolbar-left { display: flex; flex-direction: column; gap: 4px; }
.toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-left: auto; }
.page-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.domain-count { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }

/* ==================== SEARCH & FILTERS ==================== */
.search-box { position: relative; }

.input-search {
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 8px 14px; color: var(--text-primary); font-family: var(--font);
    font-size: 13px; width: 220px; transition: var(--transition);
}
.input-search:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }

.filters-bar {
    display: flex; align-items: center; gap: 12px 16px; margin-bottom: 16px;
    padding: 12px 16px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); flex-wrap: wrap; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}

.filter-group { display: flex; align-items: center; gap: 4px; }
.filter-label { font-size: 11px; color: var(--text-muted); white-space: nowrap; font-weight: 500; }

.filter-select, .filter-input {
    background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 6px 10px; color: var(--text-primary); font-family: var(--font);
    font-size: 12px; cursor: pointer; transition: var(--transition);
}
.filter-select:hover, .filter-input:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
.filter-select:focus, .filter-input:focus { outline: none; border-color: var(--border-focus); background: var(--bg-card); }

.filter-input { width: 130px; }

.btn-apply {
    background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm);
    padding: 7px 18px; font-family: var(--font); font-size: 12px; font-weight: 700;
    cursor: pointer; transition: var(--transition); white-space: nowrap;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.btn-apply:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ==================== BUTTONS ==================== */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border: none; border-radius: var(--radius-sm);
    font-family: var(--font); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--transition); white-space: nowrap;
}

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

.btn-secondary { background: var(--bg-input); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { color: var(--text-primary); border-color: var(--border-hover); }

.btn-danger { background: var(--danger-soft); color: #fca5a5; }
.btn-danger:hover { background: rgba(239, 68, 68, 0.25); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); }

.btn-sm { padding: 5px 10px; font-size: 12px; }

.btn-icon {
    padding: 6px; min-width: 30px; justify-content: center;
    background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-secondary); cursor: pointer; transition: var(--transition); font-size: 14px;
}
.btn-icon:hover { color: var(--text-primary); border-color: var(--border-hover); background: var(--bg-card-hover); }

/* ==================== TABLE ==================== */
.table-container {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow-x: auto;
}

.domains-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: auto; }

.domains-table thead { position: sticky; top: 0; z-index: 10; }

.domains-table th {
    background: var(--bg-secondary); padding: 7px 5px; text-align: left;
    font-weight: 600; font-size: 11px; color: var(--text-secondary);
    border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none;
}

.domains-table th.sortable { cursor: pointer; }
.domains-table th.sortable:hover { color: var(--text-primary); }

.domains-table td {
    padding: 5px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.03); vertical-align: middle;
}

.domains-table tr:hover td { background: var(--bg-card-hover); }

.th-checkbox { width: 28px; text-align: center; }
.th-check { width: 28px; text-align: center; font-size: 13px; }
.th-actions { width: 60px; text-align: center; }
.th-auction { min-width: 80px; }
.th-atype { min-width: 70px; }
.th-date { min-width: 90px; }
.th-domain { min-width: 200px; }

.td-domain { font-weight: 600; cursor: pointer; color: var(--accent); transition: var(--transition); font-size: 14px; }
.td-domain:hover { color: var(--accent-hover); }

/* Duplicate highlight */
.td-domain.is-duplicate {
    position: relative;
}
.td-domain.is-duplicate::after {
    content: '⚡';
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.6;
}

/* Auction badge */
.auction-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.auction-type-badge {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    white-space: nowrap;
}

.auction-date {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.auction-date.today { color: var(--warning); font-weight: 600; }
.auction-date.past { color: var(--text-muted); text-decoration: line-through; }
.auction-date.soon { color: var(--success); font-weight: 500; }

/* Check status cells */
.check-cell {
    text-align: center; font-size: 14px; cursor: pointer;
    transition: var(--transition); position: relative; padding: 6px 2px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.02);
}
.check-cell:hover { background: var(--bg-card-hover) !important; transform: scale(1.1); z-index: 5; }

/* Status Backgrounds */
.check-cell.status-found { background: rgba(16, 185, 129, 0.05); }
.check-cell.status-not_found { background: rgba(239, 68, 68, 0.02); }
.check-cell.status-clean { background: rgba(16, 185, 129, 0.08); }
.check-cell.status-flagged { background: rgba(239, 68, 68, 0.1); }
.check-cell.status-running { background: rgba(245, 158, 11, 0.05); }
.check-cell.status-error { background: rgba(239, 68, 68, 0.05); }

.proxy-status-dot.active { background: var(--success); box-shadow: 0 0 6px var(--success); }
.proxy-status-dot.inactive { background: var(--danger); opacity: 0.4; }

/* Banned Words UI */
.banned-words-container {
    display: flex; flex-wrap: wrap; gap: 8px;
}

.banned-word-tag {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    padding: 4px 10px; border-radius: 6px; font-size: 13px; color: var(--text-primary);
    transition: all 0.2s;
}

.banned-word-tag:hover {
    background: rgba(255,255,255,0.08); border-color: var(--accent);
}

.banned-word-tag button {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 14px; line-height: 1; padding: 2px; display: flex; align-items: center;
}

.banned-word-tag button:hover {
    color: var(--danger);
}

.scan-progress-icon {
    display: flex; flex-direction: column; align-items: center; line-height: 1; gap: 2px;
}

.scan-progress-icon small {
    font-size: 8px; font-weight: 700; color: var(--text-muted);
}

.flagged-words-inline {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}

.flagged-word-mini {
    background: rgba(239, 68, 68, 0.15); color: var(--danger);
    padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 600;
}
.status-found { color: var(--success); }
.status-not_found { color: var(--text-muted); opacity: 0.5; }
.status-pending { color: var(--text-muted); opacity: 0.3; }
.status-running { color: var(--warning); animation: pulse-border 1.5s infinite; }
.status-error { color: var(--danger); font-weight: bold; }
.status-clean { color: var(--success); font-weight: 600; }
.status-flagged { color: var(--danger); font-weight: 800; text-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }

@keyframes pulse-border {
    0% { box-shadow: inset 0 0 0 0 rgba(245, 158, 11, 0); }
    50% { box-shadow: inset 0 0 8px 0 rgba(245, 158, 11, 0.2); }
    100% { box-shadow: inset 0 0 0 0 rgba(245, 158, 11, 0); }
}

.check-cell .tooltip {
    display: none; position: absolute; bottom: 100%; left: 50%;
    transform: translateX(-50%); background: var(--bg-secondary);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 6px 10px; font-size: 11px; white-space: nowrap;
    z-index: 20; color: var(--text-primary); box-shadow: var(--shadow);
}
.check-cell:hover .tooltip { display: block; }

/* Actions */
.actions-cell { display: flex; align-items: center; justify-content: center; gap: 4px; }

.loading-row td { text-align: center; padding: 40px; color: var(--text-muted); }

.empty-row td { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-row .empty-icon { font-size: 40px; margin-bottom: 12px; }
.empty-row .empty-title { font-size: 16px; font-weight: 500; color: var(--text-secondary); }
.empty-row .empty-text { font-size: 13px; margin-top: 6px; }

/* ==================== PAGINATION ==================== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 16px; }

.page-btn {
    padding: 6px 12px; background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text-secondary); font-family: var(--font);
    font-size: 13px; cursor: pointer; transition: var(--transition);
}
.page-btn:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text-muted); padding: 0 8px; }

/* ==================== BULK ACTIONS ==================== */
.bulk-actions {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 20px; display: flex; align-items: center; gap: 12px;
    box-shadow: var(--shadow-lg); z-index: 50; animation: slideUp 0.3s ease;
}
.bulk-count { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

/* ==================== MODALS ==================== */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px); z-index: 200; align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; animation: fadeIn 0.2s ease; }

.modal {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    width: 100%; max-width: 480px; max-height: 90vh; overflow: auto;
    box-shadow: var(--shadow-lg); animation: scaleIn 0.2s ease;
}
.modal-lg { max-width: 700px; }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-size: 16px; font-weight: 600; }

.modal-close {
    background: none; border: none; color: var(--text-muted); font-size: 22px;
    cursor: pointer; transition: var(--transition); padding: 4px; line-height: 1;
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 10px 14px; color: var(--text-primary);
    font-family: var(--font); font-size: 14px; transition: var(--transition);
}
.input:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--accent-soft); }

.input-color { padding: 4px; height: 42px; cursor: pointer; }

.textarea { resize: vertical; min-height: 80px; }
.textarea-lg { min-height: 200px; }

/* CSV Preview */
.csv-preview {
    margin-top: 16px; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px; font-size: 12px; overflow-x: auto;
}
.csv-preview h4 { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.csv-preview table { width: 100%; font-size: 11px; }
.csv-preview th { color: var(--text-muted); padding: 4px 8px; text-align: left; }
.csv-preview td { color: var(--text-primary); padding: 4px 8px; }

/* ==================== ADMIN ==================== */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.admin-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); overflow: hidden;
}

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 15px; font-weight: 600; }

.card-body { padding: 16px 20px; max-height: 500px; overflow-y: auto; }

.whitelist-item, .user-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.03); font-size: 13px;
}
.whitelist-item:last-child, .user-item:last-child { border-bottom: none; }

.whitelist-email { color: var(--text-primary); font-weight: 500; }
.whitelist-date { color: var(--text-muted); font-size: 12px; }

.user-item-info { display: flex; align-items: center; gap: 10px; }

.user-item .user-avatar, .user-item .user-avatar-placeholder { width: 28px; height: 28px; font-size: 12px; }

.admin-badge {
    font-size: 10px; padding: 2px 6px; border-radius: 10px;
    background: var(--accent-soft); color: var(--accent); font-weight: 600;
}

/* Auction admin items */
.auction-admin-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.auction-admin-item:last-child { border-bottom: none; }

.auction-admin-info { display: flex; align-items: center; gap: 10px; }

.auction-color-dot {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}

.auction-admin-name { font-weight: 600; font-size: 14px; }
.auction-admin-meta { font-size: 12px; color: var(--text-muted); }

/* ==================== DETAIL MODAL ==================== */
.detail-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

.detail-check-card {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px;
}

.detail-check-card.flagged-border {
    border-color: var(--danger);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.detail-check-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}

.detail-check-name { font-weight: 600; font-size: 13px; color: var(--text-primary); }

.detail-check-status {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    padding: 2px 6px; border-radius: 10px; background: var(--bg-card);
}

.detail-check-status.found, .detail-check-status.clean { color: var(--success); }
.detail-check-status.not_found { color: var(--text-muted); }
.detail-check-status.flagged { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.detail-check-status.running { color: var(--warning); }

.detail-check-data { font-size: 12px; color: var(--text-secondary); }
.detail-check-data dd { margin-left: 0; color: var(--text-primary); }
.detail-check-data a { color: var(--accent); text-decoration: none; font-size: 11px; }
.detail-check-data a:hover { text-decoration: underline; }

/* ==================== SPINNER ==================== */
.spinner {
    display: inline-block; width: 24px; height: 24px;
    border: 2px solid var(--border); border-top-color: var(--accent);
    border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto;
}

/* ==================== TOAST ==================== */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }

.toast {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 16px; font-size: 13px; box-shadow: var(--shadow);
    animation: slideInRight 0.3s ease; display: flex; align-items: center; gap: 10px;
    min-width: 280px; max-width: 400px;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-info { border-left: 3px solid var(--info); }
.toast-warning { border-left: 3px solid var(--warning); }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ==================== WORKER MONITORING ==================== */
.worker-stats-summary {
    display: flex; gap: 16px; font-size: 13px; font-weight: 500; color: var(--text-secondary);
}
.worker-stat-item { display: flex; align-items: center; gap: 6px; }
.worker-stat-item b { color: var(--accent); }

.worker-monitor-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}

.worker-scan-card {
    background: var(--bg-secondary); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 12px; position: relative;
    transition: var(--transition);
}
.worker-scan-card:hover { border-color: var(--accent-hover); }

.scan-card-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;
}
.scan-card-domain { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.scan-card-time { font-size: 10px; color: var(--text-muted); }

.worker-progress-header {
    background: var(--bg-card);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    margin: 0px;
}

.worker-compact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 12px;
    padding: 16px;
}

.compact-row {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    transition: transform 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}

.compact-row:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.compact-domain {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.sub-task-mini {
    background: var(--bg-card);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.sub-task-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    color: var(--text-muted);
    font-weight: 500;
}

.sub-task-progress-bg {
    height: 4px;
    background: var(--bg-input);
    border-radius: 2px;
    overflow: hidden;
}

.sub-task-progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
    transition: width 0.4s ease;
}

.worker-empty {
    text-align: center; padding: 48px; color: var(--text-muted); font-size: 14px;
    grid-column: 1 / -1; font-style: italic;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .sidebar { width: 180px; }
    .main-content { margin-left: 180px; }
    .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { width: 60px; overflow: hidden; }
    .sidebar .sidebar-title, .sidebar .nav-item span:not(.nav-icon),
    .sidebar .user-details, .sidebar .sidebar-section { display: none; }
    .main-content { margin-left: 60px; }
    .toolbar { flex-direction: column; align-items: flex-start; }
    .toolbar-right { width: 100%; flex-wrap: wrap; }
    .input-search { width: 100%; }
    .filters-bar { flex-direction: column; align-items: flex-start; }
}

/* Worker Spinner Animation */
.spin {
    display: inline-block;
    animation: spin-anim 2s linear infinite;
}
@keyframes spin-anim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
