/* ============================================
   QuickFixFile — Modern 2025/2026 Design System
   ============================================ */

:root {
    /* Brand */
    --primary: #0f172a;
    --primary-soft: #1e293b;
    --secondary: #ef4444;
    --secondary-hover: #dc2626;
    --secondary-soft: rgba(239, 68, 68, 0.12);
    --accent: #3b82f6;
    --accent-soft: rgba(59, 130, 246, 0.12);

    /* Surfaces */
    --bg: #f8fafc;
    --bg-elevated: #f1f5f9;
    --card-bg: #ffffff;
    --text: #0f172a;
    --text-secondary: #334155;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 8px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
    --shadow-glow: 0 8px 32px rgba(239, 68, 68, 0.25);

    /* Shape & Motion */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== Reset & Base ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background var(--transition), color var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color var(--transition);
}

a:hover {
    color: var(--secondary);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.3;
    white-space: nowrap;
}

.btn-primary {
    background: var(--secondary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-primary:hover {
    background: var(--secondary-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1.5px solid var(--border-strong);
}

.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background: var(--secondary-soft);
}

.btn-outline-light,
.btn-register {
    background: transparent;
    color: #fff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
}

.btn-outline-light:hover,
.btn-register:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff !important;
    transform: translateY(-1px);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
    border-radius: 10px;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12.5px;
    border-radius: 7px;
}

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

.btn-warning:hover {
    background: #d97706;
    color: #fff;
}

.btn-logout {
    background: #ef4444 !important;
    color: #fff !important;
    border: none !important;
    padding: 7px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13.5px;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-logout:hover {
    background: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

/* ========== Navbar ========== */
.navbar {
    background: #0b1120 !important;
    padding: 0;
    height: 64px;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--secondary) 30%, #f97316 70%, transparent 100%);
    opacity: 0.7;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 100%;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    transition: opacity var(--transition);
}

.nav-brand a:hover {
    opacity: 0.9;
    color: #fff;
}

.brand-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.5));
    line-height: 1;
}

.brand-highlight {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    font-size: 13.5px;
    transition: all var(--transition);
    padding: 7px 14px;
    border-radius: 8px;
    letter-spacing: 0.01em;
    position: relative;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.nav-link.active {
    color: #fff;
    background: rgba(239, 68, 68, 0.12);
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
    flex-shrink: 0;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    font-size: 11px;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.sidebar-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
}

.sidebar-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle-btn svg {
    flex-shrink: 0;
}

.user-greeting {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    padding: 0 4px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark-mode-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 16px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    transition: all var(--transition);
    color: #fff;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.06);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========== Search Bar ========== */
.search-bar {
    background: var(--card-bg);
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.search-form {
    max-width: 580px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    background: var(--bg);
    border-radius: 12px;
    border: 1.5px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}

.search-form:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px var(--secondary-soft);
}

.search-form input {
    flex: 1;
    padding: 13px 18px;
    border: none;
    font-size: 14.5px;
    background: transparent;
    color: var(--text);
    font-family: inherit;
}

.search-form input::placeholder {
    color: var(--text-muted);
}

.search-form input:focus {
    outline: none;
}

.search-form button {
    padding: 13px 26px;
    background: var(--secondary);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition);
    font-family: inherit;
}

.search-form button:hover {
    background: var(--secondary-hover);
}

/* ========== Hero ========== */
.hero {
    background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    padding: 64px 0 56px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -15%;
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.18) 0%, transparent 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    padding: 5px 14px;
    border-radius: 100px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 16px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    letter-spacing: 0.01em;
}

.hero-title {
    font-size: 46px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 28px;
    max-width: 480px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: 20px;
    margin-top: 28px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.55);
    flex-wrap: wrap;
}

.hero-features span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hero-illustration {
    text-align: center;
    position: relative;
}

.illustration-icon {
    font-size: 88px;
    display: block;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
}

.floating-icons {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
}

.float-icon {
    font-size: 30px;
    animation: float 3.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.float-icon:nth-child(2) {
    animation-delay: 0.6s;
}

.float-icon:nth-child(3) {
    animation-delay: 1.2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 44px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: #f87171;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    font-weight: 500;
}

/* ========== Category Cloud ========== */
.category-cloud-section {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px 26px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.cloud-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: 100px;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.category-tag:hover {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.category-tag .category-count {
    font-size: 12px;
    opacity: 0.65;
    font-weight: 400;
}

.category-tag:hover .category-count {
    opacity: 1;
    color: #fff;
}

/* ========== Posts Grid & Cards ========== */
.main-content {
    flex: 1;
    padding: 40px 0;
}

.posts-section {
    padding: 12px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.025em;
}

.section-title .highlight {
    color: var(--secondary);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 15.5px;
    margin-top: 8px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 22px;
}

.post-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
    height: 100%;
}

.post-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 0;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-slow);
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    cursor: pointer;
    overflow: hidden;
}

.post-card-link:hover .post-card,
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(239, 68, 68, 0.25);
}

.post-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-thumbnail.placeholder {
    font-size: 40px;
    color: var(--text-muted);
}

