/* ===== Application shell (logged-in pages) ===== */
body.app { background: #f4f5f7; color: #1f2937; }
.app-shell { display: flex; min-height: 100vh; }

/* Icon rail */
.rail {
    position: fixed; top: 0; bottom: 0; left: 0; width: 60px; z-index: 30;
    background: #fff; border-right: 1px solid #e5e7eb;
    display: flex; flex-direction: column; align-items: center; padding: 10px 0; gap: 4px;
}
.rail-logo { font-size: 22px; text-decoration: none; margin-bottom: 14px; }
.rail-item {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    width: 50px; padding: 8px 0; border-radius: 8px;
    font-size: 10px; color: #4b5563; text-decoration: none;
}
.rail-item:hover { background: #f3f4f6; }
.rail-item.active { background: #e9ebef; color: #111827; font-weight: 600; }
.rail-spacer { flex: 1; }
.rail-btn { background: none; border: none; color: #6b7280; cursor: pointer; padding: 8px; border-radius: 8px; }
.rail-btn:hover { background: #f3f4f6; }

/* Tool sidebar */
.sidebar {
    position: fixed; top: 0; bottom: 0; left: 60px; width: 210px; z-index: 20;
    background: #fff; border-right: 1px solid #e5e7eb;
    padding: 18px 10px; overflow-y: auto;
}
.sidebar-title { font-weight: 700; font-size: 15px; padding: 4px 10px 12px; }
.sidebar-section { margin-top: 12px; }
.sidebar-section h4 { font-size: 11px; font-weight: 600; color: #6b7280; padding: 0 10px 6px; margin: 0; }
.sidebar a, .sidebar .disabled {
    display: flex; justify-content: space-between; align-items: center; gap: 6px;
    padding: 7px 10px; border-radius: 6px; font-size: 13px; color: #1f2937; text-decoration: none;
}
.sidebar a:hover { background: #f3f4f6; }
.sidebar a.active { background: #e5e7eb; font-weight: 600; }
.sidebar .disabled { color: #9ca3af; cursor: not-allowed; }
.soon-badge {
    font-style: normal; font-size: 9px; text-transform: uppercase; letter-spacing: .3px;
    background: #f3f4f6; color: #6b7280; padding: 2px 6px; border-radius: 10px;
}

/* Content area + top bar */
.app-content { margin-left: 270px; flex: 1; min-width: 0; display: flex; flex-direction: column; }
body.sidebar-collapsed .sidebar { display: none; }
body.sidebar-collapsed .app-content { margin-left: 60px; }

.topbar {
    position: sticky; top: 0; z-index: 10; height: 56px;
    background: #fff; border-bottom: 1px solid #e5e7eb;
    display: flex; align-items: center; gap: 14px; padding: 0 24px;
}
.tool-search { position: relative; flex: 0 1 340px; }
.tool-search input {
    width: 100%; padding: 8px 12px; font-size: 13px;
    border: 1px solid #d1d5db; border-radius: 6px; background: #fff;
}
.tool-results {
    position: absolute; top: 40px; left: 0; right: 0; background: #fff; z-index: 40;
    border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.08); overflow: hidden;
}
.tool-result { display: block; padding: 9px 12px; font-size: 13px; color: #1f2937; text-decoration: none; }
a.tool-result:hover { background: #f3f4f6; }
.tool-result.muted { color: #9ca3af; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.btn-green, .btn-dark, .btn-outline {
    display: inline-block; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 600;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; font-family: inherit;
}
.btn-green { background: #10a37f; color: #fff; }
.btn-green:hover { background: #0d8c6d; }
.btn-dark { background: #111827; color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: #fff; color: #111827; border-color: #d1d5db; }
.btn-outline:hover:not(:disabled) { background: #f3f4f6; }
.btn-outline:disabled { opacity: .5; cursor: not-allowed; }

.icon-btn { background: none; border: none; cursor: pointer; padding: 6px; color: #374151; }
.mobile-only { display: none; }

.avatar {
    width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
    background: #6366f1; color: #fff; font-weight: 700; font-size: 13px;
}
.user-menu-wrap { position: relative; }
.user-menu {
    display: none; position: absolute; right: 0; top: 42px; min-width: 220px; z-index: 50;
    background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1); padding: 6px; 
}
.user-menu.open { display: block; }
.user-menu-name { padding: 10px 12px; font-weight: 600; font-size: 13px; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px; }
.user-menu-name small { display: block; color: #6b7280; font-weight: 400; margin-top: 2px; word-break: break-all; }
.user-menu a, .user-menu button {
    display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 6px;
    font-size: 13px; color: #1f2937; text-decoration: none; background: none; border: none; cursor: pointer; font-family: inherit;
}
.user-menu a:hover, .user-menu button:hover { background: #f3f4f6; }

/* Main area */
.app-main { padding: 28px 32px 60px; }
.app-main .container { max-width: 1100px; margin: 0 auto; padding: 0; }
.app-main .container-wide { max-width: 1300px; }
.page-title { font-size: 22px; margin-bottom: 4px; word-break: break-word; }

.flash { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; max-width: 1100px; margin-left: auto; margin-right: auto; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-success { background: #d1fae5; color: #065f46; }

/* Cards */
.card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 22px; margin-bottom: 24px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; }
.card-header h2 { font-size: 16px; margin: 0; }
.muted-text { color: #6b7280; font-size: 14px; margin-bottom: 14px; }

/* Dashboard hero (like the Semrush toolkit card) */
.hero-card {
    background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
    padding: 44px 30px 38px; text-align: center; margin-bottom: 24px;
}
.hero-card h1 { font-size: 30px; line-height: 1.2; margin-bottom: 12px; color: #111827; }
.hero-card p { color: #4b5563; font-size: 15px; max-width: 560px; margin: 0 auto; }
.domain-form { display: flex; gap: 8px; max-width: 680px; margin: 26px auto 0; flex-wrap: wrap; }
.domain-form input[type=text] {
    flex: 1 1 280px; padding: 12px 14px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 6px;
}
.domain-form button { padding: 12px 18px; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px 20px; }
.stat-card .stat-value { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { display: block; font-size: 12px; color: #6b7280; margin-top: 6px; }
.stat-card.good .stat-value { color: #10b981; }
.stat-card.average .stat-value { color: #f59e0b; }
.stat-card.poor .stat-value { color: #ef4444; }
.stat-card.info .stat-value { color: #6366f1; }

/* Tables inside cards */
.card .sites-table-wrap { background: none; padding: 0; border-radius: 0; }

/* Roadmap / promo card */
.promo-card {
    background: linear-gradient(135deg, #f5f3ff 0%, #eff6ff 100%);
    border: 1px solid #e0e7ff; border-radius: 14px; padding: 30px; margin-bottom: 24px;
}
.promo-card h2 { font-size: 20px; margin-bottom: 8px; }
.promo-card p { color: #4b5563; font-size: 14px; margin-bottom: 14px; }
.promo-card ul { list-style: none; }
.promo-card li { padding: 4px 0; font-size: 14px; }
.promo-card li::before { content: "✓ "; color: #6366f1; font-weight: 700; }

/* Forms inside the app */
.stack-form { display: flex; flex-direction: column; gap: 14px; max-width: 420px; }
.stack-form label { font-size: 13px; font-weight: 600; color: #374151; display: flex; flex-direction: column; gap: 6px; }
.stack-form input {
    padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-weight: 400;
}
.field-hint { font-weight: 400; color: #9ca3af; font-size: 12px; }
.security-list { padding-left: 20px; font-size: 14px; color: #374151; }
.security-list li { padding: 5px 0; }

/* Login checkbox row */
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; font-size: 13px !important; }
.check-row input { width: auto; }

/* Mobile */
@media (max-width: 900px) {
    .mobile-only { display: inline-flex; }
    .rail { display: none; }
    .sidebar { left: 0; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 4px 0 24px rgba(0,0,0,.12); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .app-content, body.sidebar-collapsed .app-content { margin-left: 0; }
    .app-main { padding: 20px 16px 50px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-card h1 { font-size: 24px; }
    .topbar { padding: 0 14px; }
    .tool-search { flex: 1; }
}

/* ===== New-scan form: "Home page only / Complete website" choice ===== */
.crawl-form { max-width: 680px; }
.scope-choice { border: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scope-choice legend { font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 8px; padding: 0; }
.crawl-form .scope-card {
    flex-direction: row; align-items: flex-start; gap: 10px;
    border: 2px solid #e5e7eb; border-radius: 10px; padding: 14px; cursor: pointer; font-weight: 400;
}
.crawl-form .scope-card input[type=radio] { width: 18px; height: 18px; padding: 0; margin-top: 2px; flex: none; accent-color: #2563eb; }
.crawl-form .scope-card:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.scope-body { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #4b5563; }
.scope-body strong { color: #111827; font-size: 14px; }
.crawl-form .form-row[hidden] { display: none; }
.form-help { font-size: 12px; color: #6b7280; line-height: 1.5; margin: 0; }
.flash-info { background: #dbeafe; color: #1e40af; }
@media (max-width: 640px) { .scope-choice { grid-template-columns: 1fr; } }

/* ===== Website health report ===== */
.hr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hr-head h1 { font-size: 24px; margin: 0 0 4px; word-break: break-word; }
.hr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-outline-sm { background: #fff; border: 1px solid #d1d5db; color: #1f2937; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-outline-sm:hover { background: #f3f4f6; }
.scope-badge { display: inline-block; background: #e0e7ff; color: #3730a3; border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; margin-right: 6px; }

.hr-hero { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: center; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 24px; margin-bottom: 20px; }
.hr-gauge { width: 170px; height: 170px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; border: 12px solid #e5e7eb; }
.hr-gauge.good { border-color: #10b981; } .hr-gauge.average { border-color: #f59e0b; } .hr-gauge.poor { border-color: #ef4444; }
.hr-gauge-score { font-size: 46px; font-weight: 800; line-height: 1; }
.hr-gauge-sub { font-size: 13px; color: #6b7280; margin-top: 4px; }
.hr-hero h2 { font-size: 18px; margin: 0 0 8px; }
.hr-hero p { margin: 0 0 8px; color: #374151; font-size: 14px; line-height: 1.55; }

.hr-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.hr-tile { background: #fff; border: 1px solid #e5e7eb; border-top: 4px solid #6366f1; border-radius: 10px; padding: 14px; text-align: center; }
.hr-tile b { display: block; font-size: 26px; }
.hr-tile span { font-size: 12px; color: #6b7280; }
.hr-tile.error { border-top-color: #ef4444; } .hr-tile.error b { color: #dc2626; }
.hr-tile.warning { border-top-color: #f59e0b; } .hr-tile.warning b { color: #d97706; }
.hr-tile.notice { border-top-color: #3b82f6; } .hr-tile.notice b { color: #2563eb; }
.hr-tile.good { border-top-color: #10b981; } .hr-tile.good b { color: #059669; }

.hr-section { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 22px; margin-bottom: 20px; }
.hr-section h2 { font-size: 17px; margin: 0 0 4px; }
.hr-section > .hr-sub { color: #6b7280; font-size: 13px; margin: 0 0 14px; }
.hr-table-wrap { overflow-x: auto; }
.hr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hr-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .3px; color: #6b7280; padding: 8px 10px; border-bottom: 2px solid #e5e7eb; white-space: nowrap; }
.hr-table td { padding: 9px 10px; border-bottom: 1px solid #f1f2f4; vertical-align: top; }
.hr-table .u { word-break: break-all; max-width: 420px; }
.hr-table .c { text-align: center; white-space: nowrap; }

.sev { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.sev.error { background: #fee2e2; color: #b91c1c; } .sev.warning { background: #fef3c7; color: #92400e; }
.sev.notice { background: #dbeafe; color: #1e40af; } .sev.good, .sev.pass { background: #d1fae5; color: #065f46; }
.sev.fail { background: #fee2e2; color: #b91c1c; } .sev.warn { background: #fef3c7; color: #92400e; }
.tick { color: #059669; font-weight: 700; } .cross { color: #dc2626; font-weight: 700; } .dash { color: #9ca3af; }

.hr-priority { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.hr-priority li { margin-bottom: 6px; }
.hr-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

.hr-details summary { cursor: pointer; color: #2563eb; font-size: 12px; }
.hr-details ul { margin: 6px 0 0; padding-left: 18px; font-size: 12px; word-break: break-all; }
.chain { font-size: 12px; word-break: break-all; color: #4b5563; }
.chain .bad { color: #b91c1c; font-weight: 600; }

.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input[type=search] { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; min-width: 240px; }
.chip { background: #fff; border: 1px solid #d1d5db; border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip.active { background: #111827; border-color: #111827; color: #fff; }
#pageFilterCount { margin-left: auto; font-size: 12px; color: #6b7280; }

details.page-card { border: 1px solid #e5e7eb; border-radius: 10px; margin-bottom: 8px; background: #fff; }
details.page-card[hidden] { display: none; }
details.page-card > summary { list-style: none; cursor: pointer; padding: 11px 14px; display: flex; gap: 10px; align-items: center; font-size: 13px; }
details.page-card > summary::-webkit-details-marker { display: none; }
details.page-card > summary::before { content: '▸'; color: #9ca3af; }
details.page-card[open] > summary::before { content: '▾'; }
details.page-card[data-severity=error] { border-left: 4px solid #ef4444; }
details.page-card[data-severity=warning] { border-left: 4px solid #f59e0b; }
details.page-card[data-severity=notice] { border-left: 4px solid #3b82f6; }
details.page-card[data-severity=good] { border-left: 4px solid #10b981; }
.pc-url { flex: 1; word-break: break-all; font-weight: 600; }
.pc-count { color: #6b7280; font-size: 12px; white-space: nowrap; }
.pc-body { padding: 4px 16px 16px 30px; font-size: 13px; }
.pc-meta { color: #6b7280; font-size: 12px; margin: 0 0 10px; line-height: 1.6; }
.pc-issues { list-style: none; margin: 0 0 10px; padding: 0; }
.pc-issues li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px dashed #eef0f2; }
.pc-issues .d { color: #6b7280; word-break: break-all; }
.pc-sub { font-weight: 700; font-size: 12px; margin: 10px 0 4px; }
.pc-links { margin: 0; padding-left: 18px; font-size: 12px; word-break: break-all; }

@media (max-width: 760px) { .hr-hero { grid-template-columns: 1fr; } }

/* ===== Print / Save as PDF: hide the app chrome, keep the report ===== */
@media print {
    .rail, .sidebar, .topbar, .hr-actions, .filter-bar, .flash { display: none !important; }
    .app-content { margin-left: 0 !important; }
    .app-main { padding: 0 !important; }
    body.app { background: #fff; }
    .hr-section, .hr-hero, .hr-tile, details.page-card { break-inside: avoid; border-color: #d1d5db; }
    .hr-section { page-break-inside: auto; }
    details.page-card[hidden] { display: block; }
    * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit; text-decoration: none; }
}

/* ===== SEO tools: Domain Overview, Organic Rankings, Compare Domains, Keyword Gap, Position Tracking ===== */
.tool-form { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 18px; margin-bottom: 20px; }
.tool-form .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.tool-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #374151; flex: 1 1 160px; }
.tool-form label.grow { flex: 3 1 260px; }
.tool-form input[type=text], .tool-form select, .tool-form textarea { padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; width: 100%; box-sizing: border-box; }
.tool-form textarea { min-height: 110px; resize: vertical; }
.tool-form .row + .row { margin-top: 12px; }
.tool-form button[type=submit] { padding: 10px 18px; border: 0; border-radius: 8px; background: #10a37f; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; }
.tool-form button[type=submit]:hover { background: #0d8c6d; }
.tool-form .hint { font-size: 12px; color: #6b7280; font-weight: 400; }
.tool-setup { border: 2px dashed #c7d2fe; background: #f5f7ff; }
.tool-setup h2 { margin-top: 0; font-size: 17px; }
.tool-setup code, .form-error code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; font-size: 12px; }
.tool-setup ol { padding-left: 20px; line-height: 1.9; font-size: 14px; }

.pos { display: inline-block; min-width: 30px; text-align: center; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.pos-top3 { background: #d1fae5; color: #065f46; } .pos-top10 { background: #dcfce7; color: #166534; }
.pos-top20 { background: #fef3c7; color: #92400e; } .pos-low { background: #fee2e2; color: #991b1b; }
.pos-none { background: #f3f4f6; color: #6b7280; }
.up { color: #059669; font-weight: 700; } .down { color: #dc2626; font-weight: 700; } .flat { color: #9ca3af; }
.bars-svg { width: 100%; max-width: 480px; height: auto; } .bars-label { font-size: 12px; fill: #4b5563; } .bars-value { font-size: 12px; fill: #111827; font-weight: 700; }
.spark { vertical-align: middle; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.tbl-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tbl-tools input[type=search] { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 13px; min-width: 220px; }
.tbl-tools .count { margin-left: auto; font-size: 12px; color: #6b7280; }
.hr-table.sortable th[data-sort] { cursor: pointer; user-select: none; }
.hr-table.sortable th[data-sort]:hover { color: #111827; }
.hr-table th.sorted-asc::after { content: ' ▲'; } .hr-table th.sorted-desc::after { content: ' ▼'; }
.hr-table tr[hidden] { display: none; }
.cmp-table td:first-child, .cmp-table th:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 190px; font-weight: 600; }
.cmp-table td.best { background: #ecfdf5; font-weight: 700; color: #065f46; }
.cmp-table tr.group td { background: #f3f4f6; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: #6b7280; font-weight: 700; }
.cmp-table th.dom { text-align: center; min-width: 150px; }
.cmp-table td.c { text-align: center; }
.gap-list { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.progress-wrap { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin: 10px 0; }
.progress-wrap > div { height: 100%; width: 0; background: #10a37f; transition: width .3s; }
.btn-sm { background: #10a37f; color: #fff; border: 0; border-radius: 8px; padding: 8px 14px; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-sm[disabled] { opacity: .5; cursor: not-allowed; }
.btn-danger-sm { background: none; border: 0; color: #dc2626; cursor: pointer; font-size: 12px; padding: 2px 6px; }
.proj-card { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #f1f2f4; }
.proj-card:last-child { border-bottom: 0; }
.note-sm { font-size: 12px; color: #6b7280; line-height: 1.5; }
@media print { .tool-form, .tbl-tools, .hr-actions { display: none !important; } }

/* ===== Dashboard toolkit grid ===== */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.tool-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid #e5e7eb; border-radius: 10px; text-decoration: none; color: #111827; background: #fff; transition: border-color .15s, box-shadow .15s, transform .15s; }
.tool-tile:hover { border-color: #10a37f; box-shadow: 0 4px 14px rgba(16,163,127,.12); transform: translateY(-1px); }
.tool-tile .tool-ico { font-size: 22px; }
.tool-tile strong { font-size: 14px; }
.tool-tile span:last-child { font-size: 12px; color: #6b7280; line-height: 1.4; }

/* Popularity bar (free keyword source) */
.pop-bar { display: inline-block; width: 70px; height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; vertical-align: middle; }
.pop-bar i { display: block; height: 100%; background: #10a37f; border-radius: 999px; }

/* ===== Public / white-label report ===== */
.public-bar { background: var(--brand, #10a37f); color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.public-bar span { opacity: .9; font-size: 13px; }
.public-report .hr-gauge.good { border-color: var(--brand, #10b981); }
.public-foot { text-align: center; color: #6b7280; font-size: 12px; margin: 30px 0 10px; }
.ai-summary { border-left: 4px solid #10a37f; }
.ai-fix { border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px; background: #fff; }
.ai-fix-url { font-weight: 700; word-break: break-all; margin-bottom: 4px; }
.history-svg { width: 100%; max-width: 620px; height: auto; }
@media print { .public-bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; } #aiPanel, #share { display: none !important; } }
.uptime-svg { width: 100%; max-width: 760px; height: 28px; }

.line-svg { width: 100%; max-width: 640px; height: auto; }
.public-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: var(--brand, #10a37f); color: #fff; }

/* =====================================================================
   UI refresh: site switcher, "which site" banner, loading states, polish
   ===================================================================== */
:root { --accent: #10a37f; --accent-dark: #0d8c6d; --ink: #111827; --muted: #6b7280; --line: #e5e7eb; --soft: #f8fafc; }
body.app { background: #f4f6f9; }
:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 4px; }

/* --- Site switcher (top bar) --- */
.site-switch { position: relative; }
.site-switch > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); min-width: 180px; max-width: 280px; }
.site-switch > summary::-webkit-details-marker { display: none; }
.site-switch > summary:hover, .site-switch[open] > summary { border-color: var(--accent); background: #fff; }
.ss-ico { font-size: 18px; }
.ss-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; flex: 1; }
.ss-text small { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.ss-text strong { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-caret { color: var(--muted); font-size: 12px; }
.ss-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 260px; max-height: 360px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: 6px; z-index: 40; }
.ss-menu form { margin: 0; }
.ss-item { display: flex; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; background: none; border: 0; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink); font-family: inherit; }
.ss-item span { width: 14px; color: var(--accent); font-weight: 700; }
.ss-item:hover { background: #f1f5f9; } .ss-item.on { background: #ecfdf5; font-weight: 600; }
.ss-add { display: block; margin-top: 4px; padding: 9px 10px; border-top: 1px solid var(--line); font-size: 13px; color: #2563eb; text-decoration: none; font-weight: 600; }
.ss-empty { padding: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .site-switch > summary { min-width: 0; } .ss-text small { display: none; } }

/* --- "Which site is this?" banner (sticky under the top bar) --- */
.ctx-bar { position: sticky; top: 56px; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; margin: 0 0 18px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 13px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.ctx-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.ctx-domain { font-size: 16px; color: var(--ink); word-break: break-all; }
.ctx-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #e0e7ff; color: #3730a3; }
.ctx-meta { color: var(--muted); font-size: 12px; }
.ctx-ok { border-left: 5px solid #10b981; background: #f0fdf9; } .ctx-ok .ctx-badge { background: #d1fae5; color: #065f46; }
.ctx-warn { border-left: 5px solid #f59e0b; background: #fffbeb; } .ctx-warn .ctx-badge { background: #fef3c7; color: #92400e; }
.ctx-ready { border-left: 5px solid #6366f1; background: #f5f7ff; }
.ctx-none { border-left: 5px solid #94a3b8; justify-content: space-between; }
.ctx-form { margin: 0 0 0 auto; }
.ctx-btn, a.ctx-btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 7px 12px; font-size: 12px; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; }
.ctx-btn:hover { background: var(--accent-dark); }
.ctx-link { margin-left: auto; font-size: 12px; color: #2563eb; text-decoration: none; font-weight: 600; }

/* --- Locked domain field --- */
.field-locked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 12px; border: 1px solid #a7f3d0; background: #ecfdf5; border-radius: 8px; font-weight: 400; }
.field-locked strong { font-size: 15px; color: var(--ink); }
.field-locked .tag { font-size: 11px; background: #d1fae5; color: #065f46; padding: 2px 8px; border-radius: 999px; font-weight: 600; }
.field-locked .alt, .field-locked-wrap .alt, .tool-form label .alt { font-size: 12px; color: #2563eb; text-decoration: none; margin-left: auto; font-weight: 600; }
.tool-form label > .alt { margin: 2px 0 0; }

/* --- My Sites page --- */
.sites-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.site-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.site-card.is-active { border: 2px solid var(--accent); box-shadow: 0 6px 20px rgba(16,163,127,.12); }
.site-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.site-domain { font-size: 17px; word-break: break-all; }
.site-card-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.site-card-tools form { margin: 0; }
.chip-btn { background: #f1f5f9; border: 0; border-radius: 999px; padding: 6px 11px; font-size: 12px; cursor: pointer; font-family: inherit; color: var(--ink); }
.chip-btn:hover { background: #e0f2fe; }
.site-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.site-card-foot form { margin: 0; }
.empty-card { text-align: center; padding: 40px 20px; }
.empty-ico { font-size: 42px; }

/* --- Loading feedback --- */
#navProgress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, #10a37f, #2563eb); z-index: 9999; transition: width 8s cubic-bezier(.1,.7,.2,1); }
#navProgress.run { width: 92%; }
button.is-loading { position: relative; opacity: .85; cursor: progress; }
button.is-loading::before { content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.working-note { font-size: 12px; color: var(--muted); margin-top: 8px; display: none; }
form.is-submitting .working-note { display: block; }

/* --- General polish --- */
.page-title { font-size: 26px; letter-spacing: -.3px; margin-bottom: 4px; }
.page-subtitle { max-width: 780px; line-height: 1.55; margin-bottom: 18px; }
.tool-form, .hr-section, .card { border-radius: 14px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.tool-form input[type=text]:focus, .tool-form select:focus, .tool-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(16,163,127,.15); }
.hr-table tbody tr:hover { background: #f8fafc; }
.hr-table th { background: #fafbfc; position: sticky; top: 0; }
.hr-tile { border-radius: 12px; box-shadow: 0 1px 3px rgba(15,23,42,.04); transition: transform .12s; }
.hr-tile:hover { transform: translateY(-2px); }
.tool-form button[type=submit]:disabled, .btn-sm:disabled { opacity: .6; }
@media print { .ctx-bar, .site-switch, #navProgress { display: none !important; } }

/* Danger zone / delete confirmation */
.danger-card { background: #fff; border: 2px solid #fecaca; border-radius: 14px; padding: 24px; max-width: 720px; }
.danger-card h1 { font-size: 22px; margin: 0 0 8px; color: #991b1b; }
.btn-danger-solid { background: #dc2626; color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-danger-solid:hover { background: #b91c1c; }
.flash-info { background: #dbeafe; color: #1e40af; }

/* Rescan choice (site already scanned) */
.rescan-card { max-width: 760px; padding: 24px; }
.rescan-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.rescan-head h2 { margin: 0 0 4px; font-size: 19px; } .rescan-ico { font-size: 30px; }
.rescan-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-top: 8px; }
.rescan-actions form { margin: 0; }
.rescan-opt { display: flex; flex-direction: column; gap: 4px; width: 100%; height: 100%; text-align: left; background: #f8fafc; border: 2px solid #e5e7eb; border-radius: 12px; padding: 14px 16px; cursor: pointer; text-decoration: none; color: var(--ink); font-family: inherit; box-sizing: border-box; }
.rescan-opt:hover { border-color: var(--accent); background: #ecfdf5; }
.rescan-opt strong { font-size: 15px; } .rescan-opt span { font-size: 12px; color: var(--muted); }

/* Dashboard site rows */
.scan-count { display: inline-block; margin-left: 6px; font-size: 11px; background: #e0e7ff; color: #3730a3; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.sites-table .actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-menu { position: relative; display: inline-block; } .row-menu > summary { list-style: none; cursor: pointer; color: #2563eb; font-size: 14px; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-pop { position: absolute; z-index: 30; right: 0; top: 24px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(15,23,42,.15); padding: 6px; min-width: 190px; }
.row-menu-pop form { margin: 0; } .row-menu-pop button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; font-family: inherit; }
.row-menu-pop button:hover { background: #f1f5f9; }
.danger-link { color: #dc2626; font-size: 13px; text-decoration: none; } .danger-link:hover { text-decoration: underline; }

/* ===== Report redesign ===== */
.rp-header { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; background: linear-gradient(135deg, #0f172a, #1e3a5f); color: #fff; border-radius: 16px; padding: 22px 24px; margin-bottom: 14px; }
.rp-title { display: flex; gap: 14px; align-items: center; min-width: 0; } .rp-globe { font-size: 34px; }
.rp-title h1 { margin: 0 0 6px; font-size: 24px; color: #fff; word-break: break-all; }
.rp-badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .rp-meta { font-size: 12px; color: #cbd5e1; }
.rp-header .scope-badge { background: rgba(255,255,255,.15); color: #fff; }
.rp-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rp-header .btn-outline-sm { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.rp-header .btn-outline-sm:hover { background: rgba(255,255,255,.22); }
.rp-header .danger-outline { border-color: rgba(252,165,165,.7); color: #fecaca; }
.rp-menu > summary { display: inline-block; list-style: none; cursor: pointer; } .rp-menu .row-menu-pop { color: var(--ink); }
.hist-item { display: flex; justify-content: space-between; gap: 14px; padding: 9px 10px; border-radius: 8px; font-size: 13px; text-decoration: none; color: var(--ink); }
.hist-item:hover { background: #f1f5f9; } .hist-item.on { background: #ecfdf5; font-weight: 600; }
.rp-nav { position: sticky; top: 56px; z-index: 7; display: flex; gap: 4px; flex-wrap: wrap; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 12px; padding: 6px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
.rp-nav a { padding: 7px 13px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #334155; text-decoration: none; }
.rp-nav a:hover { background: #f1f5f9; }
.nav-count { display: inline-block; min-width: 18px; text-align: center; background: #e5e7eb; border-radius: 999px; padding: 0 6px; font-size: 11px; margin-left: 4px; } .nav-count.bad { background: #fee2e2; color: #b91c1c; }
html { scroll-behavior: smooth; } .hr-section, .rp-header { scroll-margin-top: 120px; }
.rp-hero { display: grid; grid-template-columns: 190px 1fr; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.rp-ring { position: relative; width: 170px; height: 170px; margin: 0 auto; } .rp-ring svg { width: 100%; height: 100%; }
.rp-ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rp-ring-text b { font-size: 46px; line-height: 1; } .rp-ring-text span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rp-verdict { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; } .rp-summary h2 { margin: 2px 0 8px; font-size: 22px; }
.rp-summary p { margin: 0 0 10px; line-height: 1.6; font-size: 14px; color: #374151; } .t-error { color: #dc2626; } .t-warn { color: #d97706; }
.rp-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.rp-chip { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #f1f5f9; color: #334155; text-decoration: none; }
.rp-chip.good { background: #d1fae5; color: #065f46; } .rp-chip.bad { background: #fee2e2; color: #991b1b; } .rp-chip.warn { background: #fef3c7; color: #92400e; }
.rp-priority { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; } .rp-priority ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.5; } .rp-priority li { margin-bottom: 8px; font-size: 14px; }
.link-btn { background: none; border: 0; color: #2563eb; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
@media (max-width: 760px) { .rp-hero { grid-template-columns: 1fr; } .rp-nav { top: 56px; overflow-x: auto; flex-wrap: nowrap; } }
@media print { .rp-nav, .rp-toolbar { display: none !important; } .rp-header { background: #fff !important; color: #111 !important; border: 1px solid #ccc; } .rp-header h1 { color: #111; } }

/* ===== Public lead pages ===== */
body.lead-body { background: linear-gradient(180deg, #f0f9ff 0, #f4f6f9 340px); min-height: 100vh; display: flex; flex-direction: column; }
.lead-nav { display: flex; justify-content: space-between; align-items: center; padding: 14px 28px; } .lead-brand { font-weight: 800; font-size: 19px; color: #111827; text-decoration: none; }
.lead-nav nav { display: flex; gap: 14px; align-items: center; } .lead-nav nav a { color: #334155; text-decoration: none; font-size: 14px; font-weight: 600; }
.lead-signup { background: #111827; color: #fff !important; padding: 8px 14px; border-radius: 8px; }
.lead-main { flex: 1; width: 100%; max-width: 940px; margin: 0 auto; padding: 10px 20px 40px; box-sizing: border-box; }
.lead-hero { text-align: center; padding: 34px 0 20px; } .lead-hero h1 { font-size: 36px; letter-spacing: -.8px; margin: 0 0 10px; line-height: 1.15; } .lead-hero > p { font-size: 17px; color: #475569; max-width: 620px; margin: 0 auto 22px; }
.lead-form { max-width: 640px; margin: 0 auto; text-align: left; padding: 24px; } .lead-form .consent { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; font-weight: 400; color: #475569; margin: 12px 0; flex-direction: row; } .lead-form .consent input { width: auto; margin-top: 2px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-cta, a.lead-cta { display: inline-block; background: #10a37f; color: #fff; border: 0; border-radius: 10px; padding: 14px 22px; font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; font-family: inherit; text-align: center; }
.lead-cta:hover { background: #0d8c6d; } .lead-cta.alt, a.lead-cta.alt { background: #111827; } .lead-form .lead-cta { width: 100%; }
.lead-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; } .lead-points div { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 4px; } .lead-points span { font-size: 13px; color: #64748b; }
.lead-foot { text-align: center; font-size: 12px; color: #64748b; padding: 18px; }
.lead-offer { background: linear-gradient(135deg, #0f172a, #1e3a5f); color: #fff; border-radius: 16px; padding: 28px; text-align: center; margin-top: 18px; } .lead-offer h2 { margin: 0 0 8px; font-size: 22px; color: #fff; } .lead-offer p { color: #cbd5e1; max-width: 600px; margin: 0 auto 16px; }
.lead-offer-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.locked-row td { background: repeating-linear-gradient(45deg, #f8fafc, #f8fafc 10px, #f1f5f9 10px, #f1f5f9 20px); text-align: center; padding: 18px; color: #475569; }
@media (max-width: 640px) { .lead-hero h1 { font-size: 27px; } }
.lead-row-form { display: flex; gap: 6px; align-items: center; margin: 0; } .lead-row-form input[type=text] { padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; width: 180px; font-size: 12px; } .lead-row-form select { padding: 6px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; }

/* ===== Premium customer report ===== */
.pm-root { max-width: 1080px; }
.pm-cover { display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap; background: radial-gradient(circle at 85% 20%, #1d4ed8 0, transparent 45%), linear-gradient(135deg, #0b1220, #14305a); color: #fff; border-radius: 20px; padding: 38px 40px; margin-bottom: 18px; box-shadow: 0 12px 40px rgba(15,23,42,.25); }
.pm-eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 12px; color: #93c5fd; font-weight: 700; margin-bottom: 10px; }
.pm-cover h1 { font-size: 40px; margin: 0 0 8px; letter-spacing: -1px; color: #fff; word-break: break-all; } .pm-cover p { margin: 0 0 20px; color: #cbd5e1; }
.pm-cover-score { text-align: center; } .pm-verdict { margin-top: 8px; font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #e2e8f0; }
.pm-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.pm-btn, a.pm-btn { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 10px; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; font-family: inherit; }
.pm-btn:hover { background: rgba(255,255,255,.26); } .pm-btn.ghost { background: transparent; } .pm-btn.solid, a.pm-btn.solid { background: #10a37f; border-color: #10a37f; font-size: 16px; padding: 14px 24px; } .pm-btn.solid:hover { background: #0d8c6d; }
.pm-hl { border-color: #10a37f !important; color: #fff !important; background: rgba(16,163,127,.35) !important; }
.pm-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pm-cat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.pm-cat-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; margin-bottom: 8px; } .pm-cat-top strong { font-size: 24px; }
.pm-bar { height: 8px; background: #e5e7eb; border-radius: 999px; overflow: hidden; margin-bottom: 6px; } .pm-bar i { display: block; height: 100%; border-radius: 999px; }
.pm-section { border-radius: 16px; } .pm-lead { font-size: 15px; line-height: 1.65; color: #334155; max-width: 860px; }
.pm-detail { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin-bottom: 14px; padding: 4px 22px 18px; box-shadow: 0 1px 3px rgba(15,23,42,.04); }
.pm-detail > summary { cursor: pointer; list-style: none; padding: 14px 0 6px; } .pm-detail > summary::-webkit-details-marker { display: none; }
.pm-detail > summary h2 { display: inline; font-size: 19px; } .pm-detail > summary::before { content: '▾ '; color: var(--muted); } .pm-detail:not([open]) > summary::before { content: '▸ '; }
.pm-detail h3 { font-size: 14px; margin: 16px 0 6px; }
.pm-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.7; word-break: break-all; } .pm-list li { margin-bottom: 2px; }
.pm-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #e5e7eb; color: #374151; }
.pm-high { background: #fee2e2; color: #991b1b; } .pm-medium { background: #fef3c7; color: #92400e; } .pm-low { background: #dbeafe; color: #1e40af; }
.pm-quick-win { background: #d1fae5; color: #065f46; } .pm-moderate { background: #fef3c7; color: #92400e; } .pm-project { background: #e0e7ff; color: #3730a3; }
.pm-roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.pm-road { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; } .pm-road h3 { margin: 0 0 8px; font-size: 15px; } .pm-road h3 span { color: var(--muted); font-weight: 400; }
.pm-road ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
.pm-code { background: #0f172a; color: #e2e8f0; border-radius: 10px; padding: 14px; font-size: 12px; line-height: 1.5; overflow: auto; max-height: 340px; white-space: pre; user-select: all; }
.pm-psi { font-size: 22px; }
.pm-cta { text-align: center; background: linear-gradient(135deg, #064e3b, #0f766e); color: #fff; border-radius: 20px; padding: 40px 28px; margin: 20px 0 14px; }
.pm-cta h2 { color: #fff; font-size: 26px; margin: 0 0 10px; } .pm-cta p { color: #d1fae5; max-width: 620px; margin: 0 auto 20px; font-size: 16px; line-height: 1.6; }
@media (max-width: 700px) { .pm-cover { padding: 26px 22px; } .pm-cover h1 { font-size: 28px; } }
@media print {
    .pm-actions, .pm-btn, .tool-form { display: none !important; }
    .pm-cover, .pm-cta { background: #0b1220 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none; }
    .pm-detail, .pm-section, .pm-cat, .pm-road { break-inside: avoid; box-shadow: none; }
    .pm-detail > summary::before { content: ''; } .pm-code { max-height: none; white-space: pre-wrap; }
}

/* ===== Admin area: its own look so it is never confused with the user dashboard ===== */
body.admin-area .rail { background: #0b1220; } body.admin-area .rail-logo { filter: grayscale(.2); }
body.admin-area .sidebar { background: #0f172a; border-right-color: #1e293b; } body.admin-area .sidebar-title { color: #38bdf8; letter-spacing: 3px; }
body.admin-area .sidebar-section h4 { color: #64748b; } body.admin-area .sidebar a { color: #cbd5e1; } body.admin-area .sidebar a:hover { background: #1e293b; color: #fff; }
body.admin-area .sidebar a.active { background: #1d4ed8; color: #fff; }
body.admin-area .topbar { border-bottom: 3px solid #1d4ed8; }
.admin-pill { background: #1d4ed8; color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 800; letter-spacing: 1.5px; }
.ad-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, #0b1220, #1e3a8a); color: #fff; border-radius: 18px; padding: 26px 30px; margin-bottom: 16px; }
.ad-hero h1 { margin: 0 0 6px; font-size: 28px; color: #fff; } .ad-hero p { margin: 0; color: #cbd5e1; }
.ad-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ad-kpi { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-top: 4px solid #1d4ed8; border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.04); }
a.ad-kpi:hover { box-shadow: 0 6px 18px rgba(29,78,216,.15); } .ad-kpi b { font-size: 30px; line-height: 1.1; } .ad-kpi-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; font-weight: 700; }
.ad-setup-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; } .ad-setup-head h2 { margin: 0 0 4px; }
.ad-progress { flex: 1; min-width: 180px; max-width: 320px; height: 12px; background: #e5e7eb; border-radius: 999px; overflow: hidden; } .ad-progress i { display: block; height: 100%; background: linear-gradient(90deg, #10b981, #1d4ed8); border-radius: 999px; }
.ad-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.ad-check { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #fecaca; background: #fff7f7; border-radius: 12px; } .ad-check.ok { border-color: #bbf7d0; background: #f0fdf4; }
.ad-check > div { flex: 1; display: flex; flex-direction: column; gap: 2px; } .ad-check strong { font-size: 14px; }
.ad-check-ico { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; background: #ef4444; color: #fff; flex: none; } .ad-check.ok .ad-check-ico { background: #10b981; }
.plan-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: 12px; padding: 12px 18px; margin-bottom: 16px; }
.plan-card > div:first-child { display: flex; flex-direction: column; } .plan-name { font-weight: 700; font-size: 15px; }
.plan-feats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 6px 0 14px; }
.plan-feat { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; background: #fff; cursor: pointer; font-weight: 400 !important; }
.plan-feat:has(input:checked) { border-color: var(--accent); background: #ecfdf5; } .plan-feat input { width: auto !important; margin-top: 3px; } .plan-feat span { display: flex; flex-direction: column; } .plan-feat small { color: var(--muted); font-size: 11px; }
.plan-flags { align-items: center !important; } .plan-flags .mk-check { flex: 0 1 auto; font-size: 13px; }
.mk-check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: #475569; font-weight: 400; } .mk-check input { width: auto !important; }
.mk-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 800; }
.user-flags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; } .user-act { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .user-act form { margin: 0; display: inline-flex; gap: 4px; align-items: center; }
.user-act select { padding: 5px 6px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 12px; }

/* ===== Admin Settings v2 ===== */
.set-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; } .set-main { min-width: 0; }
.set-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.set-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: #334155; text-decoration: none; } .set-nav a:hover { background: #f1f5f9; }
.set-nav .dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; flex: none; } .set-nav .dot.ok { background: #10b981; }
.set-section { scroll-margin-top: 80px; } .set-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; } .set-head h2 { margin: 0; font-size: 19px; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; } .set-field.wide { grid-column: 1 / -1; }
.set-field { display: flex; flex-direction: column; gap: 6px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.set-field input[type=text], .set-field input[type=password], .set-field input[type=number], .set-field input[type=email], .set-field select, .set-field textarea { width: 100%; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff; box-sizing: border-box; }
.set-field textarea { min-height: 72px; } .set-label { font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.set-secret { display: flex; flex-direction: column; gap: 6px; } .set-masked { font-size: 13px; } .set-update summary { cursor: pointer; color: #2563eb; font-size: 13px; font-weight: 600; list-style: none; } .set-update summary::-webkit-details-marker { display: none; } .set-update input { margin-top: 8px; }
.set-toggle { background: #fff; border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 12px; }
.set-presets { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.set-steps { margin: 0 0 14px; padding-left: 22px; font-size: 13.5px; line-height: 1.8; color: #475569; } .set-steps li.done { color: #065f46; } .set-steps li.done::marker { content: '✓ '; font-weight: 800; color: #10b981; }
.set-save { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(6px); }
.set-save label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; flex: 1; min-width: 200px; } .set-save input { padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; }
.set-save button { padding: 10px 18px; border: 0; border-radius: 8px; background: #1d4ed8; color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; }
@media (max-width: 900px) { .set-layout { grid-template-columns: 1fr; } .set-nav { position: static; flex-direction: row; flex-wrap: wrap; } }
