:root {
    --bg: #f7f8fa;
    --card-bg: #ffffff;
    --border: #e7e9ee;
    --text: #14171a;
    --text-muted: #64707d;
    --accent: #d5222b;
    --accent-dark: #a91920;
    --accent-soft: #fdecec;
    --radius: 14px;
    --radius-sm: 8px;
    --max-width: 700px;
    --shadow-sm: 0 1px 2px rgba(20, 23, 26, 0.05);
    --shadow-md: 0 8px 24px rgba(20, 23, 26, 0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

a { color: var(--accent-dark); text-decoration: none; transition: color 0.15s ease; }
a:hover { text-decoration: none; color: var(--accent); }

h1, h2, h3 { letter-spacing: -0.02em; }

/* Header */
.site-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}
.brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -0.03em;
}
.brand:hover { text-decoration: none; color: var(--accent-dark); }
.nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    font-size: 0.92rem;
    row-gap: 8px;
}
.nav-link {
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}
.nav-link:hover { color: var(--accent); }
.nav-user {
    color: var(--text-muted);
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    white-space: nowrap;
}
.nav-user:hover { color: var(--accent); text-decoration: none; }

/* Search bar (in header) */
.search-wrap { padding-top: 0 !important; padding-bottom: 12px !important; }
.search-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    min-width: 16px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}
.search-form input[type="search"] {
    width: 100%;
    box-sizing: border-box;
    padding: 11px 16px 11px 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}
.search-form input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }

/* Avatars */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    flex-shrink: 0;
}
.avatar-sm { width: 22px; height: 22px; font-size: 0.68rem; }
.avatar-md { width: 40px; height: 40px; font-size: 1rem; }
.avatar-lg { width: 88px; height: 88px; font-size: 2rem; }
img.avatar { object-fit: cover; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
    font-family: var(--font);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(213, 34, 43, 0.25);
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-danger {
    background: #fff;
    color: var(--accent);
    border-color: var(--border);
}
.btn-danger:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
.btn-sm { padding: 5px 12px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn:not(.btn-primary):not(.btn-danger) {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
}
.btn:not(.btn-primary):not(.btn-danger):hover { background: var(--border); }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    font-size: 0.95rem;
    animation: fadeInUp 0.25s ease;
}
.alert-error { background: #fdecec; color: #8a1c1c; border: 1px solid #f3c1c1; }
.alert-success { background: #e9f8ee; color: #1e6a3a; border: 1px solid #bfe8cc; }

/* Category nav — un singur rând, care se derulează spre dreapta. Săgețile
   apar doar când mai e ceva de derulat în direcția respectivă (vezi JS din
   footer.php) — glisarea directă (touch/mouse) funcționează oricum, săgețile
   sunt doar un indiciu vizual clar că se poate continua spre dreapta. */
.category-carousel { position: relative; padding: 18px 0 4px; }
.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 2px;
    margin: -2px;
}
.category-nav::-webkit-scrollbar { display: none; }
.carousel-arrow {
    position: absolute;
    top: 18px;
    bottom: 4px;
    width: 44px;
    border: none;
    background: none;
    padding: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}
.carousel-arrow.is-visible { opacity: 1; pointer-events: auto; }
.carousel-arrow-right { right: 0; justify-content: flex-end; background: linear-gradient(to right, transparent, var(--bg) 60%); }
.carousel-arrow-left { left: 0; justify-content: flex-start; background: linear-gradient(to left, transparent, var(--bg) 60%); }
.carousel-arrow-circle {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    font-size: 1.1rem;
    line-height: 1;
}
.carousel-arrow:hover .carousel-arrow-circle { border-color: var(--accent); color: var(--accent); }
.category-chip {
    flex-shrink: 0;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s ease;
}
.category-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.category-chip.active {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}
.category-chip.active:hover { color: #fff; }

.badge-category {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--accent-dark);
    background: var(--accent-soft);
    padding: 3px 9px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.badge-category:hover { color: var(--accent); text-decoration: none; }

/* Feed */
.feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
}
.feed-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    gap: 14px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    animation: fadeInUp 0.35s ease both;
}
.feed-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.feed-item:nth-child(1) { animation-delay: 0.02s; }
.feed-item:nth-child(2) { animation-delay: 0.06s; }
.feed-item:nth-child(3) { animation-delay: 0.1s; }
.feed-item:nth-child(4) { animation-delay: 0.14s; }
.feed-item:nth-child(5) { animation-delay: 0.18s; }
.feed-item-thumb {
    flex: 0 0 104px;
    width: 104px;
    height: 104px;
    border-radius: 10px;
    overflow: hidden;
    display: block;
    background: var(--bg);
}
.feed-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.feed-item:hover .feed-item-thumb img { transform: scale(1.05); }
.feed-item-body { flex: 1; min-width: 0; }
.feed-item-title { margin: 0 0 6px; font-size: 1.08rem; font-weight: 700; }
.feed-item-title a { color: var(--text); }
.feed-item-excerpt {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 0.93rem;
}
.feed-item-meta {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.83rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.post-author-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-weight: 600;
}
.post-author-link:hover { color: var(--accent); text-decoration: none; }

/* Aprecieri / comentarii / citiri (flux + pagina știrii) */
.feed-item-stats {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 10px;
}
.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.83rem;
    color: var(--text-muted);
    font-weight: 500;
}
.stat-icon { width: 17px; height: 17px; flex-shrink: 0; }
.like-btn {
    background: none;
    border: none;
    padding: 4px 6px;
    margin: -4px -6px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font);
    transition: color 0.15s ease, background 0.15s ease;
}
.like-btn:hover { background: var(--accent-soft); color: var(--accent-dark); }
.like-btn.liked { color: var(--accent); }
.like-btn.liked .like-icon path { fill: var(--accent); stroke: var(--accent); }
.like-btn:disabled { opacity: 0.6; cursor: default; }
.post-full-stats { margin: 4px 0 22px; padding-top: 14px; border-top: 1px solid var(--border); }
.post-full-stats .stat-item { font-size: 0.9rem; }
.post-full-stats .stat-icon { width: 19px; height: 19px; }

