:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --ink: #1a1d23;
    --ink-soft: #5c6270;
    --line: #e2e4e9;
    --accent: #3b5bfd;
    --accent-hover: #2c46d6;
    --danger: #c0392b;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }
.admin-bar {
    background: var(--ink); color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 28px;
}
.admin-bar a.brand { font-weight: 700; font-size: 1.05rem; }
.admin-bar nav { display: flex; align-items: center; gap: 18px; font-size: 0.92rem; }
.admin-bar nav a { opacity: 0.8; }
.admin-bar nav a:hover { opacity: 1; }
.admin-bar button {
    background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff;
    padding: 7px 14px; border-radius: 7px; font-size: 0.85rem; cursor: pointer;
}
.admin-bar button:hover { background: rgba(255,255,255,0.1); }

.admin-main { flex: 1; padding: 40px 28px; max-width: 1100px; margin: 0 auto; width: 100%; }
.admin-main h1 { font-size: 1.6rem; margin-bottom: 6px; }
.admin-main .lead { color: var(--ink-soft); margin-bottom: 28px; }

.site-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.site-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.site-card h2 { font-size: 1.15rem; }
.site-card .count { font-size: 2rem; font-weight: 700; color: var(--accent); }
.site-card .count-label { font-size: 0.82rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.site-card .latest { font-size: 0.85rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.site-card a.view { font-weight: 600; color: var(--accent); font-size: 0.9rem; }
.site-card a.view:hover { color: var(--accent-hover); }

.back-link { display: inline-block; margin-bottom: 18px; font-size: 0.88rem; color: var(--ink-soft); }
.back-link:hover { color: var(--ink); }

table.leads { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
table.leads th, table.leads td {
    text-align: left; padding: 12px 16px; font-size: 0.88rem; border-bottom: 1px solid var(--line);
    max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.leads th { background: #fafbfc; font-weight: 600; color: var(--ink-soft); text-transform: capitalize; }
table.leads tr:last-child td { border-bottom: none; }
table.leads tr:hover td { background: #fafbfc; white-space: normal; }

.empty-state { padding: 40px; text-align: center; color: var(--ink-soft); background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; }
.pagination { margin-top: 20px; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    padding: 40px; width: 100%; max-width: 380px; box-shadow: 0 20px 40px rgba(0,0,0,0.06);
}
.login-card h1 { font-size: 1.3rem; margin-bottom: 6px; }
.login-card p.lead { margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field input {
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem;
    font-family: inherit;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.btn-submit {
    width: 100%; padding: 11px; border-radius: 8px; border: none;
    background: var(--accent); color: #fff; font-weight: 600; font-size: 0.95rem; cursor: pointer;
}
.btn-submit:hover { background: var(--accent-hover); }
.field-error { color: var(--danger); font-size: 0.82rem; margin-top: -8px; margin-bottom: 12px; }
