/* ---------------------------------------------------------------------------
   Site Checker — stylesheet (no frameworks)
   --------------------------------------------------------------------------- */

:root {
    --bg:          #f4f6fa;
    --surface:     #ffffff;
    --surface-alt: #f8fafc;
    --border:      #e2e8f0;
    --text:        #1e2836;
    --text-muted:  #6b7a90;
    --primary:     #2563eb;
    --primary-dark:#1d4ed8;
    --green:       #16a34a;
    --red:         #dc2626;
    --yellow:      #eab308;
    --gray:        #cbd5e1;
    --radius:      10px;
    --shadow:      0 1px 2px rgba(16,24,40,.06), 0 4px 12px rgba(16,24,40,.05);
    --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .6em; font-weight: 600; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p  { margin: 0 0 1em; }
small { font-size: 12.5px; }

code, .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
}

/* ------------------------------------------------------------------ layout */

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

.sidebar {
    width: 232px;
    flex: 0 0 232px;
    background: #101a2b;
    color: #c8d3e4;
    display: flex;
    flex-direction: column;
    padding: 18px 0;
}
.sidebar .brand {
    display: block;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    padding: 0 20px 18px;
    text-decoration: none;
    letter-spacing: .2px;
}
.sidebar .brand span { color: #4ade80; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c8d3e4;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14.5px;
    text-decoration: none;
}
.sidebar nav a:hover { background: #1b2942; color: #fff; text-decoration: none; }
.sidebar nav a.active { background: var(--primary); color: #fff; }
.sidebar .spacer { flex: 1; }
.sidebar .side-foot { padding: 12px 20px 0; font-size: 12px; color: #7d8ba3; }
.sidebar .side-foot a { color: #9fb0c9; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 26px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.topbar .title { font-size: 17px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .user { font-size: 13.5px; color: var(--text-muted); }

.content { padding: 24px 26px 60px; max-width: 1240px; width: 100%; }

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-bottom: 18px;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title .spacer { flex: 1; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
}
.stat .value { font-size: 28px; font-weight: 650; line-height: 1.1; }
.stat .label { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.stat.red   .value { color: var(--red); }
.stat.green .value { color: var(--green); }
.stat.yellow .value { color: #b45309; }

/* ------------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
table.data th, table.data td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.data th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--surface-alt);
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: #f9fbff; }
table.data td.wrap, table.data th.wrap { white-space: normal; }
table.data .domain { font-weight: 600; }
table.data .domain small { display: block; font-weight: 400; color: var(--text-muted); }

/* -------------------------------------------------------------- status dot */

.dot {
    display: inline-block;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: var(--gray);
    vertical-align: middle;
    box-shadow: 0 0 0 2px rgba(0,0,0,.04) inset;
}
.dot.ok       { background: var(--green); }
.dot.critical { background: var(--red); }
.dot.warning  { background: var(--yellow); }
.dot.unknown  { background: var(--gray); }
.dot-lg { width: 14px; height: 14px; }

.status-cell { text-align: center; }
.status-line { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.status-line:last-child { border-bottom: 0; }
.status-line .name { width: 170px; font-weight: 500; }
.status-line .val { color: var(--text-muted); font-size: 13.5px; word-break: break-word; }

/* ------------------------------------------------------------------ badges */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #eef2f7;
    color: #475569;
}
.badge.green  { background: #dcfce7; color: #15803d; }
.badge.red    { background: #fee2e2; color: #b91c1c; }
.badge.yellow { background: #fef3c7; color: #a16207; }
.badge.blue   { background: #dbeafe; color: #1d4ed8; }
.badge.gray   { background: #eef2f7; color: #64748b; }

/* ------------------------------------------------------------------ forms */

.form-row { margin-bottom: 14px; }
label.lbl { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 5px; }

input[type=text], input[type=email], input[type=password], input[type=url], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14.5px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.hint { color: var(--text-muted); font-size: 12.5px; margin-top: 4px; }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--primary);
    color: #fff;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.4;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: #fff; border-color: var(--border); color: var(--text); }
.btn.secondary:hover { background: var(--surface-alt); color: var(--text); }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #b91c1c; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.block { display: block; width: 100%; text-align: center; }

.checkbox { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.checkbox input { margin-top: 3px; }

/* ------------------------------------------------------------------ alerts */

.alert {
    padding: 11px 14px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert.success { background: #dcfce7; border-color: #bbf7d0; color: #14532d; }
.alert.error   { background: #fee2e2; border-color: #fecaca; color: #7f1d1d; }
.alert.warning { background: #fef3c7; border-color: #fde68a; color: #713f12; }
.alert.info    { background: #dbeafe; border-color: #bfdbfe; color: #1e3a8a; }

/* ------------------------------------------------------------- guest pages */

.guest {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 55%, #24344d 100%);
}
.guest-box {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 28px;
    box-shadow: 0 20px 45px rgba(2,6,23,.35);
}
.guest-box .brand {
    font-size: 20px; font-weight: 650; margin-bottom: 4px; color: #0f172a;
    display: block; text-align: center; text-decoration: none;
}
.guest-box .brand span { color: var(--green); }
.guest-box .sub { text-align: center; color: var(--text-muted); font-size: 13.5px; margin-bottom: 20px; }
.guest-links { margin-top: 16px; text-align: center; font-size: 13.5px; color: var(--text-muted); }

/* ------------------------------------------------------------------- misc */

.muted { color: var(--text-muted); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt16 { margin-top: 16px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.inline-form { display: inline; }

.empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty h3 { color: var(--text); }

.progress-note { font-size: 13px; color: var(--text-muted); }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-muted); }
.legend span { display: flex; align-items: center; gap: 6px; }

.lang-switch { font-size: 13px; }
.lang-switch a { color: var(--text-muted); margin-left: 8px; }
.lang-switch a.active { color: var(--primary); font-weight: 600; }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a {
    padding: 8px 14px; font-size: 14px; color: var(--text-muted);
    border-bottom: 2px solid transparent; text-decoration: none;
}
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ------------------------------------------------------------- responsive */

@media (max-width: 1050px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; flex: none; padding: 12px 0; }
    .sidebar nav { flex-direction: row; overflow-x: auto; }
    .sidebar nav a { white-space: nowrap; }
    .sidebar .side-foot { display: none; }
    .content { padding: 16px 14px 50px; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .status-line .name { width: 130px; }
}