/* Rândul de distribuire pe rețele sociale, pe pagina unei știri */
.share-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    flex-wrap: wrap;
}
.share-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.share-btn svg { width: 17px; height: 17px; }
.share-btn:hover { transform: translateY(-1px); text-decoration: none; }
.share-facebook:hover { color: #1877f2; border-color: #1877f2; }
.share-whatsapp:hover { color: #25d366; border-color: #25d366; }
.share-x:hover { color: #0f1419; border-color: #0f1419; }
.share-telegram:hover { color: #229ed9; border-color: #229ed9; }
.share-copy:hover { color: var(--accent); border-color: var(--accent); }
.share-copy.copied { color: #fff; background: #16a34a; border-color: #16a34a; }

/* Pagina de profil */
.profile-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin: 18px 0;
    box-shadow: var(--shadow-sm);
}
.profile-header-info { flex: 1; min-width: 200px; }
.profile-username { margin: 0 0 4px; font-size: 1.4rem; font-weight: 800; }
.profile-joined { margin: 0 0 12px; color: var(--text-muted); font-size: 0.85rem; }
.profile-bio { margin: 0 0 14px; white-space: pre-wrap; font-size: 0.98rem; }
.profile-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.profile-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.15s ease;
}
.profile-link-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.profile-link-btn:hover { box-shadow: var(--shadow-sm); text-decoration: none; }
.profile-link-website:hover { border-color: var(--accent); color: var(--accent-dark); }
.profile-link-facebook:hover { border-color: #1877f2; color: #1877f2; }
.profile-link-x:hover { border-color: #0f1419; color: #0f1419; }
.profile-link-instagram:hover { border-color: #d6249f; color: #d6249f; }
.profile-posts-title { font-size: 1.1rem; font-weight: 700; margin: 24px 0 4px; }

/* Editare profil (account.php) */
.account-avatar-row { display: flex; align-items: center; gap: 16px; margin: 6px 0 4px; }
.account-avatar-controls { display: flex; flex-direction: column; gap: 8px; }
.account-avatar-controls input[type="file"] { font-size: 0.85rem; }

/* Cutia "Populare" de pe prima pagină */
.trending-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px 16px;
    margin: 18px 0 4px;
    box-shadow: var(--shadow-sm);
}
.trending-tabs { display: flex; gap: 8px; margin-bottom: 10px; }
.trending-tab {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
}
.trending-tab.active { background: var(--text); border-color: var(--text); color: #fff; }
.trending-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.trending-list[hidden] { display: none; }
.trending-list li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 0.9rem;
}
.trending-rank { color: var(--text-muted); font-weight: 700; width: 14px; flex-shrink: 0; }
.trending-list a { color: var(--text); font-weight: 600; flex: 1; min-width: 0; }
.trending-list a:hover { color: var(--accent); }
.trending-count { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; flex-shrink: 0; }

/* Comentarii */
.comments-section { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 16px; }
.comment-list { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.comment-item { display: flex; gap: 10px; }
.comment-body-wrap { flex: 1; min-width: 0; }
.comment-meta { margin: 0 0 2px; font-size: 0.8rem; color: var(--text-muted); }
.comment-body { margin: 0; white-space: pre-wrap; font-size: 0.95rem; }
.comment-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.comment-form textarea {
    width: 100%;
    min-height: 90px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    resize: vertical;
    box-sizing: border-box;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .btn { align-self: flex-start; }
.comment-login-hint { color: var(--text-muted); font-size: 0.9rem; }

.empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 48px 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 40px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Single post */
.post-full { animation: fadeInUp 0.3s ease; }
.post-full h1 { margin: 4px 0 10px; font-size: 1.65rem; font-weight: 800; line-height: 1.25; }
.post-images {
    display: grid;
    gap: 6px;
    margin: 16px 0;
    border-radius: var(--radius);
    overflow: hidden;
}
.post-images img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-images-1 { grid-template-columns: 1fr; }
.post-images-1 img { max-height: 480px; }
.post-images-2 { grid-template-columns: 1fr 1fr; }
.post-images-2 img { height: 300px; }
.post-images-3 { grid-template-columns: 1fr 1fr; }
.post-images-3 img:first-child { grid-row: span 2; height: 100%; }
.post-images-3 img:not(:first-child) { height: 147px; }

.post-body {
    font-size: 1.06rem;
    white-space: pre-wrap;
    margin: 20px 0;
}
.post-body a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 2px; }
.post-body a:hover { color: var(--accent); }
.post-body ul, .post-body ol { margin: 0 0 16px; padding-left: 24px; white-space: normal; }
.post-body li { margin: 4px 0; }
.post-body blockquote {
    margin: 16px 0;
    padding: 8px 16px;
    border-left: 3px solid var(--border);
    color: var(--text-muted);
    font-style: italic;
    white-space: normal;
}
.post-body h3, .post-body h4 { margin: 20px 0 8px; white-space: normal; }
.post-body code { background: var(--bg); padding: 2px 6px; border-radius: 4px; font-size: 0.92em; }
.post-body pre { background: var(--bg); padding: 12px; border-radius: var(--radius-sm); overflow-x: auto; white-space: pre-wrap; }
.post-body pre code { background: none; padding: 0; }
.post-owner-actions { margin: 20px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-owner-actions-delete { display: inline; margin: 0; }

/* Grid de imagini existente pe pagina de editare a unei știri */
.edit-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 4px 0 16px;
}
.edit-image-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-muted);
    cursor: pointer;
}
.edit-image-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.edit-image-item span { display: flex; align-items: center; gap: 4px; }

.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 20px; }
.tag {
    display: inline-block;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 11px;
    border-radius: 999px;
    transition: all 0.15s ease;
}
a.tag:hover {
    background: var(--accent-soft);
    border-color: var(--accent);
    color: var(--accent-dark);
    text-decoration: none;
}

/* Search results page */
.search-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
    margin: 28px 0 4px;
}
/* Secțiunea „caută și pe alte motoare de căutare” */
.external-search-section {
    margin: 18px 0;
    padding: 18px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #f2f9ff 0%, var(--card-bg) 60%);
    border: 1px solid #dceafd;
    animation: fadeInUp 0.3s ease;
}
.external-search-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #2563eb;
    margin-bottom: 12px;
}
.external-search-icon { width: 14px; height: 14px; flex-shrink: 0; }
.external-search-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.external-search-btn {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.external-search-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    text-decoration: none;
}

/* Ad slots */
.ad-slot {
    margin: 18px 0;
    padding: 14px;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    text-align: center;
    overflow: hidden;
}
.ad-slot-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Forms */
.post-form, .auth-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin: 16px 0;
    max-width: 520px;
    box-shadow: var(--shadow-sm);
}
.post-form-actions { display: flex; gap: 10px; margin-top: 10px; align-items: center; }
.post-form-actions .btn { flex: 0 0 auto; text-align: center; }
.post-form label, .auth-form label {
    font-weight: 600;
    font-size: 0.88rem;
    margin-top: 10px;
}
.post-form input[type="text"],
.post-form input[type="email"],
.post-form input[type="password"],
.post-form input[type="url"],
.post-form select,
.post-form textarea,
.post-form input[type="file"],
.auth-form input,
.auth-form select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: var(--font);
    width: 100%;
    background: #fff;
    transition: border-color 0.15s ease;
}
.post-form input:focus,
.post-form select:focus,
.post-form textarea:focus,
.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
}
.post-form button, .auth-form button {
    margin-top: 16px;
    align-self: flex-start;
}
.field-hint {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 500 !important;
}
.checkbox-label input { width: auto !important; }