.post-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    z-index: 2;
}

/* Card body content */
.post-card > *:not(.post-thumbnail):not(.post-badge) {
    padding-left: 16px;
    padding-right: 16px;
}

.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    margin-bottom: 6px;
    padding-left: 16px;
    padding-right: 16px;
}

.post-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-file-type {
    font-size: 10px;
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 600;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.post-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.35;
    letter-spacing: -0.015em;
    padding-left: 16px;
    padding-right: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}

.post-title a:hover {
    color: var(--secondary);
}

.post-excerpt {
    color: var(--text-light);
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 12px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-left: 16px;
    padding-right: 16px;
}

.post-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
    background: var(--bg);
}

.post-meta {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.file-size-badge {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-light);
    background: var(--card-bg);
    padding: 3px 8px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.post-card-footer .btn-outline {
    pointer-events: none;
    font-size: 12px;
    padding: 5px 12px;
}

/* ========== Single Post ========== */
.single-post {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 820px;
    margin: 0 auto;
}

.post-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 24px;
    margin-bottom: 28px;
}

.post-header .post-title {
    font-size: 32px;
    margin: 12px 0 10px;
    padding: 0;
    -webkit-line-clamp: unset;
    letter-spacing: -0.03em;
}

.post-meta-large {
    display: flex;
    gap: 20px;
    font-size: 13.5px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.post-featured-image {
    margin-bottom: 28px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

.post-body {
    font-size: 16.5px;
    line-height: 1.85;
    color: var(--text-secondary);
}

.post-body p {
    margin-bottom: 16px;
}

.download-section {
    margin-top: 36px;
}

#download-section {
    scroll-margin-top: 90px;
}

.download-card {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px 28px;
    border: 1.5px dashed var(--secondary);
    flex-wrap: wrap;
}

.download-icon {
    font-size: 44px;
}

.download-info h4 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.download-info p {
    color: var(--text-light);
    font-size: 13.5px;
    margin-top: 2px;
}

.download-card .btn {
    margin-left: auto;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 12px;
}

/* ========== Related Posts ========== */
.related-posts {
    max-width: 820px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.related-posts h3 {
    font-size: 20px;
    margin-bottom: 18px;
    color: var(--text);
    font-weight: 700;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.related-card {
    background: var(--bg);
    padding: 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.related-card:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.related-card:hover a,
.related-card:hover small {
    color: #fff;
}

.related-card a {
    text-decoration: none;
    color: var(--text);
    display: block;
}

.related-category {
    font-size: 11px;
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.related-card h4 {
    font-size: 14.5px;
    margin: 5px 0;
    font-weight: 600;
}

.related-card small {
    font-size: 12px;
    color: var(--text-light);
}

/* ========== Admin Dashboard ========== */
.admin-dashboard {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}

.dashboard-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg);
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    border-left: 3px solid var(--secondary);
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
}

.stat-card > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.stat-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.stat-label,
.dashboard-stats .stat-label,
.stat-card .stat-label {
    display: block !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    color: var(--text-light) !important;
    line-height: 1.3 !important;
    margin-top: 2px;
}

.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.admin-table th {
    background: var(--primary);
    color: #fff;
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: var(--bg);
}

.admin-table th:last-child {
    text-align: center;
    min-width: 120px;
}

.admin-table td:last-child {
    text-align: center;
}

.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--transition);
    border: 1px solid transparent;
    background: var(--bg);
    color: var(--text);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-edit {
    background: #fef3c7;
    color: #92400e;
    border-color: #fbbf24;
}

.btn-edit:hover {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}

.btn-download {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #38bdf8;
}

.btn-download:hover {
    background: #0ea5e9;
    color: #fff;
    border-color: #0ea5e9;
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
    border-color: #f87171;
}

.btn-delete:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
}

.badge {
    display: inline-block;
    background: var(--secondary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* ========== Forms, Login & Alerts ========== */
.form-container {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    max-width: 720px;
    margin: 0 auto;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.form-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group .required {
    color: var(--secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 14.5px;
    font-family: inherit;
    transition: all var(--transition);
    background: var(--bg);
    color: var(--text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    background: var(--card-bg);
    box-shadow: 0 0 0 4px var(--secondary-soft);
}

.form-group textarea {
    min-height: 160px;
    resize: vertical;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2364748b'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.form-group select option {
    padding: 8px;
    background: var(--card-bg);
    color: var(--text);
}

.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-upload-wrapper input[type="file"] {
    padding: 14px;
    background: var(--bg);
    border: 1.5px dashed var(--border-strong);
    cursor: pointer;
    border-radius: 10px;
}

.file-info {
    font-size: 12.5px;
    color: var(--text-light);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 20px;
}

.login-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    max-width: 400px;
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 10px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-light);
    font-size: 14.5px;
    margin-top: 4px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-light);
}

.login-required-box {
    background: var(--bg);
    border: 1.5px dashed var(--secondary);
    border-radius: var(--radius);
    padding: 32px 36px;
    text-align: center;
    max-width: 400px;
    margin: 10px auto;
}

.login-required-box .lock-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 12px;
}

.login-required-box p {
    margin-bottom: 8px;
}

.login-required-box .btn {
    min-width: 120px;
}

.alert {
    padding: 13px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 500;
    font-size: 14px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border-left: 3px solid #10b981;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.empty-state {
    text-align: center;
    padding: 64px 24px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.empty-icon {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 22px;
    color: var(--text);
    font-weight: 700;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 20px;
    margin-top: 6px;
}

/* ========== Rating & Reviews ========== */
.reviews-section {
    max-width: 820px;
    margin: 40px auto 0;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.reviews-header h3 {
    font-size: 20px;
    color: var(--text);
    font-weight: 700;
}

.rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.rating-number {
    font-size: 22px;
    font-weight: 800;
    color: var(--secondary);
}

.rating-stars {
    font-size: 16px;
    letter-spacing: 1px;
}

.rating-count {
    font-size: 13px;
    color: var(--text-light);
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
    margin: 8px 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 28px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s ease;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #fbbf24;
}

.review-form {
    background: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    border: 1px solid var(--border);
}

.review-form h4 {
    margin-bottom: 14px;
    color: var(--text);
    font-weight: 600;
}

.review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text);
    resize: vertical;
    font-family: inherit;
}

.review-form textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px var(--secondary-soft);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.review-item {
    display: flex;
    gap: 14px;
    background: var(--card-bg);
    padding: 16px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.review-avatar {
    flex-shrink: 0;
}

.review-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), #f97316);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.review-content {
    flex: 1;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.review-author {
    font-weight: 600;
    color: var(--text);
    font-size: 14px;
}

.review-rating {
    font-size: 13px;
    letter-spacing: 1px;
}

.review-date {
    font-size: 12px;
    color: var(--text-muted);
}

.review-text {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-top: 4px;
}

/* ========== Admin Sidebar ========== */
.sidebar {
    position: fixed;
    top: 0;
    left: -272px;
    width: 272px;
    height: 100vh;
    background: #080e1a;
    color: rgba(255, 255, 255, 0.7);
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.sidebar.open {
    left: 0;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.sidebar-brand a:hover {
    color: #fff;
}

.sidebar-brand .brand-icon {
    font-size: 22px;
    filter: drop-shadow(0 0 8px rgba(239, 68, 68, 0.45));
}

.sidebar-brand .brand-highlight {
    background: linear-gradient(135deg, #ef4444, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 14px 12px 4px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.sidebar-user .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.3);
    letter-spacing: 0;
}

.sidebar-user .user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.sidebar-user .user-name {
    font-weight: 600;
    color: #fff;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
    font-weight: 500;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 10px 16px;
    flex: 1;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.25);
    padding: 14px 12px 6px;
    user-select: none;
}

.sidebar-section-label:first-child {
    padding-top: 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    border-radius: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: all 0.18s ease;
    font-size: 13.5px;
    font-weight: 500;
    position: relative;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-link.active {
    background: rgba(239, 68, 68, 0.15);
    color: #fff;
    box-shadow: none;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--secondary);
    border-radius: 0 3px 3px 0;
}

.sidebar-link .sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
    opacity: 1;
}

.sidebar-link .sidebar-icon svg {
    width: 17px;
    height: 17px;
}

.sidebar-link .sidebar-text {
    flex: 1;
    min-width: 0;
}

.sidebar-link .sidebar-badge {
    background: var(--secondary);
    color: #fff;
    border-radius: 100px;
    padding: 1px 7px;
    font-size: 10.5px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    line-height: 1.5;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.sidebar-link.active .sidebar-badge {
    background: #fff;
    color: var(--secondary);
    box-shadow: none;
}

.sidebar-spacer {
    flex: 1;
    min-height: 12px;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin: 8px 6px;
}

.sidebar-logout {
    color: rgba(248, 113, 113, 0.55) !important;
    margin-top: 4px;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}

.sidebar-logout .sidebar-icon {
    opacity: 0.6;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border: none;
    cursor: pointer;
    z-index: 1150;
    box-shadow: 0 6px 24px rgba(239, 68, 68, 0.45);
    transition: all var(--transition);
    align-items: center;
    justify-content: center;
    padding: 0;
}

.sidebar-toggle:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 8px 28px rgba(239, 68, 68, 0.55);
}

.sidebar-toggle.is-open {
    background: #0f172a;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}

.sidebar-toggle svg line {
    transition: all 0.25s ease;
}

.sidebar-toggle.is-open svg line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
    transform-origin: center;
}

.sidebar-toggle.is-open svg line:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.is-open svg line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    transform-origin: center;
}

.navbar-with-sidebar,
.search-with-sidebar,
.hero-with-sidebar,
.main-with-sidebar {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

@media (min-width: 769px) {
    .sidebar {
        left: 0;
    }

    .navbar-with-sidebar,
    .search-with-sidebar,
    .hero-with-sidebar,
    .main-with-sidebar {
        margin-left: 272px;
    }

    .sidebar-toggle,
    .sidebar-overlay {
        display: none !important;
    }
}

/* ========== Pagination ========== */
.pagination-wrapper {
    clear: both;
    margin: 36px 0 16px;
    padding: 24px 0 8px;
    border-top: 1px solid var(--border);
}

.pagination-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.pagination {
    display: flex !important;
    gap: 6px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
}

.pagination .page-item {
    display: inline-block !important;
    margin: 0 !important;
    list-style: none !important;
}

.pagination .page-item .page-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    height: 40px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    font-weight: 600 !important;
    font-size: 13.5px !important;
    transition: all 0.22s ease !important;
    text-decoration: none !important;
    box-shadow: var(--shadow-sm) !important;
}

.pagination .page-item .page-link:hover {
    background: var(--secondary) !important;
    color: #fff !important;
    border-color: var(--secondary) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3) !important;
}

.pagination .page-item.active .page-link {
    background: var(--secondary) !important;
    color: #fff !important;
    border-color: var(--secondary) !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35) !important;
    cursor: default !important;
    transform: none !important;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: var(--bg) !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.pagination-info {
    text-align: center !important;
    margin-top: 12px !important;
    font-size: 13px !important;
    color: var(--text-light) !important;
    font-weight: 500 !important;
}

/* ========== Ad Containers ========== */
.ad-container {
    margin: 24px 0;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    overflow: hidden;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.ad-container:hover {
    border-color: rgba(239, 68, 68, 0.3);
}

.ad-label {
    font-size: 10.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    font-weight: 600;
}

.ad-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
}

.ad-content iframe {
    max-width: 100%;
    border: none;
}

/* ========== Static Pages ========== */
.page-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: -0.025em;
}

