:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --surface-raised: #222532;
    --border: #2a2d3a;
    --text: #e4e4e7;
    --text-muted: #9ca3af;
    --accent: #00B4D8;
    --accent-hover: #0096B4;
    --accent-subtle: rgba(0, 180, 216, 0.1);
    --green: #22c55e;
    --yellow: #eab308;
    --red: #ef4444;
    --orange: #f97316;
}

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

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Auth Overlay ── */
.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1117 0%, #121520 40%, #0d1a22 100%);
}

.auth-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(0, 180, 216, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.auth-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 3rem 2.5rem 2.5rem;
    width: 420px;
    max-width: 92vw;
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.auth-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.auth-logo svg { width: 200px; height: auto; }

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    letter-spacing: 0.03em;
}

.auth-error {
    display: none;
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.3);
    color: var(--red);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    letter-spacing: 0.02em;
}

.form-group input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.auth-submit {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.25rem;
}

.auth-submit:hover { background: var(--accent-hover); }
.auth-submit:active { transform: scale(0.99); }

.auth-toggle {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-toggle a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-toggle a:hover { text-decoration: underline; }

.register-fields {
    display: none;
    transition: all 0.2s;
}

/* ── App Header ── */
.app-header {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 2rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-logo svg { width: 140px; height: auto; display: block; }

.header-logo .suite-label {
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-left: 1px solid var(--border);
    padding-left: 0.75rem;
}

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

.google-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.google-status .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.header-user {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.header-btn:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.header-btn svg { width: 18px; height: 18px; }

.logout-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.logout-btn:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── Settings Modal ── */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 560px;
    max-width: 94vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

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

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: color 0.15s, background 0.15s;
}

.modal-close:hover {
    color: var(--text);
    background: rgba(255,255,255,0.06);
}

.modal-body {
    padding: 1.5rem;
}

.settings-section {
    margin-bottom: 1.75rem;
}

.settings-section:last-child { margin-bottom: 0; }

.settings-section h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.settings-section .setting-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.settings-section select {
    padding: 0.45rem 0.7rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.85rem;
    min-width: 280px;
    outline: none;
    transition: border-color 0.2s;
}

.settings-section select:focus { border-color: var(--accent); }

.settings-btn-google {
    padding: 0.55rem 1.1rem;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: opacity 0.15s;
}

.settings-btn-google:hover { opacity: 0.9; }

.settings-btn-sm {
    padding: 0.4rem 0.7rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.settings-btn-sm:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.settings-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

/* ── Container / Main ── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ── Provider Toggles ── */
.provider-section {
    margin-bottom: 1.5rem;
}

.provider-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.provider-group-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 0.3rem 0.5rem;
    min-width: 44px;
}

.provider-toggles {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.provider-toggle {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.provider-toggle:hover {
    border-color: rgba(255,255,255,0.15);
}

.provider-toggle.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.provider-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.25rem;
}

/* ── Search Box ── */
.search-area {
    margin-bottom: 1.5rem;
}

.search-box {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.4rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 1.1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.search-box input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.search-box button {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.search-box button:hover { background: var(--accent-hover); }
.search-box button:active { transform: scale(0.98); }
.search-box button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.search-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-range select, .date-range input[type="date"] {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 0.8rem;
    outline: none;
}

.date-range select:focus, .date-range input[type="date"]:focus {
    border-color: var(--accent);
}

.cost-display {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Loading ── */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 0.75rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Results ── */
.results { display: flex; flex-direction: column; gap: 1.5rem; }

.result-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.result-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.result-card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.result-card-body { padding: 1.5rem; }

.badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-ok { background: rgba(34, 197, 94, 0.15); color: var(--green); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--red); }

.issues-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.issue {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.9rem;
}

.issue-severity {
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.severity-critical { background: rgba(239, 68, 68, 0.2); color: var(--red); }
.severity-warning { background: rgba(234, 179, 8, 0.2); color: var(--yellow); }
.severity-info { background: rgba(0, 180, 216, 0.2); color: var(--accent); }

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

.data-item {
    padding: 0.8rem;
    border-radius: 8px;
    background: var(--bg);
}

.data-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.data-item .value {
    font-size: 1.3rem;
    font-weight: 700;
}

.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.tag {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: var(--bg);
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border);
}

.score-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.score-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.score-good { background: rgba(34, 197, 94, 0.15); color: var(--green); border: 2px solid var(--green); }
.score-avg { background: rgba(249, 115, 22, 0.15); color: var(--orange); border: 2px solid var(--orange); }
.score-bad { background: rgba(239, 68, 68, 0.15); color: var(--red); border: 2px solid var(--red); }

.meta-preview {
    background: var(--bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.meta-preview .serp-title {
    color: #8ab4f8;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.meta-preview .serp-url {
    color: #bdc1c6;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
}

.meta-preview .serp-desc {
    color: #bdc1c6;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.insight-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    border-left: 3px solid var(--accent);
}

.insight-card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.funnel-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
}

.funnel-bar .bar {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--border);
}

.funnel-bar .bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.score-big {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .app-header { padding: 0.75rem 1rem; }
    .search-box { flex-direction: column; }
    .search-box input { font-size: 1rem; padding: 0.85rem 1rem; }
    .search-box button { padding: 0.85rem 2rem; }
    .data-grid { grid-template-columns: 1fr 1fr; }
    .modal { margin: 1rem; }
    .auth-card { padding: 2rem 1.5rem; }
    .analysis-presets { flex-direction: column; }
    .preset-btn { flex: none; width: 100%; }
    .welcome-grid { grid-template-columns: 1fr; }
}

/* ── Search Hero ── */
.search-hero {
    margin-bottom: 2rem;
    padding-top: 1rem;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.search-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
}

/* ── Analysis Presets ── */
.analysis-presets {
    display: flex;
    gap: 0.5rem;
}

.preset-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.preset-btn:hover {
    border-color: rgba(255,255,255,0.15);
    background: var(--surface-raised);
}

.preset-btn.active {
    border-color: var(--accent);
    background: var(--accent-subtle);
    color: var(--text);
}

.preset-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.preset-label {
    font-weight: 600;
}

.preset-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.preset-btn.active .preset-meta {
    color: var(--accent);
    opacity: 1;
}

/* ── Welcome Dashboard ── */
.welcome-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.welcome-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.2s, transform 0.15s;
}

.welcome-card:hover {
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.welcome-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.welcome-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.welcome-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   WORKFLOWS — Preset-Grid + Wizard-Modal
   ═══════════════════════════════════════════════════════════════ */

.wf-hero {
    max-width: 900px;
    margin: 2rem auto 2.5rem;
    padding: 0 1.5rem;
    text-align: center;
}
.wf-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--cyan, #00B4D8) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.wf-hero p {
    color: var(--text-muted);
    font-size: 1rem;
}

.wf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.25rem;
    max-width: 1280px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.wf-card {
    background: rgba(21, 38, 56, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
}
.wf-card:hover:not(.wf-card--soon) {
    border-color: rgba(0, 180, 216, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 180, 216, 0.08);
}
.wf-card--soon {
    opacity: 0.55;
}
.wf-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.wf-card-num {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, #00B4D8, #00C9A7);
    color: #0D1B2A;
    font-weight: 800;
    font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
}
.wf-badge {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}
.wf-badge--live {
    background: rgba(0, 201, 167, 0.18);
    color: #00C9A7;
}
.wf-badge--soon {
    background: rgba(136, 153, 170, 0.18);
    color: #8899AA;
}
.wf-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    color: #fff;
}
.wf-card-tagline {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0 0 1rem 0;
    min-height: 2.4em;
}
.wf-card-pipeline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.72rem;
}
.wf-chip {
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #D5DEEA;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.wf-arrow {
    color: var(--text-muted);
    opacity: 0.6;
}
.wf-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}
.wf-card-cta {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    background: linear-gradient(135deg, #00B4D8, #00C9A7);
    color: #0D1B2A;
    margin-top: auto;
}
.wf-card-cta:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 180, 216, 0.35);
}
.wf-card-cta:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ─── Wizard Modal ─── */
.wizard-overlay {
    position: fixed; inset: 0; z-index: 1050;
    display: flex; align-items: center; justify-content: center;
}
.wizard-backdrop {
    position: absolute; inset: 0;
    background: rgba(13, 27, 42, 0.75);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
.wizard-panel {
    position: relative;
    width: min(760px, 92vw);
    max-height: 90vh;
    background: #152638;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    display: flex; flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}
.wizard-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.wizard-preset-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}
.wizard-header h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.wizard-close {
    background: transparent; border: none; cursor: pointer;
    padding: 0.35rem; color: var(--text-muted);
    border-radius: 6px;
}
.wizard-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

.wizard-steps {
    display: flex; align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.15);
    overflow-x: auto;
}
.wf-step { display: flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.wf-step-num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    font-size: 0.75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.wf-step--active .wf-step-num { background: #00B4D8; color: #0D1B2A; box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.22); }
.wf-step--done .wf-step-num { background: #00C9A7; color: #0D1B2A; }
.wf-step-label { font-size: 0.8rem; color: var(--text-muted); }
.wf-step--active .wf-step-label { color: #fff; font-weight: 600; }
.wf-step--done .wf-step-label { color: #00C9A7; }
.wf-step-sep { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.08); margin: 0 0.75rem; min-width: 10px; }

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

.wf-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.wf-field { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; }
.wf-field > span { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.wf-field input, .wf-field select {
    background: rgba(13, 27, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: #fff;
    font-size: 0.88rem;
    font-family: inherit;
}
.wf-field input:focus, .wf-field select:focus {
    border-color: #00B4D8;
    outline: none;
}
.wf-field-row { display: flex; gap: 0.5rem; }
.wf-field-row input { flex: 1; min-width: 0; }
.wf-form-hint { margin-top: 1rem; font-size: 0.8rem; color: var(--text-muted); padding: 0.75rem; background: rgba(0, 180, 216, 0.08); border-radius: 8px; }

.wizard-footer {
    display: flex; justify-content: flex-end; gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.wf-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}
.wf-btn--primary {
    background: linear-gradient(135deg, #00B4D8, #00C9A7);
    color: #0D1B2A;
}
.wf-btn--primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0, 180, 216, 0.3); }
.wf-btn--ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.wf-btn--ghost:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.wf-progress { text-align: center; padding: 1rem 0; }
.wf-progress h3 { font-size: 1.1rem; margin: 1rem 0 0.5rem; }
.wf-progress p { color: var(--text-muted); font-size: 0.85rem; }
.wf-spinner {
    width: 48px; height: 48px;
    margin: 0.5rem auto;
    border: 3px solid rgba(0, 180, 216, 0.2);
    border-top-color: #00B4D8;
    border-radius: 50%;
    animation: wf-spin 0.9s linear infinite;
}
@keyframes wf-spin { to { transform: rotate(360deg); } }
.wf-log {
    margin-top: 1.25rem;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #8FA5B8;
    text-align: left;
    max-height: 200px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.wf-result { text-align: center; padding: 1rem; }
.wf-result-hero { margin-bottom: 1.5rem; }
.wf-result-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.wf-result h3 { font-size: 1.3rem; margin: 0 0 0.5rem; }
.wf-result p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; text-align: left; max-width: 560px; margin: 0 auto; white-space: pre-wrap; }
.wf-result-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1.5rem; }

.wf-error {
    padding: 1.5rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 10px;
}
.wf-error h3 { margin: 0 0 0.75rem; color: #FCA5A5; }
.wf-error pre { background: rgba(0, 0, 0, 0.3); padding: 0.75rem; border-radius: 6px; color: #FDA4AF; font-size: 0.8rem; overflow-x: auto; }
.wf-hint { margin-top: 0.75rem; color: var(--text-muted); font-size: 0.78rem; }

@media (max-width: 620px) {
    .wf-form-grid { grid-template-columns: 1fr; }
    .wf-grid { grid-template-columns: 1fr; }
}

/* Google-Status inside wizard + settings-dropdowns */
.wf-gstatus {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.wf-gstatus--ok {
    background: rgba(0, 201, 167, 0.12);
    border: 1px solid rgba(0, 201, 167, 0.3);
    color: #8FEDD9;
}
.wf-gstatus--warn {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #FCD34D;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}
.wf-gstatus-btn { padding: 0.4rem 0.8rem; font-size: 0.78rem; }
.wf-gstatus-hint { width: 100%; font-size: 0.72rem; color: var(--text-muted); }

.settings-google-area { margin-top: 0.75rem; }
.settings-select {
    width: 100%;
    background: rgba(13, 27, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    color: #fff;
    font-size: 0.88rem;
    margin-top: 0.5rem;
}
.settings-select:focus { border-color: #00B4D8; outline: none; }

/* ── BC Logo in Hero ── */
.hero-bc-logo {
    width: 36px;
    height: 36px;
    vertical-align: middle;
    margin-right: 0.3rem;
    border-radius: 6px;
}

/* ── Instance Banner (top of page, e.g. BETA warning) ── */
.instance-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.5rem 1rem;
    background: linear-gradient(90deg, #f59e0b, #dc2626);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
body[data-instance="beta"] { padding-top: 2.5rem; }

/* ── Auth-screen instance badge (above EverGrow logo in login card) ── */
.auth-instance-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.auth-instance-img {
    max-height: 56px;
    width: auto;
    border-radius: 8px;
}
.auth-instance-badge {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    background: linear-gradient(90deg, #f59e0b, #dc2626);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    border-radius: 999px;
}

/* ── Data Status Bar ── */
.data-status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(34,197,94,0.06);
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.data-status-bar .green-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
}

.status-evergrow-logo {
    height: 16px !important;
    max-height: 16px !important;
    width: auto !important;
    max-width: 80px !important;
    margin-left: auto;
    opacity: 0.4;
    object-fit: contain;
}

/* ── Keyword Limit Slider ── */
.kw-limit-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kw-limit-control label {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.kw-limit-control input[type="range"] {
    width: 100px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ── Export Toolbar ── */
.export-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 10px;
    position: sticky;
    top: 60px;
    z-index: 40;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s;
}

.export-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.export-btn-pdf:hover { border-color: var(--red); color: var(--red); }
.export-btn-csv:hover { border-color: var(--green); color: var(--green); }

/* ── CSV Import Button ── */
.csv-import-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.15s;
}

.csv-import-label:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Navigation Tabs ── */
.nav-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s;
}

.nav-tab:hover { color: var(--text); }
.nav-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-tab svg { opacity: 0.7; }
.nav-tab.active svg { opacity: 1; }

/* ── Crawler Layout ── */
.crawler-hero { margin-bottom: 1.5rem; }

.crawler-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

.crawler-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    position: sticky;
    top: 80px;
}

.crawler-sidebar h3 {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ── Crawl Input ── */
.crawl-input-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
}

.crawl-input-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.crawl-url-input {
    flex: 1;
    padding: 0.85rem 1.1rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.crawl-url-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.crawl-start-btn {
    padding: 0.85rem 1.75rem;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.crawl-start-btn:hover { background: var(--accent-hover); }
.crawl-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.crawl-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.crawl-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.crawl-option label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.crawl-option select {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.8rem;
    outline: none;
}

.crawl-option select:focus { border-color: var(--accent); }

.crawl-option-info {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.crawl-action-btns {
    display: flex;
    gap: 0.5rem;
}

.crawl-export-btn {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.crawl-export-btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* ── Crawl Modules Toggles ── */
.crawl-modules {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.module-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text);
    cursor: pointer;
    transition: border-color 0.15s;
}

.module-toggle:hover {
    border-color: var(--accent);
}

.module-toggle input[type="checkbox"] {
    accent-color: var(--accent);
    cursor: pointer;
}

/* ── Crawl Settings Row ── */
.crawl-settings-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.crawl-setting-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.crawl-setting-toggle input[type="checkbox"] {
    accent-color: var(--accent);
}

.crawl-option-inline {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.crawl-option-inline select {
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 0.78rem;
}

/* ── Crawl Progress ── */
.crawl-status-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-top: 1rem;
}

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

.crawl-status-header > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crawl-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.crawl-status-domain {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.crawl-cancel-btn {
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--red);
    background: none;
    color: var(--red);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.15s;
}

.crawl-cancel-btn:hover { background: rgba(239, 68, 68, 0.1); }

.crawl-stats-row {
    display: flex;
    gap: 2rem;
}

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

.crawl-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.crawl-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crawl-progress-bar {
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin-top: 1rem;
    overflow: hidden;
}

.crawl-progress-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), rgba(0,180,216,0.3), var(--accent));
    background-size: 200% 100%;
}

@keyframes crawlPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.crawl-error {
    margin-top: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: var(--red);
    font-size: 0.85rem;
}

/* ── Crawl Summary ── */
.crawl-summary {
    animation: fadeIn 0.3s ease;
}

.crawl-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.crawl-summary-header h2 { font-size: 1.3rem; }

.crawl-detail-btn {
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
}

.crawl-detail-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-subtle);
}

.crawl-overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crawl-overview-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.crawl-health-card {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.crawl-overview-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.crawl-overview-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.crawl-overview-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

/* ── Crawl Issues ── */
.crawl-issues-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.crawl-issues-section h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.crawl-severity-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.crawl-severity-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crawl-severity-bar-wrap {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--bg);
    overflow: hidden;
}

.crawl-severity-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.crawl-severity-count {
    min-width: 3rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
}

.crawl-issues-table {
    width: 100%;
    font-size: 0.85rem;
}

.crawl-issues-table code {
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    background: var(--bg);
    font-size: 0.8rem;
    color: var(--accent);
}

.crawl-pct-bar {
    display: inline-block;
    width: 60px;
    height: 6px;
    border-radius: 3px;
    background: var(--bg);
    margin-right: 0.4rem;
    vertical-align: middle;
    overflow: hidden;
}

.crawl-pct-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--accent);
}

.crawl-status-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.crawl-status-chip {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    font-size: 0.85rem;
}

.crawl-dup-group {
    background: var(--bg);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.5rem;
}

.crawl-dup-url {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 0.15rem 0;
    word-break: break-all;
}

.crawl-depth-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crawl-depth-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.crawl-depth-label {
    min-width: 5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.crawl-depth-bar-wrap {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: var(--bg);
    overflow: hidden;
}

.crawl-depth-bar {
    height: 100%;
    border-radius: 4px;
    background: var(--accent);
    transition: width 0.5s ease;
}

.crawl-depth-count {
    min-width: 2.5rem;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Crawl Pages Table ── */
.crawl-pages-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.crawl-pages-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.crawl-pages-table {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.crawl-pages-table thead th {
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 5;
}

.crawl-page-row {
    cursor: pointer;
    transition: background 0.1s;
}

.crawl-page-row:hover { background: var(--surface-raised); }

.crawl-url-cell {
    max-width: 400px;
    min-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--accent);
}

.crawl-title-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crawl-page-detail { background: var(--bg); }

.crawl-page-detail-inner {
    padding: 1rem;
}

.crawl-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.crawl-detail-section {
    font-size: 0.85rem;
}

.crawl-detail-section strong {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.crawl-detail-value {
    margin-top: 0.2rem;
    word-break: break-word;
}

.crawl-detail-issues {
    grid-column: 1 / -1;
}

.crawl-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* ── Crawl History ── */
.crawl-history-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border);
    border-radius: 6px;
    transition: background 0.15s;
}

.crawl-history-item:last-child { border-bottom: none; }
.crawl-history-item.clickable { cursor: pointer; }
.crawl-history-item.clickable:hover {
    background: var(--accent-subtle);
}
.crawl-history-item.clickable:hover .crawl-history-domain { color: var(--accent); }

.crawl-history-info { flex: 1; min-width: 0; }

.crawl-history-domain {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.crawl-history-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.crawl-history-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.crawl-history-badge.running {
    background: rgba(0, 180, 216, 0.15);
    color: var(--accent);
}

.crawl-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .crawler-layout { grid-template-columns: 1fr; }
    .crawl-input-row { flex-direction: column; }
    .crawl-options { flex-direction: column; align-items: flex-start; }
    .crawl-overview-grid { grid-template-columns: 1fr 1fr; }
    .crawl-detail-grid { grid-template-columns: 1fr; }
    .crawler-sidebar { position: static; }
}