/* Admin */
.admin-nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    margin: 18px 0 6px;
    border-bottom: 1px solid var(--border);
}
.admin-nav-tab {
    flex-shrink: 0;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
}
.admin-nav-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.admin-nav-tab:hover { color: var(--accent); text-decoration: none; }
.admin-nav-exit { margin-left: auto; color: var(--text-muted); }

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
    margin: 20px 0;
}
.admin-stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.admin-stat-number { display: block; font-size: 1.7rem; font-weight: 800; color: var(--accent); }
.admin-stat-label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

.admin-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
    margin: 20px 0 32px;
}
.admin-quick-link {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-weight: 600;
    color: var(--text);
}
.admin-quick-link:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.admin-table-wrap { overflow-x: auto; margin: 16px 0; border-radius: var(--radius); border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; background: var(--card-bg); font-size: 0.88rem; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { color: var(--text-muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-row-actions { display: flex; gap: 6px; }
.admin-row-actions form { display: inline; }
.admin-inline-form { display: flex; gap: 6px; align-items: center; }
.admin-inline-form input { width: 180px !important; padding: 6px 10px !important; }
.admin-reorder { display: flex; gap: 4px; }
.admin-table-comments .admin-comment-body { white-space: normal; max-width: 360px; }
.admin-reorder form { display: inline; }

.badge-admin {
    background: var(--text);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}
.badge-banned {
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

/* Footer */
.site-footer {
    margin-top: 40px;
    padding: 20px 0 40px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 600px) {
    .site-header .wrap { padding-top: 10px; padding-bottom: 10px; gap: 6px; }
    .brand { font-size: 1.15rem; }
    .nav { gap: 10px; font-size: 0.85rem; }
    .btn { padding: 7px 14px; font-size: 0.83rem; }
    .nav-user { font-size: 0.8rem; }
    .search-form input[type="search"] { font-size: 0.9rem; padding: 10px 14px 10px 38px; }
}

@media (max-width: 480px) {
    .feed-item { flex-direction: column; }
    .feed-item-thumb { width: 100%; height: 180px; }
    .admin-inline-form input { width: 120px !important; }
}