.page-content {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.page-content h2 {
    color: var(--secondary);
    margin-top: 22px;
    font-size: 17px;
    font-weight: 700;
}

.page-content p,
.page-content ul {
    color: var(--text-light);
    line-height: 1.8;
}

.page-content ul {
    padding-left: 20px;
}

/* ========== Footer ========== */
.footer {
    background: #0b1120 !important;
    color: rgba(255, 255, 255, 0.65);
    padding: 56px 0 24px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand h3 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.footer-brand p {
    font-size: 13.5px;
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.5);
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.footer-socials a {
    color: rgba(255, 255, 255, 0.45);
    font-size: 18px;
    transition: all var(--transition);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.footer-socials a:hover {
    color: #fff;
    background: var(--secondary);
    transform: translateY(-2px);
}

.footer-links h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: 0.01em;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.45);
    font-size: 13.5px;
    padding: 5px 0;
    transition: all var(--transition);
}

.footer-links a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-newsletter h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-newsletter p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 14px;
}

.newsletter-form {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-form input {
    flex: 1;
    padding: 11px 14px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 13.5px;
    font-family: inherit;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
}

.newsletter-form button {
    padding: 11px 18px;
    background: var(--secondary);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition);
    font-family: inherit;
    border-radius: 0;
}

.newsletter-form button:hover {
    background: var(--secondary-hover);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 22px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
}

