/* ===== Svetainių TOP lyderis — base styles ===== */
:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --border: #e5e9f2;
    --text: #1a1f2e;
    --muted: #5a6478;
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --success: #16a34a;
    --warn: #d97706;
    --danger: #dc2626;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(20,28,52,.04);
    --radius: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.inline { display: inline; }

/* ===== Header ===== */
.topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.topbar__inner {
    display: flex; align-items: center; gap: 24px;
    padding: 12px 16px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); }
.logo__icon { width: 32px; height: 32px; }
.topbar__nav { display: flex; align-items: center; gap: 18px; flex: 1; }
.topbar__nav a { color: var(--text); font-weight: 500; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch__item {
    width: 24px; height: 16px; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 3px; opacity: .7;
}
.lang-switch__item.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--primary); }
.lang-switch__item svg { width: 100%; height: 100%; }

/* ===== Buttons / form ===== */
.btn { display: inline-block; padding: 9px 16px; border-radius: 8px; border: 1px solid transparent; font-weight: 600; cursor: pointer; font-size: 14px; line-height: 1.2; }
.btn--primary { background: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.btn--danger { background: var(--danger); color: #fff; }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; }

.form { display: grid; gap: 12px; max-width: 460px; }
.form label { display: grid; gap: 6px; font-size: 14px; }
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="url"],
.form input[type="number"],
.form input[type="date"],
.form select,
.form textarea {
    padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; font: inherit; color: var(--text);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--primary); border-color: var(--primary); }
.form .check { display: flex; gap: 8px; align-items: center; }
.form .check input { width: 16px; height: 16px; }
.row { display: flex; justify-content: space-between; gap: 12px; }

/* ===== Cards / layout ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card--narrow { max-width: 480px; margin: 24px auto; }
.card--center { text-align: center; max-width: 540px; margin: 24px auto; }
.card--premium { border-color: #fcd34d; background: linear-gradient(180deg,#fffbeb 0,#fff 100%); }
.card__title { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.card__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; gap: 12px; }

.home-grid {
    display: grid;
    grid-template-columns: 240px 1fr 320px;
    gap: 16px;
    padding: 16px 0;
}
@media (max-width: 1100px) { .home-grid { grid-template-columns: 1fr; } }

.cat-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.cat-list a { display: block; padding: 6px 8px; border-radius: 6px; color: var(--text); }
.cat-list a:hover { background: var(--bg); text-decoration: none; }
.cat-list__adult { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.badge--18 { background: #fee2e2; color: #b91c1c; }

/* ===== TOP table ===== */
.top-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.top-table th { text-align: left; font-weight: 600; padding: 10px 8px; color: var(--muted); border-bottom: 2px solid var(--border); }
.top-table td { padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.top-table tr:hover td { background: var(--bg); }
.t-place { width: 50px; text-align: center; font-weight: 700; }
.t-cat { color: var(--muted); }
.t-num { width: 80px; text-align: right; }
.favicon { vertical-align: middle; margin-right: 6px; border-radius: 3px; }

.delta--up { color: var(--success); font-weight: 600; }
.delta--down { color: var(--danger); font-weight: 600; }
.delta--flat { color: var(--muted); }

.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.side-list li:last-child { border: 0; }

.premium-card { display: flex; gap: 12px; align-items: flex-start; }
.premium-card__logo { width: 48px; height: 48px; border-radius: 6px; }

/* ===== Site stats ===== */
.site-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.site-card__logo { border-radius: 8px; }
.site-card__letter { width: 48px; height: 48px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.site-card__meta { flex: 1; }
.site-card__meta h1 { margin: 0; font-size: 22px; }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.metric { background: var(--bg); padding: 10px 12px; border-radius: 8px; }
.metric__label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.chart-wrap { position: relative; height: 280px; margin: 16px 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tag { background: var(--bg); padding: 3px 10px; border-radius: 12px; font-size: 12px; color: var(--muted); }
.code { background: #1a1f2e; color: #e5e9f2; padding: 12px; border-radius: 8px; overflow-x: auto; font-family: 'Menlo', 'Consolas', monospace; font-size: 12px; }

/* ===== Alerts ===== */
.alert { padding: 10px 14px; border-radius: 8px; margin: 8px 0; font-size: 14px; }
.alert--ok { background: #dcfce7; color: #166534; }
.alert--info { background: #dbeafe; color: #1e3a8a; }
.alert--warn { background: #fef3c7; color: #92400e; }
.alert--err { background: #fee2e2; color: #991b1b; }

/* ===== Footer ===== */
.site-footer { background: var(--card); border-top: 1px solid var(--border); margin-top: 32px; padding: 24px 0; }
.site-footer__inner { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 24px; }
.site-footer__col h4 { margin: 0 0 8px; }
.site-footer__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
@media (max-width: 800px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ===== Cookie notice ===== */
.cookie-notice {
    position: fixed; bottom: 16px; left: 16px; right: 16px;
    background: #1a1f2e; color: #fff; padding: 12px 16px; border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.2); z-index: 100;
}
.cookie-notice button { background: var(--primary); color: #fff; border: 0; padding: 6px 14px; border-radius: 6px; cursor: pointer; }

/* ===== Breadcrumbs / prose ===== */
.breadcrumbs { padding: 12px 0; color: var(--muted); font-size: 13px; }
.breadcrumbs a { color: var(--muted); }
.prose { line-height: 1.6; }
.prose h2 { margin-top: 22px; font-size: 18px; }
.prose code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 13px; }

/* ===== Dashboard / lists ===== */
.dashboard-grid { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 16px 0; }
.dashboard-nav { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.dashboard-nav a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.dashboard-nav a.is-active, .dashboard-nav a:hover { background: var(--bg); text-decoration: none; }
@media (max-width: 800px) { .dashboard-grid { grid-template-columns: 1fr; } }

.list-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.list-table th, .list-table td { padding: 9px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.list-table th { color: var(--muted); font-weight: 600; }

/* ===== Status pills ===== */
.pill { display: inline-block; padding: 2px 9px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.pill--pending  { background: #fef3c7; color: #92400e; }
.pill--approved { background: #dcfce7; color: #166534; }
.pill--rejected { background: #fee2e2; color: #991b1b; }
.pill--blocked  { background: #1a1f2e; color: #fff; }
.pill--suspicious { background: #fde68a; color: #78350f; }
.pill--recheck  { background: #dbeafe; color: #1e3a8a; }

/* ===== Counter samples ===== */
.counter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.counter-grid__item { padding: 8px; background: var(--bg); border-radius: 8px; text-align: center; cursor: pointer; }
.counter-grid__item.is-active { outline: 2px solid var(--primary); }
.counter-grid img { display: block; margin: 0 auto 6px; }

/* ===== Ad blocks ===== */
.ad { display: flex; justify-content: center; margin: 12px 0; }
.ad img { max-width: 100%; height: auto; }
.text-ad { display: block; padding: 12px; background: var(--bg); border-radius: 8px; color: var(--text); }
