/* ==========================================================================
   SiteShield — dark SaaS dashboard theme
   ========================================================================== */

:root {
    --bg-0: #0a0b0f;
    --bg-1: #111319;
    --bg-2: #171a22;
    --bg-3: #1e222c;
    --border: #262b36;
    --border-soft: #1d2128;
    --text-primary: #f1f3f7;
    --text-secondary: #9aa2b1;
    --text-muted: #6b7383;
    --accent: #6366f1;
    --accent-hover: #7678f2;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --good: #22c55e;
    --good-soft: rgba(34, 197, 94, 0.12);
    --warn: #f59e0b;
    --warn-soft: rgba(245, 158, 11, 0.12);
    --bad: #ef4444;
    --bad-soft: rgba(239, 68, 68, 0.12);
    --minor: #38bdf8;
    --minor-soft: rgba(56, 189, 248, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.25);
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-0);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 4px 0; font-weight: 600; letter-spacing: -0.02em; }

.muted { color: var(--text-secondary); font-size: 13.5px; margin: 4px 0 16px 0; }

/* ---------------------------------------------------------------------- */
/* Buttons & form elements                                                */
/* ---------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--radius-sm);
    padding: 11px 20px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease, opacity 0.15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }

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

.btn-block { width: 100%; }

.btn-spinner {
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

input[type="text"], input[type="email"], input[type="password"], input[type="url"] {
    width: 100%;
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 11px 14px;
    font-size: 14.5px;
    font-family: inherit;
    margin-bottom: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ---------------------------------------------------------------------- */
/* Auth pages (signup / login)                                            */
/* ---------------------------------------------------------------------- */

.auth-body { background: radial-gradient(circle at top left, #14182a 0%, var(--bg-0) 55%); min-height: 100vh; }

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-panel-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    background: linear-gradient(160deg, #14162090 0%, transparent 60%);
}
.brand-mark-lg { font-size: 42px; margin-bottom: 18px; }
.auth-panel-brand h1 { font-size: 34px; margin-bottom: 14px; }
.auth-panel-brand p { color: var(--text-secondary); max-width: 380px; font-size: 15.5px; margin-bottom: 28px; }
.auth-feature-list li {
    padding: 8px 0 8px 26px;
    position: relative;
    color: var(--text-secondary);
    font-size: 14px;
}
.auth-feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--good);
    font-weight: 700;
}