.admin-login-link {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12.5px;
    transition: color var(--transition);
}

.admin-login-link:hover {
    color: var(--secondary);
}

/* ========== Dark Mode ========== */
body.dark-mode {
    --bg: #0b1120;
    --bg-elevated: #111827;
    --card-bg: #111827;
    --text: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-light: #94a3b8;
    --text-muted: #64748b;
    --border: #1e293b;
    --border-strong: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
}

body.dark-mode .search-bar {
    background: var(--card-bg);
}

body.dark-mode .search-form {
    background: var(--bg);
    border-color: var(--border);
}

body.dark-mode .post-card-footer {
    background: var(--bg-elevated);
}

body.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-left-color: #10b981;
}

body.dark-mode .alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border-left-color: #ef4444;
}

body.dark-mode .pagination .page-item .page-link {
    background: var(--card-bg) !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

body.dark-mode .pagination .page-item.active .page-link {
    background: var(--secondary) !important;
    border-color: var(--secondary) !important;
    color: #fff !important;
}

body.dark-mode .btn-edit {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

body.dark-mode .btn-download {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.3);
}

body.dark-mode .btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions,
    .hero-features {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }

    .nav-links {
        display: none !important;
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        flex-direction: column;
        background: #0b1120;
        padding: 12px;
        border-radius: 14px;
        min-width: 210px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.07);
        z-index: 1000;
        gap: 2px;
    }

    .nav-links.open {
        display: flex !important;
    }

    .nav-links .nav-link {
        color: rgba(255, 255, 255, 0.7) !important;
        padding: 10px 12px;
        border-radius: 8px;
        width: 100%;
        text-align: left;
    }

    .nav-links .nav-link.active::after {
        display: none;
    }

    .nav-links .nav-link:hover {
        background: rgba(255, 255, 255, 0.06);
        color: #fff !important;
    }

    .nav-links .nav-divider {
        width: 100%;
        height: 1px;
        margin: 6px 0;
    }

    .nav-links .admin-badge {
        margin: 4px 0;
        align-self: flex-start;
    }

    .nav-links .sidebar-toggle-btn {
        width: 100%;
        justify-content: center;
        margin: 2px 0;
    }

    .nav-links .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 16px !important;
        margin-top: 2px;
    }

    .nav-links .user-greeting {
        padding: 6px 12px;
        max-width: 100%;
    }

    .nav-links .dark-mode-toggle {
        margin-top: 4px;
        width: 100%;
        border-radius: 8px;
        height: 38px;
    }

    .sidebar {
        left: -100%;
        width: 85%;
        max-width: 290px;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .posts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .post-card {
        min-height: 220px;
        border-radius: 12px;
    }

    .post-title {
        font-size: 14px;
    }

    .post-excerpt {
        font-size: 12.5px;
        -webkit-line-clamp: 2;
    }

    .single-post {
        padding: 24px 18px;
        border-radius: var(--radius);
    }

    .post-header .post-title {
        font-size: 24px;
    }

    .download-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .download-card .btn {
        margin-left: 0;
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .admin-dashboard {
        padding: 18px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .form-container,
    .login-card {
        padding: 24px 18px;
        margin: 0 8px;
    }

    .pagination .page-item .page-link {
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 10px !important;
        font-size: 13px !important;
        border-radius: 8px !important;
    }

    .hero {
        padding: 48px 0 40px;
    }

    .hero-stats {
        padding: 20px 16px;
        gap: 12px;
    }

    .stat-number {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-stats .stat-item:last-child {
        grid-column: span 2;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .post-card {
        min-height: 180px;
    }

    .dashboard-stats,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 4px !important;
    }

    .pagination .page-item .page-link {
        min-width: 32px !important;
        height: 32px !important;
        padding: 0 8px !important;
        font-size: 12px !important;
    }

    .section-title {
        font-size: 24px;
    }

    .container {
        padding: 0 16px;
    }
}

/* ========== Sidebar header (from sidebar.php variant) ========== */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-close {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: rgba(255, 255, 255, 0.5);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin: 0;
}

.sidebar-label {
    flex: 1;
}

/* ========== Social Share ========== */
.social-share {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    flex-wrap: wrap;
    align-items: center;
}

.share-label {
    font-weight: 600;
    color: var(--text);
    font-size: 13.5px;
    margin-right: 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 7px;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff !important;
    transition: all var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff !important;
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #0f172a; }
.share-telegram { background: #0088cc; }
.share-whatsapp { background: #25d366; }
.share-linkedin { background: #0a66c2; }
.share-email { background: #ea4335; }

/* ========== Utility classes ========== */
.post-card-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.no-description {
    color: var(--text-light);
    font-style: italic;
}

.no-image-placeholder {
    text-align: center;
    padding: 48px 20px;
    background: var(--bg);
    border-radius: var(--radius);
    color: var(--text-muted);
}

.download-note,
.download-count {
    color: var(--text-light);
    font-size: 13px;
}

.download-unavailable {
    border-color: var(--border) !important;
    border-style: solid !important;
}

.login-hint {
    font-size: 13.5px;
    color: var(--text-light);
    margin-bottom: 14px;
}

.login-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.admin-actions {
    margin-top: 16px;
}

.btn-full {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-review {
    background: none;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--transition);
}

.btn-delete-review:hover {
    opacity: 1;
}

.alert-info {
    background: var(--accent-soft);
    color: var(--accent);
    border-left: 3px solid var(--accent);
    padding: 13px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-info a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
}

body.dark-mode .alert-info {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border-left-color: #3b82f6;
}

@media (max-width: 768px) {
    .social-share { gap: 6px; }
    .share-btn { font-size: 12px; padding: 5px 10px; }
}

@media (max-width: 480px) {
    .share-btn { font-size: 11px; padding: 4px 8px; }
}

/* ========== Blog Page ========== */
.blog-page { padding: 12px 0 40px; }
.blog-header { text-align: center; margin-bottom: 36px; }

.blog-search {
    max-width: 480px;
    margin: 20px auto 0;
    display: flex;
    gap: 0;
    background: var(--bg);
    border-radius: 12px;
    border: 1.5px solid var(--border);
    overflow: hidden;
    transition: all var(--transition);
}
.blog-search:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px var(--secondary-soft);
}
.blog-search input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
}
.blog-search input:focus { outline: none; }
.blog-search button {
    padding: 12px 22px;
    background: var(--secondary);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--transition);
}
.blog-search button:hover { background: var(--secondary-hover); }

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 24px;
    align-items: start;
}

/* Compact horizontal blog cards */
.blog-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    min-height: 0;
}
.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(239, 68, 68, 0.2);
}
.blog-image {
    flex: 0 0 160px;
    width: 160px;
    min-height: 110px;
    max-height: 130px;
    overflow: hidden;
    background: var(--bg-elevated);
    align-self: stretch;
}
.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card:hover .blog-image img { transform: scale(1.04); }
.blog-content {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
.blog-category {
    font-size: 10px;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.blog-card-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--text);
    letter-spacing: -0.01em;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-excerpt {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.45;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
    margin-top: 4px;
}
.blog-meta .btn {
    padding: 4px 10px !important;
    font-size: 12px !important;
    margin-left: auto;
}

@media (max-width: 640px) {
    .blog-card {
        flex-direction: column;
    }
    .blog-image {
        flex: none;
        width: 100%;
        max-height: 140px;
        min-height: 120px;
        aspect-ratio: 16 / 7;
    }
    .blog-content {
        padding: 12px 14px;
    }
    .blog-card-title {
        font-size: 14.5px;
    }
}

.blog-sidebar { position: sticky; top: 80px; }
.sidebar-widget {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.sidebar-widget h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 12px;
}
.category-list, .recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-list li, .recent-list li {
    border-bottom: 1px solid var(--border);
}
.category-list li:last-child, .recent-list li:last-child {
    border-bottom: none;
}
.category-list a, .recent-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    color: var(--text-secondary);
    font-size: 13.5px;
    text-decoration: none;
    transition: color var(--transition);
}
.category-list a:hover, .recent-list a:hover {
    color: var(--secondary);
}
.category-list .count, .recent-list .date {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 100px;
}

/* ========== Categories Page ========== */
.categories-page { padding: 12px 0 40px; }
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    text-align: left;
}
.section-header-row .section-title { text-align: left; }
.section-header-row .section-subtitle { text-align: left; }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 28px;
}
.category-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-left: 3px solid var(--cat-color, var(--secondary));
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--text);
    min-height: 160px;
}
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    color: var(--text);
}
.category-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cat-color, var(--secondary)) 15%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}
.category-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.category-description {
    font-size: 13.5px;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.category-card .category-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 12px;
}

