/*
Theme Name: Family Budget Dark
Theme URI: https://example.com/fb-dark
Author: FB Team
Description: Тёмная тема для плагина «Семейный бюджет». Полностью адаптивная, с минималистичным интерфейсом, сливается с дизайном плагина в единое приложение.
Version: 1.0.0
License: GPL v2 or later
Text Domain: family-budget-dark
*/

:root {
    --fb-bg: #0f1117;
    --fb-bg2: #161822;
    --fb-card: #1c1f2e;
    --fb-card-h: #232740;
    --fb-border: #2a2d42;
    --fb-fg: #e8eaf0;
    --fb-dim: #8b8fa8;
    --fb-accent: #00d68f;
    --fb-accent2: #00b377;
    --fb-danger: #ff6b6b;
    --fb-warn: #ffc247;
    --fb-info: #4da6ff;
    --fb-r: 14px;
    --fb-rs: 10px;
    --fb-tr: .3s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--fb-bg);
    color: var(--fb-fg);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--fb-accent); text-decoration: none; transition: var(--fb-tr); }
a:hover { color: var(--fb-info); }

/* ── Админ-бар: тёмный ── */
#wpadminbar {
    background: #0a0c14 !important;
    border-bottom: 1px solid var(--fb-border) !important;
}
#wpadminbar .ab-top-menu > li > .ab-item,
#wpadminbar .ab-top-menu > li:hover > .ab-item {
    color: var(--fb-dim) !important;
}
#wpadminbar .ab-top-menu > li:hover > .ab-item {
    color: var(--fb-fg) !important;
    background: var(--fb-bg2) !important;
}

/* ── Обёртка контента ── */
.site-wrapper {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
}

/* ── Шапка сайта ── */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    border-bottom: 1px solid var(--fb-border);
    margin-bottom: 24px;
}
.site-logo {
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--fb-accent), var(--fb-info));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fb-dim);
    background: var(--fb-card);
    border: 1.5px solid var(--fb-border);
    transition: var(--fb-tr);
}
.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--fb-accent), var(--fb-accent2));
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0,214,143,.25);
}

/* ── Записи / статьи ── */
.post-card {
    background: var(--fb-card);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-r);
    padding: 24px;
    margin-bottom: 16px;
    transition: var(--fb-tr);
}
.post-card:hover { border-color: rgba(0,214,143,.3); }
.post-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.post-card h2 a { color: var(--fb-fg); }
.post-card h2 a:hover { color: var(--fb-accent); }
.post-meta {
    font-size: 0.78rem;
    color: var(--fb-dim);
    margin-bottom: 12px;
    display: flex;
    gap: 14px;
}
.post-meta i { margin-right: 4px; }
.post-excerpt {
    font-size: 0.9rem;
    line-height: 1.65;
    color: var(--fb-dim);
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fb-accent);
}

/* ── Одиночная запись ── */
.single-header {
    margin-bottom: 24px;
}
.single-header h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 10px;
    letter-spacing: -0.5px;
}
.single-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--fb-dim);
}
.single-content h2,
.single-content h3 {
    color: var(--fb-fg);
    margin: 28px 0 12px;
}
.single-content p { margin-bottom: 16px; }
.single-content img {
    border-radius: var(--fb-rs);
    max-width: 100%;
}
.single-content blockquote {
    border-left: 3px solid var(--fb-accent);
    padding: 12px 20px;
    margin: 20px 0;
    background: var(--fb-card);
    border-radius: 0 var(--fb-rs) var(--fb-rs) 0;
    color: var(--fb-fg);
    font-style: italic;
}
.single-content ul, .single-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}
.single-content li { margin-bottom: 6px; }

/* ── Подвал ── */
.site-footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid var(--fb-border);
    font-size: 0.8rem;
    color: var(--fb-dim);
}

/* ── Пагинация ── */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 32px 0;
}
.pagination a, .pagination span {
    padding: 8px 16px;
    border-radius: var(--fb-rs);
    background: var(--fb-card);
    border: 1px solid var(--fb-border);
    color: var(--fb-dim);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--fb-tr);
}
.pagination a:hover, .pagination span.current {
    background: var(--fb-accent);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 12px rgba(0,214,143,.25);
}

/* ── Страница с бюджетом: убираем лишнее ── */
.page-template-front-page .site-header,
.page-template-front-page .site-footer {
    display: none;
}
.page-template-front-page .site-wrapper {
    max-width: 100%;
    padding: 0;
}

/* ── Формы WP (комментарии и т.д.) ── */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea,
select {
    background: var(--fb-bg2);
    border: 1.5px solid var(--fb-border);
    border-radius: var(--fb-rs);
    color: var(--fb-fg);
    padding: 12px 14px;
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: var(--fb-tr);
    width: 100%;
}
input:focus, textarea:focus {
    border-color: var(--fb-accent);
    box-shadow: 0 0 0 3px rgba(0,214,143,.15);
}
button, input[type="submit"] {
    background: linear-gradient(135deg, var(--fb-accent), var(--fb-accent2));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--fb-rs);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: var(--fb-tr);
}
button:hover, input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,214,143,.3);
}

/* ── Адаптив ── */
@media (max-width: 600px) {
    .site-header { flex-direction: column; gap: 12px; text-align: center; }
    .site-nav { justify-content: center; }
}