.auth-panel-form { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 34px;
    box-shadow: var(--shadow-card);
}
.auth-card h2 { font-size: 22px; }
.auth-subtitle { color: var(--text-secondary); font-size: 13.5px; margin: 4px 0 24px 0; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13.5px; color: var(--text-secondary); }
.auth-switch a { color: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* App shell / sidebar                                                    */
/* ---------------------------------------------------------------------- */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--bg-1);
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 24px 10px; }
.brand-mark { font-size: 20px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: var(--bg-3); color: var(--text-primary); }
.nav-item.active { background: var(--accent-soft); color: #a5a7ff; }
.nav-item.disabled { opacity: 0.5; cursor: default; pointer-events: none; }
.nav-icon { width: 18px; text-align: center; }
.soon-badge {
    margin-left: auto;
    font-size: 10px;
    background: var(--bg-3);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.sidebar-footer { border-top: 1px solid var(--border-soft); padding-top: 14px; margin-top: 10px; }
.plan-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: var(--accent-soft);
    color: #a5a7ff;
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 4px 2px 12px 2px; }
.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; color: white; flex-shrink: 0;
}
.user-meta { min-width: 0; }
.user-name { font-size: 13.5px; font-weight: 600; }
.user-email { font-size: 11.5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-link {
    display: block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 9px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.logout-link:hover { color: var(--bad); border-color: var(--bad); }

.main-content { flex: 1; padding: 32px 40px; max-width: 1180px; }

/* ---------------------------------------------------------------------- */
/* Flash messages                                                         */
/* ---------------------------------------------------------------------- */

.flash-container { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.flash {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    border: 1px solid transparent;
}
.flash-success { background: var(--good-soft); color: #4ade80; border-color: rgba(34,197,94,0.3); }
.flash-error { background: var(--bad-soft); color: #f87171; border-color: rgba(239,68,68,0.3); }
.flash-close { background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

/* ---------------------------------------------------------------------- */
/* Page header / cards                                                    */
/* ---------------------------------------------------------------------- */

.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 24px; }
.page-subtitle { color: var(--text-secondary); font-size: 14px; margin: 0; }

.card {
    background: var(--bg-2);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}
.card h3 { font-size: 15.5px; margin-bottom: 4px; }

/* ---------------------------------------------------------------------- */
/* Scan form                                                              */
/* ---------------------------------------------------------------------- */

.quick-scan-card { background: linear-gradient(150deg, #191c2b, var(--bg-2) 55%); }
.scan-form input { margin-bottom: 0; }
.scan-input-row { display: flex; gap: 10px; margin-top: 10px; }
.scan-input-row input { flex: 1; }
.scan-usage-note { font-size: 12px; color: var(--text-muted); margin-top: 10px; }
.scan-error {
    background: var(--bad-soft);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-top: 10px;
}
.scan-error.visible, .scan-error:not([hidden]) { display: block; }

.scan-page-card { padding: 30px; }
.scan-checklist { margin-top: 30px; border-top: 1px solid var(--border-soft); padding-top: 24px; }
.scan-checklist h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 16px; }
.checklist-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; }
.checklist-title { font-weight: 700; font-size: 13.5px; margin-bottom: 8px; color: #a5a7ff; }
.checklist-group ul li { font-size: 13px; color: var(--text-secondary); padding: 3px 0; }

/* ---------------------------------------------------------------------- */
/* Stat cards                                                             */
/* ---------------------------------------------------------------------- */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 20px; }
.stat-card { position: relative; overflow: hidden; margin-bottom: 0; }
.stat-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 6px; letter-spacing: -0.02em; }
.stat-icon { position: absolute; right: 18px; top: 18px; font-size: 22px; opacity: 0.18; }

.score-good { color: var(--good); }
.score-warn { color: var(--warn); }
.score-bad { color: var(--bad); }

/* ---------------------------------------------------------------------- */
/* Dashboard grid / tables                                                */
/* ---------------------------------------------------------------------- */

.dashboard-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
    text-align: left; padding: 10px 12px;
    color: var(--text-muted); font-weight: 600; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-soft);
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.score-chip {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; padding: 3px 10px;
    border-radius: 20px; font-weight: 700; font-size: 12.5px;
    background: var(--bg-3);
}
.score-chip.score-good { background: var(--good-soft); color: var(--good); }
.score-chip.score-warn { background: var(--warn-soft); color: var(--warn); }
.score-chip.score-bad { background: var(--bad-soft); color: var(--bad); }

.status-badge { font-size: 11.5px; font-weight: 700; text-transform: capitalize; padding: 3px 10px; border-radius: 20px; }
.status-completed { background: var(--good-soft); color: var(--good); }
.status-pending { background: var(--warn-soft); color: var(--warn); }
.status-failed { background: var(--bad-soft); color: var(--bad); }

.link-arrow { color: var(--accent); font-weight: 600; font-size: 13px; white-space: nowrap; }
.link-arrow:hover { color: var(--accent-hover); }

.empty-state, .empty-state-full { text-align: center; padding: 30px 10px; color: var(--text-secondary); font-size: 13.5px; }
.empty-state-full { padding: 60px 20px; }
.empty-state-full h2 { margin-bottom: 10px; }
.empty-state-full .btn { margin-top: 16px; }

.recommendation-list li {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border-soft);
}
.recommendation-list li:last-child { border-bottom: none; }
.rec-body { flex: 1; min-width: 0; }
.rec-issue { font-size: 13.5px; font-weight: 600; }
.rec-site { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------------------------------------------------------------------- */
/* Badges                                                                 */
/* ---------------------------------------------------------------------- */

.badge {
    display: inline-flex; align-items: center;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
    padding: 4px 10px; border-radius: 20px; flex-shrink: 0;
}
.badge-critical { background: var(--bad-soft); color: var(--bad); }
.badge-warning { background: var(--warn-soft); color: var(--warn); }
.badge-minor { background: var(--minor-soft); color: var(--minor); }
.badge-good { background: var(--good-soft); color: var(--good); }

/* ---------------------------------------------------------------------- */
/* Results page                                                           */
/* ---------------------------------------------------------------------- */

.results-top { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: stretch; margin-bottom: 20px; }

.score-circle-card { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-circle {
    --pct: calc(var(--score) * 1%);
    width: 168px; height: 168px;
    border-radius: 50%;
    background: conic-gradient(var(--score-color) var(--pct), var(--bg-3) 0);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    position: relative;
}
.score-circle::before {
    content: "";
    position: absolute;
    width: 136px; height: 136px;
    border-radius: 50%;
    background: var(--bg-2);
}
.score-circle-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.score-number { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; }
.score-max { font-size: 12px; color: var(--text-muted); margin-top: -4px; }
.score-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }

.summary-card { display: flex; flex-direction: column; }
.ai-summary-text { color: var(--text-secondary); font-size: 14px; line-height: 1.6; margin-bottom: 20px; }

.category-score-bars { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.category-score-row { display: grid; grid-template-columns: 110px 1fr 34px; align-items: center; gap: 12px; }
.category-score-name { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }
.category-score-track { height: 7px; background: var(--bg-3); border-radius: 20px; overflow: hidden; }
.category-score-fill { height: 100%; border-radius: 20px; transition: width 0.4s ease; }
.category-score-fill.score-good { background: var(--good); }
.category-score-fill.score-warn { background: var(--warn); }
.category-score-fill.score-bad { background: var(--bad); }
.category-score-value { font-size: 12.5px; font-weight: 700; text-align: right; }

.results-sections { display: flex; flex-direction: column; gap: 20px; }
.results-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-section-header h3 { margin: 0; }

.issue-list { display: flex; flex-direction: column; gap: 10px; }
.issue-item {
    border: 1px solid var(--border-soft);
    border-left-width: 3px;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    background: var(--bg-1);
}
.issue-item.severity-critical { border-left-color: var(--bad); }
.issue-item.severity-warning { border-left-color: var(--warn); }
.issue-item.severity-minor { border-left-color: var(--minor); }
.issue-item.severity-good { border-left-color: var(--good); opacity: 0.75; }

.issue-item-header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.issue-title { font-size: 14px; font-weight: 600; }

.issue-detail { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border-soft); }
.issue-detail-row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: 13px; }
.issue-detail-label { color: var(--text-muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; padding-top: 1px; }
.issue-detail-row span:last-child { color: var(--text-secondary); }

.difficulty-tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 20px; width: fit-content; }
.difficulty-easy { background: var(--good-soft); color: var(--good); }
.difficulty-medium { background: var(--warn-soft); color: var(--warn); }
.difficulty-hard { background: var(--bad-soft); color: var(--bad); }
.difficulty--, .difficulty-\- { background: var(--bg-3); color: var(--text-muted); }

/* ---------------------------------------------------------------------- */
/* Responsive                                                             */
/* ---------------------------------------------------------------------- */

@media (max-width: 980px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .results-top { grid-template-columns: 1fr; }
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-panel-brand { display: none; }
}

@media (max-width: 760px) {
    .app-shell { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; flex-direction: row; align-items: center; padding: 12px 16px; overflow-x: auto; }
    .sidebar-brand { padding: 0 16px 0 0; flex-shrink: 0; }
    .sidebar-nav { flex-direction: row; flex: none; }
    .nav-item { white-space: nowrap; }
    .sidebar-footer { display: none; }
    .main-content { padding: 20px 16px; }
    .scan-input-row { flex-direction: column; }
    .checklist-grid { grid-template-columns: 1fr 1fr; }
    .issue-detail-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .checklist-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Light theme override                                                   */
/* ---------------------------------------------------------------------- */

:root[data-theme="light"] {
    --bg-0: #f4f5f8;
    --bg-1: #ffffff;
    --bg-2: #ffffff;
    --bg-3: #eef0f4;
    --border: #dde1e8;
    --border-soft: #e6e9ef;
    --text-primary: #14161c;
    --text-secondary: #4c5262;
    --text-muted: #7a8092;
    --accent-soft: rgba(99, 102, 241, 0.10);
    --shadow-card: 0 1px 2px rgba(20,22,28,0.04), 0 8px 20px rgba(20,22,28,0.06);
}
:root[data-theme="light"] .auth-body {
    background: radial-gradient(circle at top left, #eef0ff 0%, var(--bg-0) 55%);
}
:root[data-theme="light"] .quick-scan-card {
    background: linear-gradient(150deg, #eef0fb, var(--bg-2) 55%);
}
:root[data-theme="light"] .card {
    border: 1px solid var(--border);
}

/* ---------------------------------------------------------------------- */
/* Theme toggle button                                                    */
/* ---------------------------------------------------------------------- */

.theme-toggle-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    background: var(--bg-3);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
}
.theme-toggle-btn:hover { color: var(--text-primary); background: var(--border-soft); }
.theme-toggle-icon { font-size: 14px; }
.theme-toggle-floating {
    position: fixed; top: 20px; right: 20px; width: 42px; height: 42px;
    border-radius: 50%; z-index: 10; padding: 0;
}
.theme-toggle-floating .theme-toggle-label { display: none; }

/* ---------------------------------------------------------------------- */
/* Page header actions / danger button                                    */
/* ---------------------------------------------------------------------- */

.page-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.btn-danger { background: var(--bad-soft); color: var(--bad); border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* ---------------------------------------------------------------------- */
/* Score history sparkline (results page)                                 */
/* ---------------------------------------------------------------------- */

.score-history-card { padding: 24px; }
.sparkline {
    display: flex; align-items: flex-end; gap: 6px;
    height: 90px; margin-top: 16px;
}
.sparkline-bar-wrap { flex: 1; height: 100%; display: flex; align-items: flex-end; min-width: 4px; }
.sparkline-bar { width: 100%; border-radius: 3px 3px 0 0; min-height: 4px; background: var(--bg-3); transition: height 0.3s ease; }
.sparkline-bar.score-good { background: var(--good); }
.sparkline-bar.score-warn { background: var(--warn); }
.sparkline-bar.score-bad { background: var(--bad); }

/* ---------------------------------------------------------------------- */
/* Uptime monitoring page                                                 */
/* ---------------------------------------------------------------------- */

.monitor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.monitor-card { margin-bottom: 0; display: flex; flex-direction: column; gap: 14px; }
.monitor-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.monitor-label { font-weight: 700; font-size: 14.5px; }
.monitor-url { font-size: 12px; color: var(--text-muted); word-break: break-all; margin-top: 2px; }

.status-pill {
    flex-shrink: 0; font-size: 11.5px; font-weight: 700; padding: 4px 10px;
    border-radius: 20px; white-space: nowrap;
}
.status-pill.status-up { background: var(--good-soft); color: var(--good); }
.status-pill.status-down { background: var(--bad-soft); color: var(--bad); }
.status-pill.status-pending { background: var(--bg-3); color: var(--text-muted); }

.monitor-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.monitor-stat { display: flex; flex-direction: column; gap: 2px; }
.monitor-stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); font-weight: 600; }
.monitor-stat-value { font-size: 15px; font-weight: 700; }

.monitor-error {
    font-size: 12.5px; color: var(--bad); background: var(--bad-soft);
    border-radius: var(--radius-sm); padding: 8px 10px;
}

.monitor-timeline { display: flex; gap: 3px; flex-wrap: wrap; }
.timeline-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-3); }
.timeline-dot.dot-up { background: var(--good); }
.timeline-dot.dot-down { background: var(--bad); }

.monitor-meta { font-size: 11.5px; color: var(--text-muted); }
.monitor-actions { display: flex; gap: 8px; margin-top: auto; }
.monitor-actions .btn { flex: 1; padding: 9px 14px; font-size: 13px; }

/* ---------------------------------------------------------------------- */
/* Account settings page                                                  */
/* ---------------------------------------------------------------------- */

.settings-info-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--border-soft); font-size: 13.5px;
}
.settings-info-row:last-child { border-bottom: none; }
.settings-info-row span:last-child { font-weight: 600; }