/* ========== Dashboard ========== */
.dashboard-page { padding: 12px 0 40px; }
.dashboard-page .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
}
.dashboard-page .dashboard-header h1 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.dashboard-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stats-grid .stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}
.stats-grid .stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.stats-grid .stat-icon { font-size: 28px; }
.stats-grid .stat-value {
    display: block;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.stats-grid .stat-label {
    font-size: 13px;
    color: var(--text-light);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.dashboard-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.dashboard-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
}
/* Prevent horizontal page slide on mobile */
.dashboard-page,
.dashboard-section,
.dashboard-grid,
.main-content,
.container {
    max-width: 100%;
}

.dashboard-page {
    overflow-x: hidden;
}

.category-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.category-stat {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.category-stat .cat-icon {
    flex: 0 0 22px;
    font-size: 15px;
    text-align: center;
    line-height: 1;
}

.category-stat .cat-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-stat .cat-count {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light);
    text-align: right;
}

.category-stat .cat-bar-track {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
    height: 5px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
    box-sizing: border-box;
}

body.dark-mode .category-stat .cat-bar-track {
    background: #1e293b;
}

.category-stat .cat-bar {
    display: block;
    height: 100%;
    border-radius: 100px;
    max-width: 100%;
    min-width: 0 !important;
    transition: width 0.4s ease;
}

/* Table stays inside card */
.dashboard-section .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-section .admin-table {
    width: 100%;
    table-layout: fixed;
}

.dashboard-section .admin-table th,
.dashboard-section .admin-table td {
    font-size: 12px;
    padding: 8px 8px;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.dashboard-section .admin-table th:nth-child(1),
.dashboard-section .admin-table td:nth-child(1) {
    width: 38%;
}

.dashboard-section .admin-table th:nth-child(2),
.dashboard-section .admin-table td:nth-child(2),
.dashboard-section .admin-table th:nth-child(3),
.dashboard-section .admin-table td:nth-child(3) {
    width: 18%;
    text-align: center;
}

.dashboard-section .admin-table th:nth-child(4),
.dashboard-section .admin-table td:nth-child(4) {
    width: 26%;
}

@media (max-width: 768px) {
    .dashboard-section {
        padding: 14px !important;
        overflow: hidden !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    body, .main-content {
        overflow-x: hidden;
    }
}

.text-muted { color: var(--text-light); font-size: 14px; }

.page-intro {
    color: var(--text-light);
    margin-bottom: 20px;
}
.contact-form { display: flex; flex-direction: column; gap: 4px; }
.contact-info {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}
.form-hint {
    color: var(--text-light);
    font-size: 12.5px;
    display: block;
    margin-top: 4px;
}

@media (max-width: 992px) {
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; }
    .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .section-header-row { flex-direction: column; align-items: flex-start; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* Admin Panel button in hamburger (mobile only) */
.mobile-only {
    display: none !important;
}

.nav-admin-menu {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    width: 100%;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    .nav-admin-menu {
        color: #fca5a5 !important;
        font-weight: 600 !important;
        background: rgba(239, 68, 68, 0.12) !important;
        border-radius: 8px !important;
        margin-top: 4px;
    }

    .nav-admin-menu:hover {
        background: rgba(239, 68, 68, 0.2) !important;
        color: #fff !important;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* ===== Admin mobile menu items ===== */
.admin-mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .admin-mobile-only {
        display: block !important;
    }

    .nav-admin-menu {
        display: block !important;
        width: 100%;
        text-align: left;
        background: rgba(239, 68, 68, 0.15) !important;
        color: #fca5a5 !important;
        font-weight: 700 !important;
        border: none;
        border-radius: 8px !important;
        padding: 10px 12px !important;
        cursor: pointer;
        font-family: inherit;
        font-size: 14px !important;
        margin: 4px 0;
    }

    .nav-admin-menu:hover {
        background: rgba(239, 68, 68, 0.25) !important;
        color: #fff !important;
    }

    /* Force floating sidebar button visible on mobile for admin */
    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .admin-mobile-only {
        display: none !important;
    }
}

/* ===== Adsterra responsive slots ===== */
.ad-header-wrap,
.ad-footer-wrap {
    margin: 12px auto;
    max-width: 100%;
}

.ad-container {
    max-width: 100%;
    box-sizing: border-box;
}

.ad-content {
    max-width: 100%;
    overflow: hidden;
}

.ad-content iframe,
.ad-content ins,
.ad-content > div {
    max-width: 100% !important;
}

.ad-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    width: 100%;
    background: repeating-linear-gradient(
        -45deg,
        var(--bg),
        var(--bg) 8px,
        var(--border) 8px,
        var(--border) 16px
    );
    color: var(--text-muted);
    font-size: 12px;
    border-radius: 8px;
}

/* Sidebar ad sizing */
.blog-sidebar .ad-container {
    margin: 0 0 20px;
    padding: 10px;
}

.blog-sidebar .ad-content {
    min-height: 250px;
}

@media (max-width: 768px) {
    .ad-container {
        margin: 16px 0;
        padding: 8px;
    }

    .ad-content {
        min-height: 50px;
    }

    /* Force banners to scale down on mobile */
    .ad-content iframe {
        width: 100% !important;
        max-width: 320px;
        height: auto !important;
        min-height: 50px;
    }
}

/* Empty ad slots (no real key yet) — compact, no lag */
.ad-container.ad-empty {
    margin: 10px 0;
    padding: 8px;
    min-height: 0;
    opacity: 0.7;
}
.ad-container.ad-empty .ad-content {
    min-height: 48px !important;
}
.ad-container.ad-empty .ad-placeholder {
    min-height: 40px;
    font-size: 11px;
}



/* ============================================
   UI POLISH 2026 — Consistency Layer
   ============================================ */

/* ----- Global focus & selection ----- */
:focus-visible {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}
::selection {
    background: rgba(239, 68, 68, 0.25);
    color: inherit;
}

/* ----- Logout in navbar (cleaner) ----- */
.nav-logout {
    color: #fca5a5 !important;
    font-weight: 600 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    background: rgba(239, 68, 68, 0.1) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    margin-left: 4px;
}
.nav-logout:hover {
    color: #fff !important;
    background: rgba(239, 68, 68, 0.85) !important;
    border-color: transparent !important;
    opacity: 1 !important;
}

/* ----- User greeting ----- */
.user-greeting {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px;
    max-width: 110px;
}

/* ----- Footer polish ----- */
.footer {
    background: #0b1120 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-grid {
    gap: 36px;
}

.footer-brand h3 {
    font-size: 21px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
}
.footer-socials a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
}

.newsletter-form {
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.newsletter-form:focus-within {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}
.newsletter-form input {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
}
.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}
.newsletter-form button {
    background: var(--secondary);
    color: #fff;
    border: none;
    padding: 12px 18px;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: background var(--transition);
}
.newsletter-form button:hover {
    background: var(--secondary-hover);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-top: 22px;
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}
.footer-bottom a.admin-login-link {
    color: rgba(255, 255, 255, 0.35);
    font-size: 12px;
    transition: color var(--transition);
}
.footer-bottom a.admin-login-link:hover {
    color: #fca5a5;
}

/* ----- Cards universal hover ----- */
.post-card,
.blog-card,
.category-card,
.stats-grid .stat-card {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.25s ease;
}

/* ----- Forms (login/register/profile) ----- */
.form-group label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text);
    font-size: 14.5px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px var(--secondary-soft);
}

/* ----- Alert polish ----- */
.alert {
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    margin-bottom: 16px;
}
.alert-success {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
body.dark-mode .alert-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
body.dark-mode .alert-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* ----- Profile password box ----- */
.password-change {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-top: 24px;
}
.password-change h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
}

/* ----- Mobile refinements ----- */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .nav-logout {
        margin-left: 0;
        margin-top: 4px;
        text-align: center;
    }
    .user-greeting {
        max-width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 32px !important;
    }
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* ----- Subtle page load ----- */
.main-content {
    animation: fadeIn 0.35s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===== Detailed Report + Top Downloads — alignment fix ===== */

.report-table-container,
.dashboard-section .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.report-table-container h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
}

/* Shared table style */
.report-table-container .admin-table,
.dashboard-section .admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;          /* equal control */
    margin: 0;
    font-size: 13.5px;
}

