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

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #131b2e;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --glass-bg: rgba(19, 27, 46, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(139, 92, 246, 0.15);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Background Glowing Circles */
.background-decor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.4;
}

.circle-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blue) 0%, rgba(59, 130, 246, 0) 70%);
    top: -100px;
    left: -100px;
}

.circle-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple) 0%, rgba(139, 92, 246, 0) 70%);
    bottom: -150px;
    right: -100px;
}

.circle-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-green) 0%, rgba(16, 185, 129, 0) 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.2;
}

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

::-webkit-scrollbar-track {
    background: rgba(11, 15, 25, 0.5);
}

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

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

/* Glassmorphism Card Style */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Container */
.app-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 16px;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 24px;
    background: rgba(19, 27, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.4));
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(to right, #ffffff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.working {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border-color: rgba(59, 130, 246, 0.3);
}

.status-badge.working .dot {
    background-color: var(--accent-blue);
    box-shadow: 0 0 8px var(--accent-blue);
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-green);
}

/* Layout */
.app-content {
    display: block;
}

.content-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 24px;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}

/* Config Panel Left */
.config-panel {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
}

.config-panel h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 7px;
    line-height: 1.35;
}
.header-actions { display:flex; align-items:center; gap:12px; }
.auth-user { max-width:150px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#cbd5e1; font-size:.76rem; font-weight:700; }
.auth-action { display:inline-flex; align-items:center; gap:6px; padding:8px 10px; border:1px solid var(--glass-border); border-radius:9px; background:rgba(255,255,255,.04); color:#cbd5e1; text-decoration:none; cursor:pointer; }
.managed-proxy-note { padding:10px; border-radius:9px; background:rgba(16,185,129,.07); border:1px solid rgba(16,185,129,.15); color:#6ee7b7; font-size:.72rem; line-height:1.4; }
[hidden] { display:none !important; }
.auth-pending .proxy-feature { display:none !important; }
.proxy-denied .proxy-feature{display:none!important}
.password-input-shell{position:relative;width:100%}.password-input-shell>input{width:100%;padding-right:44px!important}.password-input-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--text-muted);cursor:pointer}.password-input-toggle:hover{background:rgba(99,102,241,.14);color:var(--text-primary)}
.deployment-status{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:6px 9px;border-radius:999px;font-size:.7rem;font-weight:800;white-space:nowrap}.deployment-status.running{color:#6ee7b7;background:rgba(16,185,129,.13);border:1px solid rgba(52,211,153,.28)}.deployment-status.stopped{color:#fca5a5;background:rgba(239,68,68,.1);border:1px solid rgba(248,113,113,.22)}
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,textarea:-webkit-autofill,select:-webkit-autofill{-webkit-text-fill-color:#e5e7eb!important;-webkit-box-shadow:0 0 0 1000px #0b1324 inset!important;caret-color:#fff!important;transition:background-color 9999s ease-out 0s}
.metric-vnd{display:block;margin-top:3px;color:#94a3b8;font-size:.68rem;font-weight:700;white-space:nowrap}
.form-group:has(> #curlCommand), .form-group:has(> #advCurlCommand), .form-group:has(> #monitorCurlCommand), .form-group:has(#curlCommand) { display:none !important; }
.notification-bell { position:relative; width:42px; height:42px; border-radius:12px; border:1px solid var(--glass-border); background:rgba(255,255,255,.04); color:#e2e8f0; cursor:pointer; font-size:1rem; }
.notification-bell:hover { border-color:var(--accent-purple); background:rgba(139,92,246,.14); }
.notification-bell span { position:absolute; top:-7px; right:-7px; min-width:20px; height:20px; padding:0 5px; border-radius:10px; background:#ef4444; color:#fff; font-size:.68rem; font-weight:800; display:grid; place-items:center; }
.settings-menu { position:relative; }
.settings-menu.open .notification-bell { border-color:rgba(139,92,246,.75); color:#fff; background:rgba(139,92,246,.16); box-shadow:0 0 0 3px rgba(139,92,246,.08); }
.settings-dropdown { position:absolute; z-index:1200; top:calc(100% + 12px); right:0; width:min(340px,calc(100vw - 24px)); padding:8px; border:1px solid rgba(148,163,184,.22); border-radius:16px; background:rgba(10,16,30,.98); box-shadow:0 22px 60px rgba(0,0,0,.52),0 0 0 1px rgba(139,92,246,.08); backdrop-filter:blur(20px); animation:settingsDropdownIn .16s ease-out; }
.settings-dropdown[hidden] { display:none!important; }
.settings-dropdown::before { content:""; position:absolute; top:-6px; right:15px; width:11px; height:11px; border-left:1px solid rgba(148,163,184,.22); border-top:1px solid rgba(148,163,184,.22); background:#0a101e; transform:rotate(45deg); }
.settings-dropdown-heading { display:flex; flex-direction:column; gap:2px; padding:10px 12px 11px; border-bottom:1px solid rgba(148,163,184,.14); }
.settings-dropdown-heading span { color:#f8fafc; font-size:.88rem; font-weight:800; }
.settings-dropdown-heading small { color:#7f8ca3; font-size:.7rem; }
.settings-menu-item { display:grid; grid-template-columns:40px minmax(0,1fr) 16px; align-items:center; gap:11px; width:100%; margin-top:6px; padding:11px; border:0; border-radius:12px; background:transparent; color:#dbe4f0; text-align:left; cursor:pointer; transition:background .16s ease,transform .16s ease; }
.settings-menu-item:hover { background:linear-gradient(135deg,rgba(59,130,246,.13),rgba(139,92,246,.18)); transform:translateY(-1px); }
.settings-menu-icon { display:grid; place-items:center; width:40px; height:40px; border-radius:11px; color:#c4b5fd; background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(139,92,246,.24)); border:1px solid rgba(139,92,246,.24); }
.settings-menu-item > span:nth-child(2) { display:flex; flex-direction:column; gap:3px; min-width:0; }
.settings-menu-item strong { color:#f8fafc; font-size:.82rem; }
.settings-menu-item small { color:#8895aa; font-size:.68rem; line-height:1.35; }
.settings-menu-arrow { color:#64748b; font-size:.68rem; transition:transform .16s ease,color .16s ease; }
.settings-menu-item:hover .settings-menu-arrow { color:#c4b5fd; transform:translateX(2px); }
@keyframes settingsDropdownIn { from { opacity:0; transform:translateY(-6px) scale(.98); } to { opacity:1; transform:none; } }
@media(max-width:620px) { .settings-dropdown { position:fixed; top:72px; right:12px; left:12px; width:auto; } .settings-dropdown::before { display:none; } }
.exclusion-filter-notice { display:grid; grid-template-columns:38px minmax(190px,1fr) auto auto; align-items:center; gap:14px; margin:16px 12px 20px; padding:12px 14px; border:1px solid rgba(139,92,246,.28); border-radius:14px; background:linear-gradient(135deg,rgba(59,130,246,.08),rgba(139,92,246,.1)); box-shadow:0 8px 25px rgba(0,0,0,.16); }
.exclusion-filter-notice[hidden] { display:none!important; }
.exclusion-filter-icon { display:grid; place-items:center; width:38px; height:38px; border-radius:11px; color:#c4b5fd; background:rgba(139,92,246,.18); border:1px solid rgba(167,139,250,.22); }
.exclusion-filter-copy,.exclusion-filter-result { display:flex; flex-direction:column; gap:2px; }
.exclusion-filter-copy strong { color:#e9e5ff; font-size:.78rem; }
.exclusion-filter-copy span,.exclusion-filter-result small { color:#8794a9; font-size:.68rem; }
.exclusion-filter-result { min-width:215px; padding:6px 12px; border-left:1px solid rgba(148,163,184,.18); }
.exclusion-filter-result strong { color:#cbd5e1; font-size:.75rem; }
.exclusion-filter-notice.has-filtered-results { border-color:rgba(52,211,153,.36); background:linear-gradient(135deg,rgba(16,185,129,.09),rgba(139,92,246,.08)); }
.exclusion-filter-notice.has-filtered-results .exclusion-filter-result strong { color:#6ee7b7; }
.exclusion-filter-manage { display:inline-flex; align-items:center; gap:6px; padding:8px 11px; border:1px solid rgba(148,163,184,.2); border-radius:9px; background:rgba(255,255,255,.04); color:#dbe4f0; font-size:.7rem; font-weight:700; cursor:pointer; }
.exclusion-filter-manage:hover { border-color:rgba(139,92,246,.6); background:rgba(139,92,246,.14); }
@media(max-width:760px) { .exclusion-filter-notice { grid-template-columns:38px 1fr auto; gap:10px; margin:12px 6px 16px; padding:11px; } .exclusion-filter-result { grid-column:2 / -1; grid-row:2; border-left:0; border-top:1px solid rgba(148,163,184,.14); padding:8px 0 0; } }
.traffic-trend-card { position:relative; display:flex; align-items:center; gap:8px; min-width:170px; }
.traffic-trend-card svg { width:112px; height:38px; overflow:visible; }
.traffic-trend-card polyline { fill:none; stroke:#2dd4bf; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.traffic-trend-card .traffic-trend-hit { fill:transparent; stroke:transparent; cursor:pointer; pointer-events:all; outline:none; }
.traffic-trend-card .traffic-trend-point { fill:#0f172a; stroke:#2dd4bf; stroke-width:1.5; pointer-events:none; transition:r .12s ease,fill .12s ease; }
.traffic-trend-card .traffic-trend-hit:hover + .traffic-trend-point,.traffic-trend-card .traffic-trend-hit:focus + .traffic-trend-point { r:4.8; fill:#2dd4bf; }
.traffic-trend-card > div { display:flex; flex-direction:column; gap:2px; white-space:nowrap; }
.traffic-trend-card span { color:#2dd4bf; font-size:.76rem; font-weight:800; }
.traffic-trend-card small { color:#64748b; font-size:.59rem; }
.traffic-trend-card.down polyline,.traffic-trend-card.down .traffic-trend-point { stroke:#fb7185; }
.traffic-trend-card.down .traffic-trend-hit:hover + .traffic-trend-point,.traffic-trend-card.down .traffic-trend-hit:focus + .traffic-trend-point { fill:#fb7185; }
.traffic-trend-card.down span { color:#fb7185; }
.traffic-trend-card.neutral polyline,.traffic-trend-card.neutral .traffic-trend-point { stroke:#94a3b8; }
.traffic-trend-card.neutral .traffic-trend-hit:hover + .traffic-trend-point,.traffic-trend-card.neutral .traffic-trend-hit:focus + .traffic-trend-point { fill:#94a3b8; }
.traffic-trend-card.neutral span { color:#94a3b8; }
.traffic-trend-empty { color:#64748b; font-size:.68rem; white-space:nowrap; }
.traffic-cell-with-trend { display:flex; align-items:center; gap:12px; min-width:285px; }
.traffic-cell-with-trend > div:first-child { min-width:95px; }
.traffic-trend-tooltip { position:absolute; z-index:40; bottom:calc(100% + 8px); transform:translateX(-50%); display:flex; flex-direction:column; gap:3px; min-width:132px; padding:8px 10px; border:1px solid rgba(45,212,191,.34); border-radius:9px; background:rgba(8,15,28,.98); box-shadow:0 10px 28px rgba(0,0,0,.48); pointer-events:none; white-space:nowrap; }
.traffic-trend-tooltip[hidden] { display:none!important; }
.traffic-trend-tooltip::after { content:""; position:absolute; top:100%; left:50%; width:8px; height:8px; border-right:1px solid rgba(45,212,191,.34); border-bottom:1px solid rgba(45,212,191,.34); background:#080f1c; transform:translate(-50%,-4px) rotate(45deg); }
.traffic-trend-tooltip small { color:#94a3b8; font-size:.62rem; }
.traffic-trend-tooltip strong { color:#f8fafc; font-size:.72rem; }
#advDomainResultsTable thead th[draggable="true"] { position:relative; cursor:grab; user-select:none; transition:background .14s ease,opacity .14s ease; }
#advDomainResultsTable thead th[draggable="true"]:active { cursor:grabbing; }
#advDomainResultsTable thead th.column-dragging { opacity:.42; background:rgba(139,92,246,.16); }
#advDomainResultsTable thead th.column-drop-before::before,#advDomainResultsTable thead th.column-drop-after::after { content:""; position:absolute; z-index:5; top:5px; bottom:5px; width:3px; border-radius:3px; background:#8b5cf6; box-shadow:0 0 9px rgba(139,92,246,.85); }
#advDomainResultsTable thead th.column-drop-before::before { left:-2px; }
#advDomainResultsTable thead th.column-drop-after::after { right:-2px; }
.monitor-box { display:grid; gap:10px; padding:14px; border:1px solid rgba(139,92,246,.24); border-radius:14px; background:rgba(139,92,246,.06); }
.monitor-title { color:#c4b5fd; font-weight:800; }
.monitor-box p { color:var(--text-muted); font-size:.75rem; line-height:1.45; }
.monitor-controls { display:grid; grid-template-columns:1fr auto; gap:8px; }
.monitor-interval-grid { display:grid; grid-template-columns:1fr 130px; gap:8px; }
.monitor-schedule-list { display:grid; gap:7px; color:var(--text-muted); font-size:.75rem; }
.monitor-schedule-item { padding:9px; border-radius:9px; background:rgba(15,23,42,.65); border:1px solid var(--glass-border); }
.monitor-schedule-item > div { display:flex; justify-content:space-between; gap:8px; }
.monitor-id-breakdown { display:grid !important; gap:5px !important; margin-top:8px; padding-top:8px; border-top:1px solid var(--glass-border); }
.monitor-live-progress{display:block!important;margin-top:10px;padding:11px 12px;border:1px solid rgba(59,130,246,.25);border-radius:11px;background:rgba(30,64,175,.09)}.monitor-progress-copy{display:flex!important;align-items:center;justify-content:space-between;gap:10px;color:#bfdbfe;font-size:.75rem;font-weight:750}.monitor-progress-copy strong{color:#60a5fa}.monitor-progress-track{display:block!important;height:7px;margin:8px 0 6px;overflow:hidden;border-radius:999px;background:rgba(148,163,184,.15)}.monitor-progress-track i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#3b82f6,#8b5cf6);box-shadow:0 0 12px rgba(99,102,241,.5);transition:width .35s ease}.monitor-live-progress small{display:block;color:var(--text-muted);font-size:.68rem}
.monitor-edit-row { grid-template-columns:minmax(90px,1fr) 120px auto auto; align-items:center; gap:8px !important; padding:10px; margin-top:8px; border-radius:10px; background:rgba(59,130,246,.07); border:1px solid rgba(96,165,250,.16); }
.monitor-edit-row[hidden] { display:none !important; }
.monitor-edit-row:not([hidden]) { display:grid !important; }
.monitor-edit-row input { width:100%; }
@media (max-width:600px) { .monitor-edit-row { grid-template-columns:1fr 1fr; } }
.monitor-edit { padding:5px 9px; border:1px solid rgba(96,165,250,.34); border-radius:8px; background:rgba(59,130,246,.12); color:#93c5fd !important; font-weight:750; }
.monitor-edit:hover { background:rgba(59,130,246,.24); border-color:rgba(96,165,250,.6); }
.domain-metrics-card { display:grid; gap:10px; padding:13px; margin-bottom:16px; border:1px solid rgba(96,165,250,.22); border-radius:12px; background:linear-gradient(145deg,rgba(30,41,59,.7),rgba(15,23,42,.55)); }
.domain-metrics-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.domain-metrics-heading > div { display:grid; gap:3px; }
.domain-metrics-heading strong { color:#e2e8f0; }
.domain-metrics-heading small,.domain-metrics-status { color:var(--text-muted); font-size:.72rem; }
.domain-metrics-result { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.domain-metrics-result[hidden] { display:none; }
.domain-metrics-result > div { display:grid; gap:4px; padding:9px; border-radius:9px; background:rgba(7,15,30,.62); border:1px solid rgba(148,163,184,.1); }
.domain-metrics-result span { color:var(--text-muted); font-size:.67rem; line-height:1.3; }
.domain-metrics-result strong { color:#5eead4; font-size:.9rem; overflow-wrap:anywhere; }
.domain-metrics-status.error { color:#f87171; }
@media (max-width:480px) { .domain-metrics-result { grid-template-columns:1fr; } }
.telegram-monitor-box { display:grid; gap:10px; padding:13px; margin-bottom:14px; border:1px solid rgba(56,189,248,.22); border-radius:12px; background:rgba(14,165,233,.055); }
.telegram-toggle { display:flex; align-items:center; gap:9px; margin:0; color:#7dd3fc; font-weight:750; cursor:pointer; }
.telegram-toggle input { width:auto; accent-color:#0ea5e9; }
.telegram-monitor-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.telegram-monitor-fields[hidden] { display:none; }
.telegram-monitor-fields .form-group { margin:0; }
.telegram-monitor-fields > small { grid-column:1/-1; color:var(--text-muted); font-size:.72rem; }
.telegram-test-row { grid-column:1/-1; display:flex; align-items:center; gap:10px; }
.telegram-test-row span { color:var(--text-muted); font-size:.72rem; overflow-wrap:anywhere; }
.telegram-test-row span.success { color:#34d399; }
.telegram-test-row span.error { color:#f87171; }
.telegram-monitor-fields input.has-saved-secret::placeholder { color:#34d399; opacity:1; font-weight:700; }
@media (max-width:520px) { .telegram-monitor-fields { grid-template-columns:1fr; } .telegram-monitor-fields > small { grid-column:auto; } }
.monitor-page-grid { display:grid; grid-template-columns:minmax(340px, 430px) minmax(0, 1fr); gap:20px; }
.monitor-schedule-page { padding:18px; }
@media (max-width: 1000px) { .monitor-page-grid { grid-template-columns:1fr; } }
.notification-modal[hidden] { display:none; }
.app-confirm-overlay{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:20px;background:rgba(2,6,23,.76);backdrop-filter:blur(10px);opacity:0;transition:opacity .18s ease}.app-confirm-overlay.visible{opacity:1}.app-confirm-dialog{width:min(470px,100%);display:grid;grid-template-columns:52px 1fr;gap:16px;padding:24px;border:1px solid rgba(139,92,246,.35);border-radius:20px;background:linear-gradient(145deg,rgba(20,29,48,.98),rgba(8,14,28,.98));box-shadow:0 24px 80px rgba(0,0,0,.5),0 0 40px rgba(124,58,237,.12);transform:translateY(10px) scale(.98);transition:transform .18s ease}.app-confirm-overlay.visible .app-confirm-dialog{transform:none}.app-confirm-icon{width:52px;height:52px;display:grid;place-items:center;border-radius:16px;color:#c4b5fd;background:linear-gradient(135deg,rgba(99,102,241,.22),rgba(139,92,246,.16));font-size:1.25rem}.app-confirm-dialog h3{margin:2px 0 8px;font:700 1.08rem Outfit,sans-serif;color:#f8fafc}.app-confirm-dialog p{margin:0;color:#aebbd0;font-size:.82rem;line-height:1.65}.app-confirm-actions{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px;margin-top:5px}.app-confirm-actions .btn{min-width:104px}.trace-user-chip{display:inline-flex;align-items:center;gap:7px;padding:5px 9px;border-radius:999px;color:#c4b5fd;background:rgba(139,92,246,.12);font-size:.72rem;font-weight:700}
.notification-modal { position:fixed; inset:0; z-index:9999; display:flex; justify-content:flex-end; }
.notification-backdrop { position:absolute; inset:0; background:rgba(2,6,23,.68); backdrop-filter:blur(3px); }
.notification-panel { position:relative; width:min(520px,100%); height:100%; padding:22px; background:linear-gradient(180deg,#101a30 0%,#0a1222 100%); border-left:1px solid rgba(148,163,184,.18); box-shadow:-24px 0 70px rgba(0,0,0,.5); overflow:auto; }
.notification-header { position:sticky; top:-22px; z-index:5; display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin:-22px -22px 0; padding:22px 22px 17px; border-bottom:1px solid rgba(148,163,184,.14); background:rgba(12,20,37,.94); backdrop-filter:blur(18px); }
.notification-header h2 { display:flex;align-items:center;gap:9px;font:800 1.08rem Outfit,sans-serif; }
.notification-header h2 i { color:#a78bfa; }
.notification-header small { display:block;margin-top:4px;color:#7f8ca3;font-size:.7rem; }
.notification-close { border:0; background:transparent; color:#fff; font-size:1.7rem; cursor:pointer; margin-left:10px; }
.notification-list { display:grid; gap:12px; margin-top:18px; }
.monitor-detail-panel { width:min(820px,100%); background:linear-gradient(180deg,#101a31 0%,#0b1324 100%); }
.monitor-detail-content { display:grid; gap:14px; margin-top:16px; }
.monitor-detail-id { padding:18px; border:1px solid rgba(148,163,184,.16); border-radius:16px; background:linear-gradient(145deg,rgba(30,41,59,.72),rgba(15,23,42,.6)); box-shadow:0 12px 28px rgba(0,0,0,.18); }
.monitor-detail-id h3 { font-size:1.05rem; color:#f8fafc; }
.monitor-domain-groups { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:10px; }
.monitor-domain-group { padding:13px; border-radius:12px; background:rgba(7,15,30,.62); border:1px solid rgba(148,163,184,.08); min-width:0; }
.monitor-domain-row { display:grid; grid-template-columns:minmax(100px,1fr) minmax(150px,auto); align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid var(--glass-border); font-size:.78rem; min-width:0; }
.monitor-domain-row > span:first-child { overflow-wrap:anywhere; }
.monitor-ad-link { display:grid; grid-template-columns:auto auto; justify-content:end; align-items:center; gap:2px 6px; min-width:0; padding:7px 9px; border:1px solid rgba(96,165,250,.24); border-radius:9px; background:rgba(59,130,246,.1); color:#93c5fd !important; text-decoration:none !important; line-height:1.1; }
.monitor-ad-link:hover { background:rgba(59,130,246,.2); border-color:rgba(96,165,250,.5); }
.monitor-ad-link small { grid-column:1/-1; max-width:175px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#64748b; font-size:.64rem; }
.monitor-new-label { color:#34d399; font-weight:800; }
.monitor-old-label { color:#94a3b8; font-weight:700; }
@media (max-width:650px) { .monitor-domain-groups { grid-template-columns:1fr; } }
.app-toast-stack { position:fixed; right:20px; top:20px; z-index:11000; width:min(420px,calc(100vw - 28px)); display:grid; gap:10px; pointer-events:none; }
.monitor-toast { position:relative; overflow:hidden; display:flex; align-items:flex-start; gap:12px; width:100%; padding:16px 44px 18px 17px; border:1px solid rgba(52,211,153,.35); border-radius:15px; background:linear-gradient(145deg,rgba(6,31,29,.98),rgba(8,22,30,.98)); color:#d1fae5; box-shadow:0 18px 50px rgba(0,0,0,.45); transform:translateX(calc(100% + 35px)); opacity:0; transition:transform .34s cubic-bezier(.2,.85,.25,1),opacity .28s ease; pointer-events:auto; }
.monitor-toast.show { transform:translateX(0); opacity:1; }
.monitor-toast.leaving { transform:translateX(calc(100% + 35px)); opacity:0; }
.monitor-toast.error { background:rgba(51,14,20,.97); border-color:rgba(248,113,113,.4); color:#fee2e2; }
.monitor-toast > i { margin-top:2px; font-size:1.15rem; }
.monitor-toast .toast-copy { display:grid; gap:4px; min-width:0; }
.monitor-toast span { color:#a7f3d0; font-size:.78rem; line-height:1.4; }
.monitor-toast.error span { color:#fecaca; }
.monitor-toast.warning { background:linear-gradient(145deg,rgba(55,34,10,.98),rgba(31,22,11,.98)); border-color:rgba(251,191,36,.45); color:#fef3c7; }
.monitor-toast.warning span { color:#fde68a; }
.toast-dismiss { position:absolute; right:10px; top:8px; width:28px; height:28px; display:grid; place-items:center; border:0; border-radius:8px; background:transparent; color:currentColor; opacity:.65; font-size:1.25rem; cursor:pointer; }
.toast-dismiss:hover { background:rgba(255,255,255,.1); opacity:1; }
.toast-progress { position:absolute; left:0; bottom:0; width:100%; height:3px; margin:0 !important; background:currentColor; opacity:.72; transform-origin:left; animation:toast-countdown 3s linear forwards; }
.monitor-toast:hover .toast-progress { animation-play-state:paused; }
@keyframes toast-countdown { to { transform:scaleX(0); } }
@media(max-width:600px){.app-toast-stack{right:12px;top:12px;width:calc(100vw - 24px)}}
.monitor-toast.rate-limit { width:min(440px,calc(100vw - 28px)); padding:17px 18px; background:linear-gradient(145deg,rgba(53,31,10,.98),rgba(31,20,9,.98)); border-color:rgba(251,191,36,.52); color:#fef3c7; box-shadow:0 22px 65px rgba(0,0,0,.55),0 0 0 1px rgba(251,191,36,.08) inset; }
.monitor-toast.rate-limit > i { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; border-radius:11px; background:rgba(251,191,36,.16); color:#fbbf24; }
.monitor-toast.rate-limit strong { font-size:.88rem; }
.monitor-toast.rate-limit span { color:#fde68a; line-height:1.55; }
.notification-item { position:relative; display:grid; grid-template-columns:38px minmax(0,1fr); gap:12px; padding:14px; border:1px solid rgba(96,165,250,.28); border-radius:15px; background:linear-gradient(145deg,rgba(30,49,79,.58),rgba(20,31,54,.72)); box-shadow:0 10px 26px rgba(0,0,0,.16); transition:transform .18s ease,border-color .18s ease,opacity .2s ease; }
.notification-item:hover { transform:translateY(-1px); border-color:rgba(96,165,250,.5); }
.notification-item.read { border-color:rgba(148,163,184,.13);background:rgba(20,30,49,.48);box-shadow:none;opacity:.68; }
.notification-item.read:hover { opacity:.9;border-color:rgba(148,163,184,.25); }
.notification-item.read .notification-item-accent { color:#7f8ca3;background:rgba(100,116,139,.1);border-color:rgba(148,163,184,.12); }
.notification-item.read .notification-item-domain { color:#a5b4c8; }
.notification-item.dismissing { opacity:0; transform:translateX(24px); }
.notification-item-accent { display:grid;place-items:center;width:38px;height:38px;border-radius:11px;color:#93c5fd;background:rgba(59,130,246,.14);border:1px solid rgba(96,165,250,.18); }
.notification-item-body { min-width:0; }
.notification-item-top { display:flex;align-items:center;justify-content:space-between;gap:10px; }
.notification-item-domain { color:#7cb8ff;font-size:.82rem;font-weight:800;line-height:1.35; }
.notification-new-dot { width:8px;height:8px;flex:0 0 8px;border-radius:50%;background:#60a5fa;box-shadow:0 0 10px rgba(96,165,250,.9); }
.notification-read-check { display:grid;place-items:center;width:18px;height:18px;flex:0 0 18px;border-radius:50%;color:#64748b;background:rgba(100,116,139,.12);font-size:.55rem; }
.notification-meta { margin-top:7px;color:#a7b4c8;font-size:.72rem;line-height:1.55; }
.notification-meta p { margin:0 0 5px; }
.notification-meta time { display:flex;align-items:center;gap:6px;margin-top:7px;color:#708099;font-size:.66rem; }
.notification-actions { display:flex;gap:8px;flex-wrap:wrap;margin-top:11px; }
.notification-primary-action,.notification-read-action { display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:7px 10px;border-radius:9px;font-size:.68rem;font-weight:750;cursor:pointer;text-decoration:none; }
.notification-primary-action { border:1px solid rgba(96,165,250,.35);background:rgba(59,130,246,.15);color:#bfdbfe; }
.notification-read-action { border:1px solid rgba(52,211,153,.25);background:rgba(16,185,129,.09);color:#86efcf; }
.notification-primary-action:hover,.notification-read-action:hover { filter:brightness(1.15); }
.notification-empty { display:grid;justify-items:center;gap:7px;padding:64px 20px;color:#64748b;text-align:center; }
.notification-empty i { display:grid;place-items:center;width:54px;height:54px;border-radius:18px;color:#6ee7b7;background:rgba(16,185,129,.1);font-size:1.35rem; }
.notification-empty strong { margin-top:5px;color:#cbd5e1;font-size:.86rem; }
.notification-empty span { font-size:.72rem; }

.form-group label i {
    flex: 0 0 auto;
    width: 14px;
    text-align: center;
}

.tooltip {
    font-size: 0.8rem;
    color: var(--accent-blue);
    cursor: pointer;
}

/* Form Inputs & Selects Global Dark Styling */
input[type="text"],
input[type="search"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="date"],
select,
.form-select,
.date-input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px;
    color: #ffffff !important;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.25s ease;
    box-sizing: border-box;
    min-width: 0;
    outline: none;
}

input[type="text"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
select:focus,
.form-select:focus,
.date-input:focus {
    outline: none;
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3) !important;
}

select option {
    background: #0f172a;
    color: #ffffff;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.input-with-icon input,
.input-with-icon select {
    padding-left: 40px !important;
}

textarea {
    width: 100%;
    height: 140px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px;
    color: #ffffff !important;
    font-family: monospace;
    font-size: 0.85rem;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.4;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3) !important;
}

/* Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn {
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.btn-danger:hover:not(:disabled) {
    background: var(--accent-red);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 185, 129, 0.4);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Console Card Terminal Styling */
.console-card {
    margin-top: 1rem;
    padding: 14px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.console-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-header h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-purple);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Outfit', sans-serif;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.console-body,
.console-log {
    background: rgba(10, 15, 26, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    height: 350px;
    min-height: 180px;
    max-height: 650px;
    padding: 12px;
    overflow-y: auto;
    resize: vertical;
    font-family: 'Consolas', 'Fira Code', monospace;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6);
}

.log-item {
    color: #cbd5e1;
    line-height: 1.5;
    word-break: break-all;
    white-space: pre-wrap;
    font-size: 0.8rem;
}

.log-item.system {
    color: #c084fc;
}

.log-item.success {
    color: #34d399;
}

.log-item.error {
    color: #f87171;
}

.log-item.info {
    color: #60a5fa;
}

.log-item.warning {
    color: #fbbf24;
}

/* Stats Cards */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.split-view {
    grid-template-columns: minmax(0, 1.7fr) minmax(360px, 0.8fr) !important;
    min-width: 0;
}

.split-view > .table-card {
    min-width: 0;
}

@media (max-width: 1350px) {
    .split-view {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

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

.stat-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(19, 27, 46, 0.75);
}

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

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.icon-green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

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

.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ffffff;
}

/* Progress Area */
.progress-container {
    padding: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.progress-bar-track {
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    background: linear-gradient(to right, var(--accent-blue), var(--accent-purple));
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

/* Table Area */
.table-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.table-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    padding: 10px 12px 10px 34px;
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.85rem;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    width: 300px;
}

.search-box input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.filter-select {
    padding: 10px 14px;
    background: rgba(10, 15, 26, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: var(--accent-blue);
}

.filter-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.filter-select option {
    background: #0f172a;
    color: #ffffff;
}

/* Custom Date Range Picker */
.custom-date-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid var(--accent-purple);
    border-radius: 8px;
    padding: 4px 10px;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
    animation: fadeIn 0.3s ease;
}

.date-input {
    background: rgba(10, 15, 26, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: #ffffff;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 0.8rem;
    outline: none;
    transition: all 0.2s ease;
}

.date-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.date-sep {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.btn-clear-date {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-clear-date:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Days Badge */
.badge-days {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-family: 'Outfit', sans-serif;
}

/* Expandable Row & Accordion Sub-table */
.expandable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.expandable-row:hover {
    background: rgba(59, 130, 246, 0.08) !important;
}

.btn-expand-row {
    background: transparent;
    border: none;
    color: var(--accent-blue);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 4px;
}

.icon-arrow {
    transition: transform 0.25s ease;
    display: inline-block;
}

.details-row {
    background: rgba(10, 15, 26, 0.95) !important;
}

.details-accordion-content {
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
    animation: fadeIn 0.25s ease;
}

.details-accordion-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    background: rgba(10, 15, 26, 0.6);
}

.sub-table th {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-muted);
    font-weight: 600;
    padding: 8px 12px;
    font-size: 0.78rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sub-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sub-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}

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

th {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
    color: #e5e7eb;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover:not(.empty-row) {
    background: rgba(255, 255, 255, 0.03);
}

.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-style: italic;
}

.text-center {
    text-align: center;
}

/* Table Badge components */
.badge-count {
    background: rgba(139, 92, 246, 0.15);
    color: #c084fc;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid rgba(139, 92, 246, 0.3);
    display: inline-block;
}

.format-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.format-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.tag-text {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.tag-image {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.tag-video {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.tag-other {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.table-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.table-link:hover {
    color: var(--accent-purple);
    text-decoration: underline;
}

/* Modal Styling */
.instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(7, 11, 20, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

.modal-content {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    position: relative;
    border-color: rgba(139, 92, 246, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.close-modal-btn:hover {
    color: #ffffff;
}

.modal-body ol {
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.modal-body a {
    color: var(--accent-blue);
    text-decoration: none;
}

.modal-body a:hover {
    text-decoration: underline;
}

/* Tabs Switcher Styles */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: var(--accent-blue);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* Tab Content Visibility */
.tab-content {
    display: none;
}

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

.table-scroll:has(#bulkTrafficTableBody) thead,
.table-scroll:has(#bulkTrafficTableBody) th {
    background: #111a2d;
}

@media (max-width: 980px) {
    #bulkTrafficFilters { grid-template-columns: 1fr 1fr !important; }
    #bulkTrafficFilters > :last-child { grid-column: 1 / -1; }
}

/* Premium domain scan progress */
.domain-scan-input-shell {
    position: relative;
}

.domain-scan-input-shell #targetDomain {
    padding-right: 48px;
}

.domain-quick-scan {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: rgba(164, 181, 207, .48);
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.domain-scan-input-shell:focus-within .domain-quick-scan {
    color: rgba(183, 206, 244, .72);
}

.domain-quick-scan:hover {
    color: #eef5ff;
    border-color: rgba(96, 165, 250, .25);
    background: linear-gradient(135deg, rgba(59, 130, 246, .2), rgba(139, 92, 246, .18));
    transform: translateY(-50%) scale(1.04);
}

.domain-quick-scan:active {
    transform: translateY(-50%) scale(.94);
}

.domain-quick-scan:disabled {
    opacity: .25;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.table-pagination {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(94, 118, 158, .2);
    border-radius: 13px;
    color: #8796ad;
    background: rgba(8, 16, 30, .66);
    font-size: .72rem;
}

.pagination-size,
.pagination-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-size select {
    height: 32px;
    padding: 0 28px 0 10px;
    border: 1px solid rgba(102, 126, 166, .28);
    border-radius: 8px;
    outline: none;
    color: #dbe6f7;
    background: #101b2e;
    font-size: .7rem;
    cursor: pointer;
}

.pagination-size select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

.pagination-summary {
    color: #aebbd0;
    text-align: center;
    white-space: nowrap;
}

.pagination-actions {
    justify-content: flex-end;
}

.pagination-actions button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(101, 126, 169, .25);
    border-radius: 9px;
    color: #a9b8ce;
    background: #121e32;
    cursor: pointer;
    transition: .18s ease;
}

.pagination-actions button:hover:not(:disabled) {
    color: #fff;
    border-color: rgba(96, 165, 250, .5);
    background: rgba(59, 130, 246, .16);
    transform: translateY(-1px);
}

.pagination-actions button:disabled {
    opacity: .28;
    cursor: not-allowed;
}

.pagination-actions span {
    min-width: 74px;
    color: #c7d2e4;
    text-align: center;
}

.table-pagination.compact {
    margin-top: 10px;
    padding: 9px 10px;
}

@media (max-width: 680px) {
    .table-pagination {
        grid-template-columns: 1fr auto;
    }
    .pagination-summary {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: left;
    }
}

.scan-progress-card {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    border: 1px solid rgba(91, 125, 181, .28);
    border-radius: 17px;
    background:
        radial-gradient(circle at 92% 0, rgba(139, 92, 246, .16), transparent 34%),
        linear-gradient(145deg, rgba(15, 27, 47, .98), rgba(9, 18, 33, .98));
    box-shadow: 0 18px 45px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .035);
}

.scan-progress-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -85px;
    top: -110px;
    border-radius: 50%;
    background: rgba(79, 140, 255, .16);
    filter: blur(38px);
    pointer-events: none;
}

.scan-progress-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 15px;
}

.scan-progress-icon {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(96, 165, 250, .24);
    border-radius: 13px;
    color: #8ab7ff;
    background: linear-gradient(135deg, rgba(59, 130, 246, .23), rgba(139, 92, 246, .2));
    box-shadow: 0 8px 24px rgba(64, 105, 220, .16);
}

.scan-progress-icon > span {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    border: 2px solid #101a2d;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 10px #34d399;
    animation: scanLivePulse 1.5s ease-in-out infinite;
}

@keyframes scanLivePulse {
    50% { opacity: .45; transform: scale(.78); }
}

.scan-progress-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
    flex: 1;
}

.scan-progress-copy small {
    color: #7183a0;
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .085em;
}

.scan-progress-copy strong {
    overflow: hidden;
    color: #f3f7ff;
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scan-progress-percent {
    min-width: 61px;
    padding: 8px 10px;
    border: 1px solid rgba(96, 165, 250, .24);
    border-radius: 11px;
    color: #a9c9ff;
    background: rgba(59, 130, 246, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    font-size: .87rem;
    font-weight: 850;
    text-align: center;
}

.scan-progress-track {
    position: relative;
    height: 11px;
    overflow: hidden;
    padding: 2px;
    border: 1px solid rgba(92, 116, 157, .22);
    border-radius: 999px;
    background: rgba(3, 9, 20, .72);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, .38);
}

.scan-progress-track .progress-bar-fill {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6 0%, #6366f1 48%, #a855f7 100%);
    box-shadow: 0 0 17px rgba(99, 102, 241, .56);
    transition: width .45s cubic-bezier(.22, 1, .36, 1);
}

.scan-progress-track .progress-bar-fill > i {
    position: absolute;
    inset: 0;
    width: 45%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .48), transparent);
    transform: skewX(-22deg);
    animation: scanProgressShimmer 1.5s linear infinite;
}

@keyframes scanProgressShimmer {
    from { left: -55%; }
    to { left: 125%; }
}

.scan-progress-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: #718098;
    font-size: .66rem;
}

.scan-progress-foot span:first-child {
    color: #7fa8e8;
}

.scan-progress-foot i {
    margin-right: 4px;
}

.scan-progress-card.is-paused .scan-progress-icon > span,
.scan-progress-card.is-paused .progress-bar-fill > i {
    animation-play-state: paused;
}

.scan-progress-card.is-paused .scan-progress-percent {
    color: #fcd34d;
    border-color: rgba(245, 158, 11, .3);
    background: rgba(245, 158, 11, .1);
}

.scan-progress-card.is-complete {
    border-color: rgba(52, 211, 153, .28);
}

.scan-progress-card.is-complete .scan-progress-percent,
.scan-progress-card.is-complete .scan-progress-foot span:first-child {
    color: #6ee7b7;
}

.scan-progress-card.is-complete .progress-bar-fill {
    background: linear-gradient(90deg, #10b981, #34d399);
}

.scan-progress-card.has-error {
    border-color: rgba(239, 68, 68, .35);
}

.scan-progress-card.has-error .scan-progress-percent {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .1);
}

@media (max-width: 620px) {
    .scan-progress-card { padding: 15px; }
    .scan-progress-copy strong { white-space: normal; }
    .scan-progress-foot { display: grid; gap: 5px; }
    .scan-progress-percent { min-width: 54px; padding-inline: 8px; }
}

/* API catalog */
.api-panel { padding: 28px; }
.api-panel-header, .api-base-url, .api-endpoint-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.api-panel-header h2 { font-family: 'Outfit', sans-serif; margin-bottom: 6px; }
.api-panel-header p, .api-endpoint-card p { color: var(--text-muted); font-size: 0.88rem; }
.api-environment {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid var(--glass-border);
}
.api-environment.is-local { color: #60a5fa; border-color: rgba(96, 165, 250, 0.35); }
.api-environment.is-vercel { color: #34d399; border-color: rgba(52, 211, 153, 0.35); }
.api-base-url {
    margin: 24px 0 14px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(10, 15, 26, 0.7);
    border: 1px solid var(--glass-border);
}
.api-base-url > div { display: flex; min-width: 0; flex-direction: column; gap: 6px; }
.api-base-url .api-base-actions {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    gap: 10px;
    margin-left: auto;
}
.api-base-url span, .api-endpoint-meta { color: var(--text-muted); font-size: 0.76rem; }
.api-base-url code, .api-endpoint-url { color: #c084fc; word-break: break-all; }
.api-status { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 14px; }
.api-status.error { color: #f87171; }
.api-status.warning { color: #fbbf24; }
.api-history-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    overflow-x: auto;
}
.api-history-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    border: 1px solid var(--glass-border);
    border-radius: 9px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    white-space: nowrap;
}
.api-history-tab span {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.15);
    font-size: 0.7rem;
}
.api-history-tab:hover { color: #fff; border-color: rgba(96, 165, 250, 0.45); }
.api-history-tab.active {
    color: #fff;
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.14);
}
.api-endpoint-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.api-endpoint-card {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 18px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--glass-border);
}
.api-endpoint-title { display: flex; align-items: center; gap: 9px; }
.api-method {
    min-width: 48px;
    padding: 4px 7px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 800;
}
.method-get { color: #34d399; background: rgba(16, 185, 129, 0.14); }
.method-post { color: #60a5fa; background: rgba(59, 130, 246, 0.14); }
.api-copy-btn {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid var(--glass-border);
    border-radius: 7px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}
.api-copy-btn:hover { color: #fff; border-color: var(--accent-blue); }
.api-call-status {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}
.api-call-status.success { color: #34d399; background: rgba(16, 185, 129, 0.12); }
.api-call-status.error { color: #f87171; background: rgba(239, 68, 68, 0.12); }
.api-proxy-ip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 11px;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 8px;
    color: var(--text-muted);
    background: rgba(16, 185, 129, 0.08);
    font-size: 0.78rem;
}
.api-proxy-ip strong { color: #34d399; font-family: monospace; }
.api-error-message {
    padding: 10px 12px;
    border: 1px solid rgba(239, 68, 68, 0.32);
    border-radius: 8px;
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.18);
    font-size: 0.82rem;
    line-height: 1.45;
}
.api-error-details summary { color: #f87171; }
.api-error-details pre { border: 1px solid rgba(239, 68, 68, 0.2); }
.api-payload-details {
    border-top: 1px solid var(--glass-border);
    padding-top: 10px;
}
.api-payload-details summary {
    color: #60a5fa;
    cursor: pointer;
    font-size: 0.8rem;
}
.api-payload-details pre {
    max-height: 320px;
    margin-top: 10px;
    padding: 12px;
    overflow: auto;
    border-radius: 8px;
    color: #cbd5e1;
    background: rgba(4, 8, 18, 0.8);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.76rem;
}
.api-history-empty {
    grid-column: 1 / -1;
    padding: 36px;
    border: 1px dashed var(--glass-border);
    border-radius: 12px;
    color: var(--text-muted);
    text-align: center;
}
.api-storage-warning {
    grid-column: 1 / -1;
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 9px;
    color: #fbbf24;
    background: rgba(120, 53, 15, 0.18);
    font-size: 0.82rem;
    line-height: 1.5;
}
.locked-filter-note {
    display: block;
    margin-top: 8px;
    color: #60a5fa;
    font-size: 0.78rem;
}

/* Visitor IP history */
.visitor-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 22px 0 16px;
    padding: 13px 15px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    background: rgba(10, 15, 26, 0.65);
    font-size: 0.82rem;
}
.visitor-history-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.visitor-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.72);
}
.visitor-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}
.visitor-card-header > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.visitor-card-header span { color: var(--text-muted); font-size: 0.75rem; }
.visitor-card-header .visitor-access-count {
    width: fit-content;
    padding: 3px 7px;
    border-radius: 999px;
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.12);
    font-weight: 700;
}
.visitor-primary-ip { color: #c084fc; font-family: monospace; }
.visitor-webrtc-badge {
    max-width: 50%;
    padding: 5px 8px;
    border-radius: 6px;
    text-align: right;
    overflow-wrap: anywhere;
}
.visitor-webrtc-badge.found { color: #34d399; background: rgba(16, 185, 129, 0.12); }
.visitor-webrtc-badge.missing { color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
.visitor-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}
.visitor-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}
.visitor-field span { color: var(--text-muted); font-size: 0.72rem; }
.visitor-field strong {
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.visitor-details {
    border-top: 1px solid var(--glass-border);
    padding-top: 10px;
}
.visitor-details summary { color: #60a5fa; cursor: pointer; font-size: 0.8rem; }
.visitor-details pre {
    max-height: 420px;
    margin-top: 10px;
    padding: 12px;
    overflow: auto;
    border-radius: 8px;
    color: #cbd5e1;
    background: rgba(4, 8, 18, 0.85);
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.75rem;
}
@media (max-width: 800px) {
    .api-endpoint-list { grid-template-columns: 1fr; }
    .api-panel-header, .api-base-url { align-items: flex-start; flex-direction: column; }
    .api-base-url .api-base-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
    .visitor-history-list, .visitor-fields-grid { grid-template-columns: 1fr; }
    .visitor-card-header { flex-direction: column; }
    .visitor-webrtc-badge { max-width: 100%; text-align: left; }
}

/* Creative Grid & Card Design */
.creative-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.creative-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.creative-media-box {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    background: #090c15;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
}

.creative-media-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.creative-media-box .no-img-placeholder {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.creative-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.creative-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.creative-meta-label {
    font-weight: 500;
}

.creative-meta-value {
    color: var(--text-main);
    font-size: 0.8rem;
}

.ocr-action-area {
    margin-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ocr-result-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-main);
    max-height: 80px;
}

.creative-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.creative-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}

.creative-media-box {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    background: #090c15;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
}

.creative-media-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.creative-media-box .no-img-placeholder {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.creative-details {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.creative-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.creative-meta-label {
    font-weight: 500;
}

.creative-meta-value {
    color: var(--text-main);
    font-size: 0.8rem;
}

.ocr-action-area {
    margin-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ocr-result-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-main);
    max-height: 80px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.ocr-badge-domain {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.3rem;
    font-weight: 600;
}

/* Global Proxy Toggle Pill (Modern iOS/Glassmorphism) */
.proxy-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 10px 3px 5px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}
.proxy-toggle-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}
.proxy-toggle-track {
    width: 34px;
    height: 18px;
    background: rgba(239, 68, 68, 0.3);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 20px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.proxy-toggle-pill.active .proxy-toggle-track {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: rgba(16, 185, 129, 0.6);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}
.proxy-toggle-thumb {
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 1px;
    left: 1px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.proxy-toggle-pill.active .proxy-toggle-thumb {
    transform: translateX(16px);
}

.proxy-status-text {
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}
/* Proxy Toggle Switch Pill (Ultra Modern Glassmorphism Pill) */
.proxy-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.65rem 0.25rem 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 30px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.proxy-toggle-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.proxy-toggle-track {
    width: 38px;
    height: 22px;
    background: rgba(239, 68, 68, 0.35);
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.proxy-toggle-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
}

/* Active State (ON) */
.proxy-toggle-pill.active {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.3);
}

.proxy-toggle-pill.active .proxy-toggle-track {
    background: rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.proxy-toggle-pill.active .proxy-toggle-thumb {
    left: 18px;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.proxy-status-text {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}
.proxy-status-text.proxy-on {
    color: #34d399;
}
.proxy-status-text.proxy-off {
    color: #f87171;
}

.badge-proxy-status {
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    user-select: none;
}
.badge-proxy-status.proxy-on {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-proxy-status.proxy-off {
    background: rgba(239, 68, 68, 0.15);
}

/* ==========================================
   Tab Navigation & Proxy Header Alignment Fixes
   ========================================== */
.tabs-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    width: 100%;
    flex-wrap: wrap;
}

.tab-btn {
    height: 44px;
    padding: 0 18px;
    border-radius: 22px;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    border-color: rgba(139, 92, 246, 0.5);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}

/* Active IP Badge Container - Aligned perfectly with Tab Buttons */
.active-ip-badge {
    height: 44px;
    padding: 0 14px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
    margin-left: auto;
    flex-shrink: 0;
}

/* Standalone Proxy Toggle Button - Fixed Min-Width to Prevent Layout Shift */
button.btn-proxy-toggle,
.btn-proxy-toggle {
    appearance: none;
    -webkit-appearance: none;
    outline: none !important;
    font-family: 'Inter', sans-serif !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 32px;
    min-width: 140px; /* Fixed width prevents jittering when text changes */
    padding: 0 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    background: rgba(16, 185, 129, 0.12) !important;
    color: #34d399 !important;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.15);
    flex-shrink: 0;
}

button.btn-proxy-toggle:hover,
.btn-proxy-toggle:hover {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
    background: rgba(16, 185, 129, 0.22) !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
}

.proxy-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.5);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.proxy-pill-knob {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    transition: all 0.25s ease;
}

.proxy-state-text {
    display: inline-block;
    min-width: 28px;
    text-align: center;
}

/* OFF State for Button */
button.btn-proxy-toggle.off,
.btn-proxy-toggle.off {
    border-color: rgba(239, 68, 68, 0.4) !important;
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.15);
}

button.btn-proxy-toggle.off:hover,
.btn-proxy-toggle.off:hover {
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
}

button.btn-proxy-toggle.off .proxy-pill-knob,
.btn-proxy-toggle.off .proxy-pill-knob {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

/* Active IP Address Label - Fixed Min-Width to Prevent Layout Jitter */
#activeIpAddress {
    display: inline-flex;
    align-items: center;
    min-width: 180px;
    flex-shrink: 0;
    font-family: monospace;
}

/* IP Badges in Top Header */
.badge-ip-proxy {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.35);
    margin-left: 6px;
    white-space: nowrap;
}

.badge-ip-direct {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid rgba(245, 158, 11, 0.35);
    margin-left: 6px;
    white-space: nowrap;
}

/* Refined proxy and current IP status card */
.tabs-container .active-ip-badge {
    height: 48px !important;
    min-width: 350px;
    padding: 5px 7px !important;
    gap: 8px !important;
    border-radius: 16px !important;
    border-color: rgba(148, 163, 184, 0.16) !important;
    background: linear-gradient(135deg, rgba(18, 27, 43, 0.92), rgba(9, 14, 25, 0.96)) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.tabs-container .btn-proxy-toggle {
    height: 36px !important;
    min-width: 142px;
    padding: 0 7px 0 10px !important;
    justify-content: flex-start;
    gap: 7px !important;
    border-radius: 11px !important;
    border: 1px solid rgba(52, 211, 153, 0.22) !important;
    background: rgba(16, 185, 129, 0.08) !important;
    box-shadow: none;
}

.tabs-container .btn-proxy-toggle:hover {
    transform: none;
    background: rgba(16, 185, 129, 0.14) !important;
    box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.08);
}

.tabs-container .btn-proxy-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.tabs-container .btn-proxy-toggle.off {
    color: #f87171 !important;
    border-color: rgba(248, 113, 113, 0.22) !important;
    background: rgba(239, 68, 68, 0.08) !important;
}

.tabs-container .proxy-badge-icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.12);
}

.tabs-container .btn-proxy-toggle.off .proxy-badge-icon {
    color: #fca5a5;
    background: rgba(248, 113, 113, 0.12);
}

.tabs-container .proxy-text-label {
    white-space: nowrap;
}

.tabs-container .proxy-status-pill {
    height: 24px;
    margin-left: auto;
    padding: 0 7px 0 4px !important;
    gap: 5px !important;
    border: 1px solid rgba(52, 211, 153, 0.16) !important;
    background: rgba(2, 6, 12, 0.5) !important;
}

.tabs-container .proxy-pill-knob {
    display: inline-block !important;
    width: 8px !important;
    height: 8px !important;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #34d399 !important;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12), 0 0 8px rgba(52, 211, 153, 0.7) !important;
}

.tabs-container .btn-proxy-toggle.off .proxy-status-pill {
    border-color: rgba(248, 113, 113, 0.16) !important;
}

.tabs-container .btn-proxy-toggle.off .proxy-pill-knob {
    background: #f87171 !important;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12), 0 0 8px rgba(248, 113, 113, 0.6) !important;
}

.tabs-container .proxy-state-text {
    font-size: 0.69rem;
    letter-spacing: 0.07em;
}

.tabs-container .active-ip-badge > div:nth-of-type(2) {
    height: 26px !important;
    background: linear-gradient(transparent, rgba(148, 163, 184, 0.24), transparent) !important;
}

.tabs-container .active-ip-badge > div:last-child {
    min-width: 0;
    padding: 0 8px 0 4px;
    gap: 8px !important;
}

.tabs-container .active-ip-badge > div:last-child > i {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 9px;
    color: #67e8f9 !important;
    background: rgba(34, 211, 238, 0.09);
    border: 1px solid rgba(34, 211, 238, 0.12);
}

.tabs-container .active-ip-badge > div:last-child > span {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.tabs-container #activeIpAddress {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 126px;
    font-size: 0.78rem;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .tabs-container .active-ip-badge {
        width: 100%;
        min-width: 0;
        margin-left: 0 !important;
    }

    .tabs-container .active-ip-badge > div:last-child {
        flex: 1;
    }
}

@media (max-width: 430px) {
    .tabs-container .active-ip-badge {
        height: auto !important;
        flex-wrap: wrap;
        border-radius: 18px !important;
    }

    .tabs-container .btn-proxy-toggle {
        flex: 1;
    }

    .tabs-container .active-ip-badge > div:nth-of-type(2) {
        display: none;
    }

    .tabs-container .active-ip-badge > div:last-child {
        flex-basis: 100%;
        padding: 5px 8px 6px;
    }
}

/* Keep navigation and connection status from competing for horizontal space */
.tabs-container {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
}

.tabs-container .tab-btn {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
    white-space: nowrap;
}

.tabs-container .active-ip-badge {
    grid-column: 1 / -1;
    justify-self: end;
    width: auto;
    min-width: 390px;
    margin-left: 0 !important;
}

.tabs-container .btn-proxy-toggle {
    min-width: 146px;
    flex-shrink: 0;
}

.tabs-container .active-ip-badge > div:last-child {
    flex-wrap: nowrap;
}

.tabs-container #activeIpAddress {
    width: auto;
    min-width: 142px;
    flex-shrink: 0;
}

@media (max-width: 980px) {
    .tabs-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tabs-container .active-ip-badge {
        width: 100%;
        min-width: 0;
        justify-self: stretch;
    }
}

@media (max-width: 560px) {
    .tabs-container {
        grid-template-columns: 1fr;
    }

    .tabs-container .active-ip-badge {
        grid-column: 1;
    }
}

/* Compact vertical Proxy/IP card: prevents horizontal overflow */
.tabs-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.tabs-container .tab-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    height: 64px;
    padding: 0 10px;
    line-height: 1.2;
    white-space: normal;
}

.tabs-container .active-ip-badge {
    display: flex !important;
    flex: 0 0 205px;
    flex-direction: column;
    align-items: stretch !important;
    justify-content: center;
    grid-column: auto;
    width: 205px;
    min-width: 205px;
    height: 64px !important;
    margin-left: 0 !important;
    padding: 5px 7px !important;
    gap: 3px !important;
    border-radius: 15px !important;
}

.tabs-container .btn-proxy-toggle {
    width: 100%;
    min-width: 0;
    height: 26px !important;
    padding: 0 7px !important;
    border: 0 !important;
    background: transparent !important;
}

.tabs-container .proxy-badge-icon {
    width: 19px;
    height: 19px;
    border-radius: 6px;
}

.tabs-container .proxy-status-pill {
    height: 21px;
}

.tabs-container .active-ip-badge > div:nth-of-type(2) {
    display: block;
    width: 100% !important;
    height: 1px !important;
    flex: 0 0 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.24), transparent) !important;
}

.tabs-container .active-ip-badge > div:last-child {
    width: 100%;
    height: 25px;
    padding: 0 7px;
    gap: 6px !important;
    flex: 0 0 25px;
    flex-wrap: nowrap;
}

.tabs-container .active-ip-badge > div:last-child > i {
    width: 19px;
    height: 19px;
    flex: 0 0 19px;
    border: 0;
    border-radius: 6px;
}

.tabs-container .active-ip-badge > div:last-child > span {
    flex: 0 0 auto;
    font-size: 0.65rem;
}

.tabs-container #activeIpAddress {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    justify-content: flex-end;
    font-size: 0.7rem;
}

.tabs-container #activeIpAddress .badge-ip-proxy,
.tabs-container #activeIpAddress .badge-ip-direct {
    display: none;
}

@media (max-width: 1050px) {
    .tabs-container {
        flex-wrap: wrap;
    }

    .tabs-container .tab-btn {
        flex-basis: calc(33.333% - 10px);
    }

    .tabs-container .active-ip-badge {
        flex-basis: 205px;
        width: 205px;
        min-width: 205px;
        margin-left: auto !important;
    }
}

@media (max-width: 620px) {
    .tabs-container .tab-btn {
        flex-basis: calc(50% - 5px);
    }

    .tabs-container .active-ip-badge {
        flex-basis: 100%;
        width: 100%;
        min-width: 0;
    }
}

/* =========================================================
   Responsive layout: tablets and phones
   ========================================================= */
@media (max-width: 1024px) {
    .app-container {
        padding: 18px;
    }

    .content-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .config-panel,
    .results-panel,
    .table-card,
    .api-panel,
    .tab-content {
        min-width: 0;
    }

    .config-panel {
        width: 100%;
    }

    .table-scroll {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-scroll table {
        min-width: 820px;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 12px;
    }

    .app-header {
        margin-bottom: 16px;
        padding: 14px 16px;
    }

    .logo-area {
        gap: 10px;
        min-width: 0;
    }

    .logo-icon {
        font-size: 1.65rem;
    }

    .logo-text h1 {
        font-size: 1.08rem;
        letter-spacing: 0.04em;
    }

    .logo-text span {
        font-size: 0.7rem;
    }

    .status-badge {
        flex: 0 0 auto;
        padding: 5px 9px;
        font-size: 0.72rem;
    }

    .tabs-container {
        gap: 8px;
        margin-bottom: 16px;
    }

    .tabs-container .tab-btn {
        min-height: 54px;
        height: auto;
        padding: 8px 10px;
        border-radius: 14px;
        font-size: 0.76rem;
    }

    .tabs-container .active-ip-badge {
        height: 62px !important;
    }

    .config-panel,
    .table-card,
    .api-panel {
        padding: 16px;
        border-radius: 14px;
    }

    .config-panel {
        gap: 16px;
    }

    .config-panel h2,
    .table-header h2,
    .table-header h3 {
        font-size: 1.05rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card {
        min-width: 0;
        padding: 14px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .stat-label {
        font-size: 0.68rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .table-header,
    .filter-controls,
    .api-panel-header,
    .api-base-url,
    .api-endpoint-top,
    .visitor-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .table-header .btn,
    .api-base-actions,
    .filter-controls > *,
    .search-box,
    .filter-group,
    .filter-select {
        width: 100%;
        max-width: none;
    }

    .filter-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .custom-date-row,
    .custom-date-box {
        grid-template-columns: 1fr;
        flex-wrap: wrap;
    }

    .api-endpoint-list,
    .visitor-history-list,
    .visitor-fields-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .modal-content {
        max-height: calc(100dvh - 24px);
        padding: 20px;
        overflow-y: auto;
    }
}

@media (max-width: 520px) {
    .app-container {
        padding: 8px;
    }

    .app-header {
        padding: 12px;
        border-radius: 12px;
    }

    .logo-icon,
    .logo-text span {
        display: none;
    }

    .logo-text h1 {
        font-size: 0.95rem;
    }

    .status-badge {
        padding: 5px 8px;
    }

    .tabs-container .tab-btn {
        flex-basis: calc(50% - 4px);
        font-size: 0.72rem;
    }

    .tabs-container .active-ip-badge {
        flex-basis: 100%;
        width: 100%;
        min-width: 0;
    }

    .config-panel,
    .table-card,
    .api-panel {
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .action-buttons {
        grid-template-columns: minmax(0, 1fr);
    }

    .action-buttons .btn,
    .btn-help {
        min-width: 0;
        width: 100%;
    }

    input,
    select,
    textarea,
    button {
        max-width: 100%;
    }

    textarea {
        min-height: 120px;
    }

    .console-body {
        max-height: 260px;
        font-size: 0.72rem;
    }

    .table-scroll table {
        min-width: 720px;
    }

    .empty-row td {
        padding: 28px 16px;
    }

    .modal-content {
        padding: 16px;
        border-radius: 14px;
    }
}

/* Saved advertiser IDs and manual Google Sheets export */
.saved-id-box[hidden] { display: none !important; }
.saved-id-actions,
.sheet-export-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.saved-id-count {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.sheet-export-box {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(52, 211, 153, 0.18);
    border-radius: 14px;
    background: rgba(16, 185, 129, 0.05);
    min-width: 0;
}
.sheet-export-title {
    justify-content: flex-start;
    color: #6ee7b7;
    font-weight: 800;
}
.sheet-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.sheet-export-box .form-group { min-width: 0; }
.sheet-export-box input { width: 100%; }
.sheet-export-box .btn { width: 100%; }
.sheet-field-picker {
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.42);
}
.sheet-field-picker-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 700;
}
.btn-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #6ee7b7;
    font: inherit;
    cursor: pointer;
}
.sheet-field-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}
.sheet-field-options label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    color: var(--text-muted);
    font-size: 0.76rem;
    cursor: pointer;
}
.sheet-field-options input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    accent-color: #10b981;
}
.keyword-metric-value { font-weight: 700; color: #e2e8f0; white-space: nowrap; }
.keyword-metric-empty { color: var(--text-muted); font-size: 0.75rem; }
.keyword-metric-error { color: #f87171; font-size: 0.75rem; }
.sheet-export-status {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}
.sheet-export-status.success { color: #34d399; }
.sheet-export-status.error { color: #f87171; }
@media (max-width: 520px) {
    .sheet-export-box { padding: 12px; gap: 10px; }
    .sheet-config-grid { grid-template-columns: minmax(0, 1fr); }
    .sheet-field-picker { padding: 10px; overflow: hidden; }
    .sheet-field-picker-title { align-items: flex-start; flex-wrap: wrap; gap: 6px 10px; }
    .sheet-field-picker-title .btn-link { width: auto; margin-left: auto; white-space: nowrap; }
    .sheet-field-options { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .sheet-field-options label {
        width: 100%;
        min-width: 0;
        padding: 8px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.025);
        line-height: 1.35;
        overflow-wrap: anywhere;
    }
}

.app-footer {
    width: min(1254px, calc(100% - 32px));
    margin: 8px auto 28px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: left;
    color: var(--text-muted);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}
.app-footer-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #a78bfa;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.app-footer strong { display: block; color: #e2e8f0; font-size: 0.86rem; }
.app-footer p { max-width: 680px; margin-top: 3px; font-size: 0.72rem; line-height: 1.5; }
@media (max-width: 520px) {
    .app-footer { width: calc(100% - 24px); padding: 16px 8px; align-items: flex-start; }
    .app-footer p { font-size: 0.7rem; }
}

/* Permission visibility must override later responsive display rules. */
body.auth-pending .proxy-feature,
body.proxy-denied .proxy-feature,
.proxy-feature[hidden] {
    display: none !important;
}
body.auth-pending .admin-feature,
body:not(.is-admin) .admin-feature,
.admin-feature[hidden] {
    display: none !important;
}
.country-filter-group {
    position: relative;
    z-index: 8;
}

.country-filter-group.is-open {
    z-index: 80;
}

.country-select {
    position: relative;
}

.country-select-trigger {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 13px;
    border: 1px solid rgba(112, 137, 181, .28);
    border-radius: 12px;
    color: var(--text-main);
    background: linear-gradient(135deg, rgba(10, 20, 38, .94), rgba(17, 27, 48, .92));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
    cursor: pointer;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.country-select-trigger:hover,
.country-filter-group.is-open .country-select-trigger {
    border-color: rgba(96, 165, 250, .72);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .1), 0 10px 28px rgba(0, 0, 0, .18);
}

.country-select-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #76a9ff;
    background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(139, 92, 246, .18));
}

.country-select-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
    flex: 1;
}

.country-select-copy strong {
    overflow: hidden;
    color: #f8fafc;
    font-size: .86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-select-copy small {
    color: #8291a9;
    font-size: .69rem;
}

.country-select-chevron {
    color: #7f8da4;
    font-size: .72rem;
    transition: transform .2s ease;
}

.country-filter-group.is-open .country-select-chevron {
    transform: rotate(180deg);
}

.country-select-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 120;
    overflow: hidden;
    padding: 9px;
    border: 1px solid rgba(100, 129, 181, .35);
    border-radius: 14px;
    background: rgba(8, 16, 31, .985);
    box-shadow: 0 22px 55px rgba(0, 0, 0, .52), 0 0 0 1px rgba(139, 92, 246, .05);
    backdrop-filter: blur(18px);
    animation: countryDropdownIn .18s ease-out;
}

.country-select-panel[hidden] {
    display: none;
}

@keyframes countryDropdownIn {
    from { opacity: 0; transform: translateY(-7px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.country-search {
    position: relative;
    margin-bottom: 7px;
}

.country-search > i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    color: #71809a;
    transform: translateY(-50%);
    pointer-events: none;
}

.country-search input[type="search"] {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 36px;
    border: 1px solid rgba(93, 116, 157, .3);
    border-radius: 10px;
    outline: none;
    color: #eef4ff;
    background: #0d182b;
    font-size: .78rem;
}

.country-search input[type="search"]:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.country-option-list {
    max-height: 286px;
    overflow-y: auto;
    padding-right: 3px;
    scrollbar-width: thin;
    scrollbar-color: #42516b transparent;
}

.country-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 0;
    border-radius: 10px;
    color: #dce5f3;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.country-option:hover {
    background: rgba(59, 130, 246, .11);
}

.country-option.is-selected {
    background: linear-gradient(90deg, rgba(59, 130, 246, .17), rgba(139, 92, 246, .1));
}

.country-option.popular-start {
    margin-top: 5px;
    border-top: 1px solid rgba(255,255,255,.07);
    border-radius: 0 0 10px 10px;
    padding-top: 12px;
}

.country-flag {
    width: 34px;
    height: 28px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(105, 133, 177, .25);
    border-radius: 8px;
    color: #9fc4ff;
    background: #111f36;
    font-size: .66rem;
    font-weight: 850;
    letter-spacing: .035em;
}

.country-flag.global {
    color: #67e8f9;
    font-size: 1rem;
}

.country-option-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
    flex: 1;
}

.country-option-copy strong {
    overflow: hidden;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.country-option-copy small {
    color: #74839b;
    font-size: .66rem;
}

.country-option-check {
    visibility: hidden;
    color: #5eead4;
    font-size: .72rem;
}

.country-option.is-selected .country-option-check {
    visibility: visible;
}

.country-empty {
    padding: 25px 10px;
    color: #7f8da4;
    font-size: .76rem;
    text-align: center;
}

.country-filter-hint {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: .68rem;
}

.country-filter-hint strong {
    color: #5eead4;
    font-weight: 700;
}

@media (max-width: 640px) {
    .country-select-panel {
        right: auto;
        width: min(340px, calc(100vw - 38px));
    }
}

.sortable-th {
    position: relative;
    padding-right: 25px !important;
    cursor: pointer;
    user-select: none;
    transition: color .18s ease, background .18s ease;
}

.sortable-th::after {
    content: "↕";
    position: absolute;
    right: 8px;
    color: #61708a;
    font-size: .72rem;
}

.sortable-th:hover {
    color: #dbeafe;
    background: rgba(59, 130, 246, .08);
}

.sortable-th.sort-asc::after { content: "↑"; color: #60a5fa; }
.sortable-th.sort-desc::after { content: "↓"; color: #60a5fa; }

.ocr-control-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.ocr-control-actions .btn {
    flex: 1;
}

/* API History Toggle Switch */
.api-history-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.api-filter-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 14px;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    user-select: none;
    font-size: 0.78rem;
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.toggle-switch-label:hover {
    border-color: rgba(99, 102, 241, 0.45);
    background: rgba(30, 41, 59, 0.85);
    color: #f1f5f9;
}

.toggle-switch-label input[type="checkbox"] {
    display: none;
}

.toggle-switch-label .toggle-slider {
    position: relative;
    width: 32px;
    height: 18px;
    background-color: rgba(71, 85, 105, 0.7);
    border-radius: 20px;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.toggle-switch-label .toggle-slider::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background-color: #ffffff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.toggle-switch-label input[type="checkbox"]:checked + .toggle-slider {
    background-color: #3b82f6;
}

.toggle-switch-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(14px);
}

.toggle-switch-label input[type="checkbox"]:checked ~ .toggle-text {
    color: #60a5fa;
    font-weight: 600;
}

/* Compact desktop density for the user-facing application only. */
@media (min-width: 1025px) {
    body { font-size: 14px; }
    .app-container { padding: 12px; }
    .app-header { margin-bottom: 18px; padding: 13px 20px; border-radius: 14px; }
    .logo-area { gap: 12px; }
    .logo-icon { font-size: 1.8rem; }
    .logo-text h1 { font-size: 1.2rem; }
    .logo-text span { font-size: .72rem; }
    .header-actions { gap: 9px; }
    .notification-bell { width: 36px; height: 36px; border-radius: 10px; }
    .auth-action { padding: 7px 9px; }
    .tabs-container { gap: 8px; margin-bottom: 18px; }
    .tabs-container .tab-btn, .tab-btn { min-height: 46px; height: 46px; padding: 0 14px; border-radius: 18px; font-size: .78rem; }
    .tabs-container .active-ip-badge, .active-ip-badge { min-height: 46px; height: 46px; padding: 0 11px; border-radius: 18px; font-size: .76rem; }
    .content-grid { grid-template-columns: 390px minmax(0, 1fr); gap: 18px; }
    .config-panel { padding: 19px; gap: 16px; }
    .config-panel h2 { font-size: 1.08rem; padding-bottom: 10px; }
    .form-group { gap: 6px; }
    .form-group label { font-size: .76rem; }
    input[type="text"], input[type="search"], input[type="number"], input[type="url"], input[type="password"], input[type="date"], select, .form-select, .date-input { padding: 8px 12px; border-radius: 9px; font-size: .8rem; }
    textarea { min-height: 118px; height: 118px; padding: 10px; font-size: .78rem; }
    .btn { padding: 10px 16px; border-radius: 9px; font-size: .84rem; }
    .results-panel { gap: 18px; }
    .stats-grid { gap: 14px; }
    .stat-card { padding: 16px; gap: 15px; }
    .stat-icon { width: 44px; height: 44px; font-size: 1.12rem; }
    .stat-label { font-size: .72rem; }
    .stat-value { font-size: 1.42rem; }
    .table-card { padding: 19px; gap: 16px; }
    .table-header { gap: 12px; }
    .table-header h2 { font-size: 1.08rem; }
    .glass-card { border-radius: 14px; }
}

/* Multi-level domain trace */
.competitor-result-filters select#advDuplicateFilter{border-color:rgba(96,165,250,.28);background-color:rgba(15,23,42,.82)}
#btnAddAdvDomainsToStore{box-shadow:0 8px 22px rgba(37,99,235,.2)}
#btnAddAdvDomainsToStore:not(:disabled):hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(37,99,235,.32)}
.trace-table-filters{display:grid;grid-template-columns:repeat(5,minmax(130px,1fr)) auto;gap:9px;align-items:center;margin:0 0 12px}.trace-table-filters select,.trace-table-filters input{width:100%;height:38px}.trace-table-filters .btn{height:38px;white-space:nowrap}@media(max-width:1100px){.trace-table-filters{grid-template-columns:repeat(3,1fr)}}@media(max-width:680px){.trace-table-filters{grid-template-columns:1fr 1fr}}@media(max-width:430px){.trace-table-filters{grid-template-columns:1fr}}
.project-traffic-inputs{display:grid;grid-template-columns:1fr 1fr;gap:14px}.project-traffic-inputs textarea{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;line-height:1.55}.project-traffic-toolbar{display:grid;grid-template-columns:120px minmax(210px,320px) 1fr;gap:12px;align-items:end;margin:14px 0}.project-traffic-actions{display:flex;gap:8px;flex-wrap:wrap}.project-traffic-kpis{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.project-traffic-table{height:520px;max-height:520px;border:1px solid var(--glass-border);border-radius:12px}.project-traffic-table thead{position:sticky;top:0;z-index:2}@media(max-width:900px){.project-traffic-toolbar{grid-template-columns:1fr 1fr}.project-traffic-actions{grid-column:1/-1}}@media(max-width:620px){.project-traffic-inputs,.project-traffic-toolbar{grid-template-columns:1fr}.project-traffic-actions{grid-column:auto}}
#advDomainTableBody .trace-status-pill{display:inline-flex;align-items:flex-start;gap:6px;white-space:normal;line-height:1.35;overflow-wrap:anywhere}
.adv-registration-column{width:210px;min-width:210px}#advDomainTableBody>tr>td:first-child{width:210px;min-width:210px;max-width:210px}.domain-duplicate-status{display:flex;align-items:center;width:190px;min-width:190px;max-width:190px;padding:7px 9px;border:1px solid rgba(96,165,250,.16);border-radius:9px;background:rgba(15,23,42,.58);overflow:hidden}.domain-duplicate-status .domain-duplicate-label{display:none}.domain-duplicate-status .trace-status-pill,.domain-duplicate-status .keyword-metric-empty{max-width:100%;min-width:0}.sheet-sync-summary{display:flex;align-items:flex-start;gap:10px;margin:12px 0 16px;padding:12px 14px;border:1px solid rgba(52,211,153,.25);border-radius:12px;background:rgba(16,185,129,.07);color:#6ee7b7;font-size:.78rem;line-height:1.5}.sheet-sync-summary i{margin-top:2px;font-size:1rem}
.domain-duplicate-label{font-size:.66rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#93c5fd}
.trace-panel{padding:22px}.trace-heading{margin-bottom:18px}.trace-layout{display:grid;grid-template-columns:360px minmax(0,1fr);gap:18px}.trace-config,.trace-workspace{padding:17px;border:1px solid var(--glass-border);border-radius:14px;background:rgba(7,12,23,.52)}.trace-config{display:grid;gap:14px;align-content:start}.trace-config-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.trace-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.trace-actions #btnTraceStart{grid-column:1/-1}.trace-note{display:flex;gap:9px;padding:11px;border:1px solid rgba(52,211,153,.2);border-radius:10px;background:rgba(16,185,129,.07);color:#8ce8c7;font-size:.72rem;line-height:1.45}.trace-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.trace-kpis>div{padding:14px;border:1px solid var(--glass-border);border-radius:12px;background:rgba(255,255,255,.025)}.trace-kpis span{display:block;color:var(--text-muted);font-size:.68rem}.trace-kpis strong{display:block;margin-top:5px;font-family:Outfit,sans-serif;font-size:1.35rem}.trace-progress{margin-top:16px}.trace-progress>div:first-child{display:flex;justify-content:space-between;margin-bottom:8px;color:#cbd5e1;font-size:.76rem}.trace-levels{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.trace-level{padding:6px 10px;border:1px solid var(--glass-border);border-radius:999px;color:#94a3b8;font-size:.7rem}.trace-level.active{color:#c4b5fd;border-color:rgba(139,92,246,.5);background:rgba(139,92,246,.14)}.trace-level.done{color:#6ee7b7;border-color:rgba(16,185,129,.35);background:rgba(16,185,129,.1)}.trace-result-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:20px 0 12px}.trace-result-head h3{font-family:Outfit,sans-serif}.trace-result-head p{margin-top:4px;color:var(--text-muted);font-size:.74rem}.trace-result-head>div:last-child{display:flex;gap:8px}.trace-table-wrap{height:480px;max-height:480px;overflow:auto;border:1px solid var(--glass-border);border-radius:12px}.trace-table-wrap thead{position:sticky;top:0;z-index:2}.trace-source-link{display:block;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#60a5fa}.trace-status-pill{display:inline-flex;padding:4px 8px;border-radius:999px;font-size:.68rem;font-weight:700}.trace-status-pill.success{color:#6ee7b7;background:rgba(16,185,129,.12)}.trace-status-pill.error{color:#fca5a5;background:rgba(239,68,68,.12)}.trace-errors{margin-top:12px;padding:12px;border:1px solid rgba(239,68,68,.25);border-radius:10px;background:rgba(127,29,29,.08)}.trace-errors summary{cursor:pointer;color:#fca5a5;font-weight:700}.trace-errors #traceErrorList{display:grid;gap:7px;margin-top:10px;color:#fecaca;font-size:.72rem}.trace-errors #traceErrorList div{padding:8px;border-radius:8px;background:rgba(0,0,0,.2);overflow-wrap:anywhere}
.affiliate-result-filters{position:relative;z-index:30;display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 14px;padding:12px 14px;border:1px solid var(--glass-border);border-radius:12px;background:rgba(7,12,23,.96);overflow:visible}.affiliate-result-filters .form-group{width:min(440px,100%);margin:0}.affiliate-result-filters .affiliate-history-filter{width:min(360px,100%)}.affiliate-result-filters .form-group>small{display:block;min-height:16px;color:var(--text-muted);font-size:.7rem;line-height:1.35}.affiliate-result-filters select{width:100%}.affiliate-result-filters .btn{min-height:40px;margin-top:22px}.affiliate-result-filters+.table-scroll{position:relative;z-index:1}
.affiliate-firecrawl-settings{max-width:1100px;margin-inline:auto}.affiliate-firecrawl-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:22px}.affiliate-firecrawl-grid .form-group{padding:18px;border:1px solid var(--glass-border);border-radius:14px;background:rgba(7,12,23,.42)}.affiliate-firecrawl-grid small{display:block;margin-top:8px;color:var(--text-muted);line-height:1.45}.affiliate-firecrawl-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}
.affiliate-personal-key-list{display:grid;gap:9px;margin-top:18px}.affiliate-personal-key{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 15px;border:1px solid var(--glass-border);border-radius:12px;background:rgba(7,12,23,.48)}.affiliate-personal-key>div:last-child{display:flex;gap:8px}.affiliate-personal-key small{display:block;margin-top:4px;color:var(--text-muted)}.affiliate-personal-key .key-error{color:#fca5a5;overflow-wrap:anywhere}
.trace-unlimited{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px;border:1px solid rgba(139,92,246,.35);border-radius:11px;background:rgba(139,92,246,.1);cursor:pointer}.trace-unlimited span{display:grid;gap:3px}.trace-unlimited strong{color:#ddd6fe;font-size:.8rem}.trace-unlimited small{color:#a5b4c8;font-size:.66rem;line-height:1.4}.trace-unlimited input{display:none}.trace-unlimited i{position:relative;width:40px;height:22px;flex:0 0 40px;border-radius:99px;background:#334155;transition:.2s}.trace-unlimited i:after{content:'';position:absolute;width:16px;height:16px;left:3px;top:3px;border-radius:50%;background:#fff;transition:.2s}.trace-unlimited input:checked+i{background:#7c3aed}.trace-unlimited input:checked+i:after{transform:translateX(18px)}.trace-config-grid input:disabled{opacity:.45;cursor:not-allowed}
@media(max-width:1000px){.trace-layout{grid-template-columns:1fr}.trace-config-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:720px){.trace-panel{padding:14px}.trace-config-grid,.trace-kpis{grid-template-columns:1fr 1fr}.trace-result-head{align-items:flex-start;flex-direction:column}.trace-result-head>div:last-child{width:100%}.trace-result-head .btn{flex:1}.trace-table-wrap{height:420px}.affiliate-result-filters{align-items:stretch;flex-direction:column}.affiliate-result-filters .form-group{width:100%}.affiliate-firecrawl-grid{grid-template-columns:1fr}.affiliate-firecrawl-actions{align-items:stretch;flex-direction:column}.affiliate-personal-key{align-items:flex-start;flex-direction:column}.affiliate-personal-key>div:last-child{width:100%}.affiliate-personal-key .btn{flex:1}}
@media(max-width:430px){.trace-config-grid{grid-template-columns:1fr}.trace-actions{grid-template-columns:1fr}.trace-actions #btnTraceStart{grid-column:auto}.trace-kpis{grid-template-columns:1fr 1fr}}

/* Trace runtime visibility and stable table columns */
.trace-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:720px){.trace-kpis{grid-template-columns:1fr 1fr}}
.trace-table-wrap th:nth-child(3),.trace-table-wrap td:nth-child(3){min-width:84px;width:84px;white-space:nowrap}
.trace-table-wrap .trace-level{display:inline-flex;align-items:center;justify-content:center;min-width:max-content;white-space:nowrap;line-height:1}
.trace-activity{margin-top:16px;border:1px solid var(--glass-border);border-radius:12px;background:rgba(0,0,0,.18);overflow:hidden}
.trace-activity-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--glass-border);font-size:.75rem}.trace-activity-head span{color:#60a5fa}
#traceActivityLog{height:142px;overflow:auto;padding:9px 12px;color:#aebbd0;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.69rem;line-height:1.55}
#traceActivityLog div+div{margin-top:3px}.trace-activity-error{color:#fca5a5}.trace-activity-skip{color:#fbbf24}.trace-activity-success{color:#6ee7b7}
.trace-skipped{padding:11px;border:1px solid rgba(245,158,11,.25);border-radius:10px;background:rgba(245,158,11,.07);color:#fcd34d;font-size:.72rem}.trace-skipped summary{cursor:pointer;font-weight:700}
.trace-registered-duplicates{margin-top:10px;border-color:rgba(16,185,129,.28);background:rgba(16,185,129,.07);color:#a7f3d0}
#traceRegisteredDuplicateList{display:grid;gap:7px;max-height:220px;overflow:auto;margin-top:9px}#traceRegisteredDuplicateList>div{padding:8px 9px;border-radius:8px;background:rgba(0,0,0,.2);overflow-wrap:anywhere}
#traceOwnerSkippedList{display:grid;gap:6px;max-height:180px;overflow:auto;margin-top:9px}#traceOwnerSkippedList>div{padding:7px 9px;border-radius:7px;background:rgba(0,0,0,.2);overflow-wrap:anywhere}
.trace-advertiser-link{color:#fcd34d;text-decoration:none}.trace-advertiser-link:hover{text-decoration:underline;color:#fde68a}.trace-advertiser-link i{font-size:.62rem;margin-left:3px}
@media(max-width:720px){.trace-activity-head{align-items:flex-start;gap:8px}.trace-result-head>div:last-child{display:grid;grid-template-columns:1fr 1fr}.trace-result-head>div:last-child .btn:first-child{grid-column:1/-1}}
.trace-history-filters{display:grid;grid-template-columns:2fr repeat(4,1fr) auto;gap:10px;align-items:end;margin:18px 0}.trace-history-filters .btn{height:42px}.trace-domain-history-table{height:460px;max-height:460px;border:1px solid var(--glass-border);border-radius:12px}.trace-domain-history-table thead{position:sticky;top:0;z-index:2}.trace-history-scans{margin-top:14px;padding:12px;border:1px solid var(--glass-border);border-radius:12px;background:rgba(0,0,0,.12)}.trace-history-scans>summary{cursor:pointer;font-weight:700}.trace-history-scans>.table-scroll{max-height:360px;margin-top:12px}.trace-history-scans thead{position:sticky;top:0;z-index:2}
.trace-domain-history>.trace-history-filters{grid-template-columns:1.7fr 1fr repeat(4,1fr) auto}
@media(max-width:1100px){.trace-history-filters{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.trace-history-filters{grid-template-columns:1fr 1fr}.trace-history-filters>div:first-child{grid-column:1/-1}.trace-history-filters .btn{width:100%}}
@media(max-width:430px){.trace-history-filters{grid-template-columns:1fr}.trace-history-filters>div:first-child{grid-column:auto}}
.sheet-sync-issues{display:grid;gap:12px;padding:14px 16px;color:var(--text-secondary)}
.sheet-sync-issues section{padding:12px;border:1px solid var(--border-color);border-radius:10px;background:rgba(15,23,42,.35)}
.sheet-sync-issues ul{margin:8px 0 0;padding-left:22px;display:grid;gap:6px}
.sheet-sync-issues code{color:#93c5fd;word-break:break-all}
.sheet-sync-time{margin-left:auto;flex:0 0 auto;padding:6px 10px;border:1px solid rgba(52,211,153,.28);border-radius:999px;background:rgba(16,185,129,.08);color:#a7f3d0;font-size:12px;font-weight:700;white-space:nowrap}
@media (max-width:900px){.sheet-sync-summary{flex-wrap:wrap}.sheet-sync-time{margin-left:0}}
.domain-advertiser-actions{display:grid;grid-template-columns:1fr;gap:10px;min-width:210px;padding:10px 6px}
.domain-advertiser-actions .advertiser-lookup-action,.domain-advertiser-actions .advertiser-external-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:38px;border-radius:10px;font-size:12px;font-weight:750;white-space:nowrap;transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease}
.domain-advertiser-actions .advertiser-lookup-action{border:1px solid rgba(129,140,248,.65);background:linear-gradient(135deg,#4f7cff,#8b5cf6);color:#fff;box-shadow:0 7px 18px rgba(99,102,241,.24)}
.domain-advertiser-actions .advertiser-lookup-action:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(99,102,241,.34)}
.domain-advertiser-actions .advertiser-external-action{border:1px solid rgba(96,165,250,.28);background:rgba(15,23,42,.72);color:#60a5fa;text-decoration:none;box-shadow:none}
.domain-advertiser-actions .advertiser-external-action:hover{transform:translateY(-1px);border-color:rgba(96,165,250,.65);background:rgba(30,64,175,.14);color:#93c5fd}
.domain-advertiser-actions::before{content:'';height:1px;background:linear-gradient(90deg,transparent,rgba(148,163,184,.22),transparent);margin:1px 4px -4px;grid-row:2}

/* Compact history dropdown in the main feature navigation */
.history-tab-menu{position:relative;flex:0 0 68px;min-width:68px;z-index:80}
.history-tab-trigger{width:100%;min-height:46px;height:46px;padding:0 12px;border-radius:18px;border:1px solid var(--glass-border);background:rgba(255,255,255,.03);color:var(--text-muted);display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font:600 .78rem 'Inter',sans-serif;transition:.22s ease;white-space:nowrap}
.history-tab-trigger:hover,.history-tab-menu.open .history-tab-trigger{color:#fff;border-color:rgba(139,92,246,.48);background:rgba(139,92,246,.13);transform:translateY(-1px)}
.history-tab-trigger>span{display:none}
.history-tab-menu.has-active-tab .history-tab-trigger{color:#fff;border-color:rgba(139,92,246,.55);background:linear-gradient(135deg,rgba(59,130,246,.25),rgba(139,92,246,.25));box-shadow:0 0 15px rgba(139,92,246,.22)}
.history-tab-chevron{font-size:.65rem;transition:transform .2s ease}.history-tab-menu.open .history-tab-chevron{transform:rotate(180deg)}
.history-tab-dropdown{position:absolute;top:calc(100% + 9px);right:0;width:300px;padding:8px;border:1px solid rgba(148,163,184,.22);border-radius:15px;background:rgba(10,16,30,.98);box-shadow:0 18px 48px rgba(0,0,0,.48),0 0 0 1px rgba(139,92,246,.08);backdrop-filter:blur(18px)}
.history-tab-dropdown[hidden]{display:none!important}
.tabs-container .history-tab-dropdown .history-menu-item{width:100%;height:auto;min-height:58px;padding:10px 12px;border:0;border-radius:11px;background:transparent;justify-content:flex-start;text-align:left;white-space:normal;transform:none}
.tabs-container .history-tab-dropdown .history-menu-item:hover{background:rgba(139,92,246,.12);color:#fff}.tabs-container .history-tab-dropdown .history-menu-item.active{background:linear-gradient(135deg,rgba(59,130,246,.18),rgba(139,92,246,.2));box-shadow:none}
.history-menu-item>i{width:30px;height:30px;flex:0 0 30px;display:grid;place-items:center;border-radius:9px;color:#a78bfa;background:rgba(139,92,246,.12)}
.history-menu-item>span{display:flex;flex-direction:column;gap:3px}.history-menu-item strong{color:inherit;font-size:.8rem}.history-menu-item small{color:var(--text-muted);font-size:.67rem;font-weight:500}
@media(max-width:1050px){.history-tab-menu{flex:1 1 calc(33.333% - 10px)}}
@media(max-width:620px){.history-tab-menu{flex:1 1 calc(50% - 5px)}.history-tab-dropdown{position:fixed;top:auto;right:12px;bottom:12px;left:12px;width:auto}}
#affiliateNetworkFilter.affiliate-network-multiselect{position:relative;min-width:320px}.affiliate-network-trigger{width:100%;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 12px;border:1px solid rgba(148,163,184,.35);border-radius:10px;background:#0f172a;color:var(--text-main);cursor:pointer;text-align:left}.affiliate-network-trigger[aria-expanded="true"]{border-color:var(--accent-purple);box-shadow:0 0 0 2px rgba(139,92,246,.22)}.affiliate-network-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}.affiliate-network-placeholder{color:var(--text-muted)}.affiliate-network-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 7px 4px 10px;border-radius:999px;background:rgba(148,163,184,.2);color:var(--text-main);font-size:.78rem;font-weight:700}.affiliate-network-chip button{width:19px;height:19px;border:0;border-radius:50%;background:rgba(148,163,184,.45);color:#fff;font-size:16px;line-height:17px;cursor:pointer}.affiliate-network-options{position:absolute;z-index:1000;top:calc(100% + 6px);left:0;right:0;max-height:290px;overflow:auto;padding:6px;border:1px solid rgba(148,163,184,.3);border-radius:10px;background:#111b2d;color:var(--text-main);box-shadow:0 20px 55px rgba(0,0,0,.72)}.affiliate-network-option{width:100%;display:flex;align-items:center;justify-content:space-between;padding:10px;border:0;border-radius:7px;background:#111b2d;color:var(--text-main);cursor:pointer;text-align:left}.affiliate-network-option:hover,.affiliate-network-option.selected{background:rgba(139,92,246,.22)}.affiliate-network-option i{visibility:hidden;color:#a78bfa}.affiliate-network-option.selected i{visibility:visible}