/* ---------------------------------------------------------------------- */
/* Print styles (for "Print / Save PDF" on results page)                  */
/* ---------------------------------------------------------------------- */

@media print {
    .sidebar, .theme-toggle-floating, .page-header-actions, .monitor-actions,
    .flash-container, .btn { display: none !important; }
    .app-shell { display: block; }
    .main-content { padding: 0; max-width: none; }
    body { background: white; color: black; }
    .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* ---------------------------------------------------------------------- */
/* Public landing page (SEO)                                              */
/* ---------------------------------------------------------------------- */

.landing-wrapper { max-width: 980px; margin: 0 auto; padding: 60px 24px 80px; }

.landing-hero { text-align: center; padding: 20px 0 50px; }
.landing-hero h1 { font-size: 38px; max-width: 720px; margin: 0 auto 16px; line-height: 1.15; }
.landing-subtitle { color: var(--text-secondary); font-size: 16.5px; max-width: 560px; margin: 0 auto 28px; line-height: 1.6; }
.landing-cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-cta-note { color: var(--text-muted); font-size: 12.5px; margin-top: 14px; }

.btn-lg { padding: 14px 26px; font-size: 15.5px; }

.landing-features { padding: 30px 0; }
.landing-features h2, .landing-faq h2 { text-align: center; font-size: 24px; margin-bottom: 24px; }
.landing-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.landing-feature-card { margin-bottom: 0; }
.landing-feature-card h3 { font-size: 15px; margin-bottom: 6px; color: #a5a7ff; }

.landing-faq { padding: 30px 0; display: flex; flex-direction: column; }
.landing-faq .card { margin-bottom: 14px; }
.landing-faq h3 { font-size: 15px; }

.landing-footer { text-align: center; padding-top: 30px; }

@media (max-width: 640px) {
    .landing-hero h1 { font-size: 28px; }
}

/* ---------------------------------------------------------------------- */
/* Free Tools page                                                        */
/* ---------------------------------------------------------------------- */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.tool-card { display: flex; flex-direction: column; }
.tool-form { margin-top: 10px; }

.tool-result:empty { display: none; }
.tool-result {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border-soft);
    font-size: 13px;
}

.tool-result-heading {
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    word-break: break-all;
}

.tool-record-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-soft);
    font-size: 12.5px;
}
.tool-record-row:last-child { border-bottom: none; }

.tool-record-type {
    color: var(--text-muted);
    min-width: 90px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.tool-record-values { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-record-values code {
    background: var(--bg-3);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    word-break: break-all;
}
.tool-record-none { font-size: 12px; }

.tool-badge-row { margin-bottom: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }

.tool-whois-raw {
    background: var(--bg-3);
    padding: 12px;
    border-radius: 8px;
    font-size: 11.5px;
    line-height: 1.5;
    max-height: 320px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.tool-header-name { font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------------- */
/* Admin panel                                                            */
/* ---------------------------------------------------------------------- */

.admin-actions { display: flex; gap: 8px; white-space: nowrap; }
.admin-actions .btn { padding: 7px 12px; font-size: 12.5px; }
.admin-actions .btn:disabled { opacity: 0.4; cursor: not-allowed; }