/* Header */
.report-table-container .admin-table thead th,
.dashboard-section .admin-table thead th {
    background: #0b1120 !important;
    color: #fff !important;
    padding: 12px 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: none !important;
    white-space: nowrap !important;
    height: auto !important;
    line-height: 1.3 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Body cells */
.report-table-container .admin-table tbody td,
.dashboard-section .admin-table tbody td {
    padding: 12px 10px !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text);
    background: var(--card-bg);
    vertical-align: middle;
    font-size: 13.5px;
}

.report-table-container .admin-table tbody tr:last-child td,
.dashboard-section .admin-table tbody tr:last-child td {
    border-bottom: none !important;
}

.report-table-container .admin-table tbody tr:hover td,
.dashboard-section .admin-table tbody tr:hover td {
    background: var(--bg) !important;
}

/* ---------- Detailed Report columns (5 cols) ---------- */
.report-table-container .admin-table th:nth-child(1),
.report-table-container .admin-table td:nth-child(1) {
    width: 22%;
    text-align: left !important;
}

.report-table-container .admin-table th:nth-child(2),
.report-table-container .admin-table td:nth-child(2),
.report-table-container .admin-table th:nth-child(3),
.report-table-container .admin-table td:nth-child(3),
.report-table-container .admin-table th:nth-child(4),
.report-table-container .admin-table td:nth-child(4),
.report-table-container .admin-table th:nth-child(5),
.report-table-container .admin-table td:nth-child(5) {
    width: 19.5%;
    text-align: center !important;
}

