/* ============================================
   BINETEX BLOG — FINAL COMPLETE CSS
   ============================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', Arial, sans-serif;
    background: #eef0f5;
    color: #1a1a2e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.25s; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ============================================
   HEADER
   ============================================ */
.header {
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e8eaf0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 58px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: #43a047;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 15px;
}

.logo-text {
    color: #1a1a2e;
    font-size: 17px;
    font-weight: 700;
}

.nav { display: flex; gap: 24px; }
.nav a { color: #423d3d; font-size: 14px; font-weight: 500; }
.nav a:hover { color: #43a047; }
.nav a.active { color: #43a047; font-weight: 600; }

.burger { display: none; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: #333; border-radius: 1px; }

/* ============================================
   TOP NEWS BLOCK
   ============================================ */
.top-news {
    padding: 20px 0;
}

.top-news-wrapper {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e8eaf0;
    padding: 16px;
}

.top-news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.top-main-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid #e0e3ec;
}

.top-main-card:hover {
    transform: translateY(-2px);
}

.top-main-card:hover { opacity: 0.92; }

.top-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.top-main-card:hover .top-main-img img { transform: scale(1.03); }

.top-main-img-ph {
    width: 100%;
    height: 100%;
    background: #e4e7f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #b0b8d1;
}

.top-main-info { padding: 14px 12px 16px; }

.top-main-cat {
    display: inline-block;
    background: #eef1ff;
    color: #43a047;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.top-main-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: #1a1a2e;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.top-main-card:hover .top-main-title { color: #43a047; }

.top-main-desc {
    font-size: 13px;
    color: #8891a5;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.top-main-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f1f5;
}

.top-meta-date { font-size: 13px; color: #b0b8c7; }

.top-meta-stats { display: flex; gap: 10px; }
.top-meta-stats span { display: flex; align-items: center; gap: 3px; font-size: 13px; color: #b0b8c7; }

.top-side-list { display: grid; grid-template-columns: 1fr; gap: 0; }

.top-side-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid #f0f1f5;
    transition: background 0.25s;
}

.top-side-item:last-child { border-bottom: none; }
.top-side-item:hover { background: #f8f9fc; }

.top-side-thumb {
    width: 76px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.top-side-thumb img { width: 100%; height: 100%; object-fit: cover; }

.top-side-ph {
    width: 100%;
    height: 100%;
    background: #e4e7f1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #b0b8d1;
}

.top-side-info { flex: 1; min-width: 0; }

.top-side-title {
    font-size: 14px;
    font-weight: 400;
    color: #1a1a2e;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
    transition: color 0.25s;
}

.top-side-item:hover .top-side-title { color: #43a047; }
.top-side-date { font-size: 13px; color: #b0b8c7; }

/* ============================================
   CATEGORY SECTIONS
   ============================================ */
.cat-section { padding: 28px 0 8px; margin-bottom: 12px; }

.cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e3ec;
}

.cat-title {
    font-size: 24px;
    font-weight: 500;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-line {
    width: 4px;
    height: 20px;
    background: #43a047;
    border-radius: 2px;
    display: inline-block;
}

.cat-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 400;
    font-family: "Roboto", "Arial", sans-serif;
    color: #43a047;
    transition: gap 0.25s;
}

.cat-all:hover { gap: 7px; }

/* ============================================
   NEWS GRID 4 COLUMNS
   ============================================ */
.news-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ============================================
   NEWS CARD
   ============================================ */
.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8eaf0;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s, transform 0.3s;
}

.news-card:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,0.06);
    transform: translateY(-3px);
}

.news-card-img { width: 100%; height: 140px; overflow: hidden; }

.news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.news-card:hover .news-card-img img { transform: scale(1.04); }

.news-card-ph {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8ebf7, #d5daf0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b8d1;
    font-size: 32px;
}

.news-card-body {
    padding: 14px 14px 12px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #1a1a2e;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.25s;
}

.news-card:hover .news-card-title { color: #43a047; }

.news-card-text {
    font-size: 13px;
    color: #8891a5;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.news-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid #f0f1f5;
}

.news-card-date { font-size: 13px; color: #b0b8c7; }
.news-card-stats { display: flex; gap: 8px; }
.news-card-stats span { display: flex; align-items: center; gap: 3px; font-size: 13px; color: #b0b8c7; }

/* ============================================
   PAGE HEADER (category page)
   ============================================ */
.page-header-simple {
    background: #fff;
    padding: 22px 0;
    border-bottom: 1px solid #e8eaf0;
}

.page-header-simple h1 { font-size: 24px; font-weight: 800; color: #1a1a2e; margin-bottom: 4px; }
.page-header-simple p { color: #8891a5; font-size: 14px; }

.breadcrumb-line {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    margin-bottom: 10px;
}

.breadcrumb-line a { color: #8891a5; }
.breadcrumb-line a:hover { color: #4361ee; }
.breadcrumb-line span { color: #ccc; }
.breadcrumb-line .current { color: #555; }

.blog-section { padding: 28px 0 56px; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 36px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #dde0e8;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #888;
    transition: all 0.25s;
}

.page-link:hover { border-color: #4361ee; color: #4361ee; }
.page-link.active { background: #4361ee; color: #fff; border-color: #4361ee; }
.page-link.disabled { opacity: 0.3; pointer-events: none; }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state { text-align: center; padding: 60px 20px; color: #b0b8c7; }
.empty-state .icon { font-size: 48px; margin-bottom: 10px; opacity: 0.5; }
.empty-state h3 { font-size: 17px; color: #888; }

/* ============================================
   SINGLE POST PAGE
   ============================================ */
.post-page {
    padding: 24px 0 48px;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    align-items: start;
}

/* Breadcrumb НАД белым блоком */
.post-breadcrumb-outer {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    margin-bottom: 12px;
}

.post-breadcrumb-outer a {
    color: #8891a5;
}

.post-breadcrumb-outer a:hover {
    color: #4361ee;
}

.post-breadcrumb-outer span {
    color: #ccc;
}

.post-breadcrumb-outer .current {
    color: #555;
}

/* === POST CARD (единый белый блок) === */
.post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaf0;
}

/* Мета-бар над фото: дата слева, просмотры справа */
.post-card-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 12px;
}

.post-meta-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #8891a5;
}

.post-meta-date svg {
    stroke: #b0b8c7;
}

.post-meta-right {
    display: flex;
    gap: 14px;
}

.post-meta-views,
.post-meta-comments {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #8891a5;
}

.post-meta-views svg,
.post-meta-comments svg {
    stroke: #b0b8c7;
}

/* Картинка */
.post-card-image {
    width: 100%;
    height: 380px;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Тело карточки */
.post-card-body {
    padding: 28px 32px 32px;
}

.post-card-title {
    font-size: 24px;
    font-weight: 500;
    color: #242424;
    line-height: 1.3;
    letter-spacing: -0.3px;
    padding: 20px 20px 0;
    margin: 0;
}

.post-card-content {
    line-height: 1.85;
    font-size: 15px;
    color: #444;
}

.post-card-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 28px 0 10px;
}

.post-card-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 22px 0 8px;
}

.post-card-content p { margin-bottom: 14px; }
.post-card-content ul, .post-card-content ol { margin: 10px 0 10px 22px; }
.post-card-content li { margin-bottom: 5px; list-style: disc; color: #555; }
.post-card-content ol li { list-style: decimal; }

.post-card-content blockquote {
    border-left: 3px solid #4361ee;
    padding: 12px 16px;
    background: #f5f7ff;
    margin: 16px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.post-card-content a { color: #4361ee; }
.post-card-content a:hover { text-decoration: underline; }
.post-card-content img { border-radius: 8px; margin: 16px 0; }

.post-card-content code {
    background: #f5f7ff;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 13px;
    color: #4361ee;
}

.post-card-content pre {
    background: #1a1a2e;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
    font-size: 13px;
}

.post-card-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* === COMMENTS CARD === */
.post-comments-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8eaf0;
    margin-top: 20px;
}

.post-comments-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.no-comments {
    color: #b0b8c7;
    font-size: 14px;
    padding: 16px 0;
}

.comments-count-badge {
    background: #4361ee;
    color: #fff;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 12px;
}

.comment-item {
    padding: 14px 0;
    border-bottom: 1px solid #f0f1f5;
}

.comment-item:last-child { border-bottom: none; }

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4361ee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
}

.comment-name { font-weight: 600; font-size: 13px; color: #1a1a2e; }
.comment-date { font-size: 11px; color: #b0b8c7; }

.comment-text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    padding-left: 40px;
}

.comment-form {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f0f1f5;
}

.comment-form h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.form-group { margin-bottom: 10px; }

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #dde0e8;
    border-radius: 7px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #f9fafb;
    color: #1a1a2e;
    transition: border-color 0.25s;
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #bbb; }

.form-group input:focus,
.form-group textarea:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67,97,238,0.06);
    background: #fff;
}

.form-group textarea { resize: vertical; min-height: 90px; }

.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    background: #4361ee;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s;
}

.btn-submit:hover { background: #3651d4; }

.comment-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { position: sticky; top: 76px; }

.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    border: 1px solid #e8eaf0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.sidebar-widget h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f1f5;
}

.sidebar-post-item {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #f7f8fc;
}

.sidebar-post-item:last-child { border-bottom: none; }

.sidebar-post-thumb {
    width: 58px;
    height: 42px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.sidebar-post-info h4 {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.35;
    margin-bottom: 2px;
    transition: color 0.25s;
}

.sidebar-post-item:hover h4 { color: #4361ee; }
.sidebar-post-info span { font-size: 10px; color: #b0b8c7; }

.sidebar-categories a {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #555;
    border-bottom: 1px solid #f7f8fc;
}

.sidebar-categories a:last-child { border-bottom: none; }
.sidebar-categories a:hover { color: #4361ee; }

.sidebar-categories a span {
    background: #f2f3f7;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 11px;
    color: #b0b8c7;
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-section {
    padding: 36px 0 48px;
    background: #e8eaf2;
}

.related-section h2 {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 18px;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.45);
    padding: 40px 0 0;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 28px;
    padding-bottom: 28px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.footer-logo .logo-icon { width: 26px; height: 26px; font-size: 12px; }
.footer-logo .logo-text { font-size: 15px; color: #fff; }
.footer-desc { font-size: 12px; line-height: 1.6; color: rgba(255,255,255,0.28); }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.footer-col ul li { margin-bottom: 5px; }
.footer-col ul a { font-size: 12px; color: rgba(255,255,255,0.32); }
.footer-col ul a:hover { color: #4361ee; }

.subscribe-form-footer { display: flex; gap: 6px; }

.subscribe-form-footer input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 5px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    font-size: 12px;
    outline: none;
}

.subscribe-form-footer input::placeholder { color: rgba(255,255,255,0.2); }
.subscribe-form-footer input:focus { border-color: #4361ee; }

.subscribe-form-footer button {
    padding: 7px 12px;
    background: #4361ee;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 14px 0;
    text-align: center;
    font-size: 11px;
    color: rgba(255,255,255,0.18);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .top-news-grid { grid-template-columns: 1fr; }
    .top-side-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
    .top-side-item { border-bottom: 1px solid #f0f1f5; }
    .news-grid-4 { grid-template-columns: repeat(3, 1fr); }
    .post-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: fixed;
        top: 58px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 14px 18px;
        gap: 10px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.06);
        border-bottom: 1px solid #eee;
        z-index: 999;
    }
    .nav.open { display: flex; }
    .burger { display: flex; }
    .news-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .top-side-list { grid-template-columns: 1fr; }
    .top-main-img { height: 200px; }
    .top-news-wrapper { padding: 12px; }
    .post-card-body { padding: 20px; }
    .post-card-image { height: 240px; }
    .post-card-title { font-size: 22px; }
    .post-card-meta-bar { padding: 10px 16px 8px; }
    .post-comments-card { padding: 20px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .cat-header { flex-direction: column; gap: 6px; align-items: flex-start; }
}

@media (max-width: 480px) {
    .news-grid-4 { grid-template-columns: 1fr; }
    .top-main-img { height: 170px; }
    .top-main-title { font-size: 16px; }
    .top-news-wrapper { padding: 10px; }
    .post-card-body { padding: 16px; }
    .post-card-image { height: 200px; }
    .post-card-title { font-size: 20px; }
    .post-card-meta-bar { padding: 8px 14px 6px; }
}

/* ============================================
   ADMIN STYLES
   ============================================ */
.admin-body { background: #f0f2f5; min-height: 100vh; color: #333; }

.admin-header {
    background: #1a1a2e;
    padding: 0 20px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header .logo-text { font-size: 15px; color: #fff; }
.admin-nav { display: flex; gap: 14px; align-items: center; }
.admin-nav a { color: rgba(255,255,255,0.45); font-size: 12px; font-weight: 500; }
.admin-nav a:hover, .admin-nav a.active { color: #fff; }
.admin-container { max-width: 1060px; margin: 22px auto; padding: 0 18px; }

.admin-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #eee;
}

.admin-card-header h2 { font-size: 15px; font-weight: 700; color: #1a1a2e; }

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s;
    text-decoration: none;
}

.admin-btn-primary { background: #4361ee; color: #fff; }
.admin-btn-primary:hover { background: #3651d4; }
.admin-btn-secondary { background: #f3f4f6; color: #555; }
.admin-btn-secondary:hover { background: #e5e7eb; }
.admin-btn-danger { background: #fee2e2; color: #dc2626; }
.admin-btn-danger:hover { background: #fca5a5; }
.admin-btn-sm { padding: 3px 9px; font-size: 11px; }

.admin-table { width: 100%; border-collapse: collapse; }

.admin-table th {
    text-align: left;
    padding: 9px 18px;
    background: #fafbfc;
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-table td {
    padding: 10px 18px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: #444;
}

.admin-table tr:hover td { background: #fafbfc; }

.admin-form { padding: 22px; }
.admin-form .form-group { margin-bottom: 14px; }
.admin-form label { display: block; font-size: 12px; font-weight: 600; color: #444; margin-bottom: 3px; }

.admin-form input[type="text"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #fff;
    color: #333;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    border-color: #4361ee;
    box-shadow: 0 0 0 2px rgba(67,97,238,0.06);
}

.admin-form textarea { min-height: 240px; resize: vertical; }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.stat-card .stat-number { font-size: 26px; font-weight: 800; color: #1a1a2e; }
.stat-card .stat-label { font-size: 11px; color: #aaa; margin-top: 2px; }
.stat-card .stat-icon { font-size: 18px; margin-bottom: 6px; }

.status-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.status-published { background: #ecfdf5; color: #065f46; }
.status-draft { background: #fef3c7; color: #92400e; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #ecfdf5; color: #065f46; }

.admin-alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
}

.admin-alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.admin-alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

@media (max-width: 768px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-nav { gap: 8px; }
    .admin-nav a { font-size: 10px; }
}
/* ================================================================
   ОБНОВЛЁННАЯ ШАПКА — авторизация как на главном сайте
   ================================================================ */

/* Блок авторизации в шапке */
.blog-header-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* Базовая кнопка */
.blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
    line-height: 1;
}

/* Зелёная кнопка */
.blog-btn-primary {
    background: #43a047;
    color: #fff;
    border-color: #43a047;
}
.blog-btn-primary:hover {
    background: #388e3c;
    border-color: #388e3c;
    color: #fff;
}

/* Контурная кнопка */
.blog-btn-outline {
    background: transparent;
    color: #43a047;
    border-color: #43a047;
}
.blog-btn-outline:hover {
    background: #43a047;
    color: #fff;
}

/* Полная ширина (в попапе) */
.blog-btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    font-size: 15px;
}

/* Кнопка "Создать сделку" */
.blog-btn-create span { display: inline; }

/* Кнопка мобайл — скрыта на десктопе */
.blog-btn-mobile { display: none; }

/* На десктопе — показываем две кнопки, скрываем мобайл */
@media (min-width: 769px) {
    .blog-btn-desktop { display: inline-flex; }
    .blog-btn-mobile  { display: none !important; }
}

/* На мобайле — скрываем две кнопки, показываем одну */
@media (max-width: 768px) {
    .blog-btn-desktop { display: none !important; }
    .blog-btn-mobile  { display: inline-flex; }
    .blog-btn-create span { display: none; }  /* скрываем текст, оставляем иконку */
    .blog-btn-create { padding: 8px 10px; }
}

/* ── Дропдаун пользователя ── */
.blog-user-menu { position: relative; }

.blog-user-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f5f7fa;
    border: 1px solid #e0e3ea;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    font-family: inherit;
    transition: background .2s;
}
.blog-user-btn:hover { background: #edf0f5; }
.blog-user-btn .fa-user-circle { font-size: 16px; color: #43a047; }
.blog-chevron {
    font-size: 10px;
    color: #999;
    transition: transform .2s;
}
.blog-user-dropdown.open ~ * .blog-chevron,
.blog-user-btn:has(+ .blog-user-dropdown.open) .blog-chevron {
    transform: rotate(180deg);
}

.blog-user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid #e0e3ea;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 185px;
    z-index: 500;
    overflow: hidden;
}
.blog-user-dropdown.open { display: block; }
.blog-user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    transition: background .15s;
}
.blog-user-dropdown a:hover { background: #f5f7fa; }
.blog-user-dropdown a i { width: 14px; color: #888; }
.blog-user-dropdown hr {
    border: none;
    border-top: 1px solid #f0f0f0;
    margin: 4px 0;
}

/* ── Бургер ── */
.burger { order: 3; }

@media (max-width: 768px) {
    .header-inner { flex-wrap: nowrap; gap: 10px; }
    .burger { display: flex; }
}

/* ================================================================
   AUTH POPUP — точная копия стилей с главного сайта
   ================================================================ */
.auth-popup-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.auth-popup-backdrop.active { display: flex; }

.auth-popup {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    width: calc(100% - 32px);
    max-width: 400px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.auth-popup-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.auth-popup-close:hover { color: #333; }

.auth-popup h3 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}
.auth-popup-sub {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 20px;
}

.auth-form-group { margin-bottom: 14px; }
.auth-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 5px;
}
.auth-form-group input {
    width: 100%;
    border: 1px solid #dbe1e8;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
    box-sizing: border-box;
    background: #fff;
    color: #1a1a2e;
}
.auth-form-group input:focus { border-color: #43a047; box-shadow: 0 0 0 3px rgba(67,160,71,.08); }
.auth-form-group input::placeholder { color: #bbb; }

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}
.auth-remember input { width: auto; margin: 0; }

.auth-popup-actions { margin-top: 4px; }

.auth-popup-register {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #6b7280;
}
.auth-popup-register a {
    color: #43a047;
    font-weight: 600;
    text-decoration: none;
}
.auth-popup-register a:hover { text-decoration: underline; }

@media (max-width: 480px) {
    .auth-popup { padding: 28px 20px; }
    .auth-popup h3 { font-size: 20px; }
}
/* Навигация вплотную к логотипу, кнопки справа */
.header-inner {
    justify-content: flex-start;
}

.header-inner .nav {
    margin-left: 24px; /* отступ от логотипа */
    margin-right: auto; /* толкает кнопки вправо */
}

.blog-header-auth {
    margin-left: 0; /* убираем старый margin-left: auto */
}