/* ---------- Top Downloads columns (4 cols) ---------- */
.dashboard-section .admin-table th:nth-child(1),
.dashboard-section .admin-table td:nth-child(1) {
    width: 40%;
    text-align: left !important;
    word-break: break-word;
}

.dashboard-section .admin-table th:nth-child(2),
.dashboard-section .admin-table td:nth-child(2),
.dashboard-section .admin-table th:nth-child(3),
.dashboard-section .admin-table td:nth-child(3),
.dashboard-section .admin-table th:nth-child(4),
.dashboard-section .admin-table td:nth-child(4) {
    width: 20%;
    text-align: center !important;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .report-table-container .admin-table thead th,
    .report-table-container .admin-table tbody td,
    .dashboard-section .admin-table thead th,
    .dashboard-section .admin-table tbody td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }
}

/* ===== Detailed Report + Top Downloads — alignment fix ===== */

.report-table-container,
.dashboard-section .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.report-table-container h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
}

/* Shared table style */
.report-table-container .admin-table,
.dashboard-section .admin-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;          /* equal control */
    margin: 0;
    font-size: 13.5px;
}

/* Header */
.report-table-container .admin-table thead th,
.dashboard-section .admin-table thead th {
    background: #0b1120 !important;
    color: #fff !important;
    padding: 12px 10px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: none !important;
    white-space: nowrap !important;
    height: auto !important;
    line-height: 1.3 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Body cells */
.report-table-container .admin-table tbody td,
.dashboard-section .admin-table tbody td {
    padding: 12px 10px !important;
    border-bottom: 1px solid var(--border) !important;
    color: var(--text);
    background: var(--card-bg);
    vertical-align: middle;
    font-size: 13.5px;
}

.report-table-container .admin-table tbody tr:last-child td,
.dashboard-section .admin-table tbody tr:last-child td {
    border-bottom: none !important;
}

.report-table-container .admin-table tbody tr:hover td,
.dashboard-section .admin-table tbody tr:hover td {
    background: var(--bg) !important;
}

/* ---------- Detailed Report columns (5 cols) ---------- */
.report-table-container .admin-table th:nth-child(1),
.report-table-container .admin-table td:nth-child(1) {
    width: 22%;
    text-align: left !important;
}

.report-table-container .admin-table th:nth-child(2),
.report-table-container .admin-table td:nth-child(2),
.report-table-container .admin-table th:nth-child(3),
.report-table-container .admin-table td:nth-child(3),
.report-table-container .admin-table th:nth-child(4),
.report-table-container .admin-table td:nth-child(4),
.report-table-container .admin-table th:nth-child(5),
.report-table-container .admin-table td:nth-child(5) {
    width: 19.5%;
    text-align: center !important;
}

/* ---------- Top Downloads columns (4 cols) ---------- */
.dashboard-section .admin-table th:nth-child(1),
.dashboard-section .admin-table td:nth-child(1) {
    width: 40%;
    text-align: left !important;
    word-break: break-word;
}

.dashboard-section .admin-table th:nth-child(2),
.dashboard-section .admin-table td:nth-child(2),
.dashboard-section .admin-table th:nth-child(3),
.dashboard-section .admin-table td:nth-child(3),
.dashboard-section .admin-table th:nth-child(4),
.dashboard-section .admin-table td:nth-child(4) {
    width: 20%;
    text-align: center !important;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .report-table-container .admin-table thead th,
    .report-table-container .admin-table tbody td,
    .dashboard-section .admin-table thead th,
    .dashboard-section .admin-table tbody td {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }
}