/* ===================================
   Iwacu Core News Website - Styles
   Color Scheme: White & Black
   =================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #000000;
    --secondary-color: #ffffff;
    --accent-color: #333333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --border-color: #dddddd;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
    width: 100%;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Ensure buttons and inputs are touch-friendly on mobile */
button, a, input[type="button"], input[type="submit"], input[type="reset"] {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Ensure text remains selectable */
p, span, div, li, td, th, label {
    -webkit-user-select: text;
    user-select: text;
}

/* Prevent body overflow on mobile */
@media (max-width: 768px) {
    html, body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body.sidebar-open {
        overflow-y: hidden;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

/* ===================================
   HEADER STYLES
   =================================== */

.site-header {
    background-color: var(--secondary-color);
    border-bottom: 2px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.header-top {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 10px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.header-top-inner {
    width: 100%;
}

.header-date {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.header-social a {
    color: var(--secondary-color);
    margin-left: 15px;
    font-size: 16px;
}

.header-social a:hover {
    opacity: 0.7;
}

.header-main {
    padding: 20px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-main-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a img {
    height: 50px;
    width: auto;
}

@media (max-width: 768px) {
    .logo a img { height: 35px; }
}

@media (max-width: 480px) {
    .logo a img { height: 28px; }
}

.header-search {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search form in header top bar */
.search-top {
    display: flex;
    flex: 1;
    min-width: 0;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 25px;
    overflow: hidden;
    max-width: 320px;
    transition: all 0.3s ease;
}

.search-top input {
    padding: 7px 15px;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 13px;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.search-top input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-top button {
    padding: 7px 14px;
    background-color: rgba(255,255,255,0.2);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.search-top button:hover {
    background-color: rgba(255,255,255,0.35);
}

.search-form input {
    padding: 10px 20px;
    border: none;
    outline: none;
    width: 250px;
    max-width: 100%;
    font-size: 14px;
}

.search-form button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.user-actions a {
    margin-left: 15px;
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s;
}

.user-actions a:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Login / Logout button in header top bar */
.header-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border: 2px solid rgba(255,255,255,0.7);
    border-radius: 20px;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.3s, border-color 0.3s;
}

.header-auth-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: #fff;
    color: #fff !important;
}

.main-nav {
    background-color: var(--light-gray);
    border-top: 1px solid var(--border-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 15px 25px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    cursor: pointer;
}

/* ===================================
   BREAKING NEWS TICKER
   =================================== */

.breaking-news {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 0;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
    min-width: 0;
}

.breaking-label {
    background-color: var(--danger-color);
    padding: 4px 12px;
    font-weight: 700;
    font-size: 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.breaking-content {
    flex: 1;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
}

.ticker-wrap {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: ticker-scroll 10s linear infinite;
    width: max-content;
    will-change: transform;
}

.ticker-track:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    padding: 0 4px;
    transition: opacity 0.2s;
    cursor: pointer;
    white-space: nowrap;
}

.ticker-item:hover {
    opacity: 0.75;
    text-decoration: underline;
    color: #fff;
}

.ticker-sep {
    margin: 0 12px;
    opacity: 0.4;
    font-size: 14px;
    flex-shrink: 0;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
    .breaking-news .container {
        gap: 8px;
    }

    .breaking-label {
        padding: 4px 8px;
        font-size: 11px;
        gap: 4px;
    }

    .breaking-label i {
        font-size: 10px;
    }

    .ticker-item {
        font-size: 12px;
    }

    .ticker-sep {
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    .breaking-label span {
        display: none;
    }

    .breaking-label {
        padding: 4px 8px;
    }

    .ticker-item {
        font-size: 11px;
    }

    .ticker-sep {
        margin: 0 6px;
    }
}

.main-content {
    padding: 40px 0;
    min-height: 60vh;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

/* ===================================
   HERO ARTICLE
   =================================== */

.hero-article {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
    overflow: hidden;
}

.hero-article .article-image {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.hero-article .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.category-badge.politics { background-color: #dc3545; }
.category-badge.business { background-color: #28a745; }
.category-badge.technology { background-color: #007bff; }
.category-badge.sports { background-color: #fd7e14; }
.category-badge.entertainment { background-color: #e83e8c; }
.category-badge.health { background-color: #20c997; }
.category-badge.world { background-color: #6f42c1; }

.hero-article .article-content {
    padding: 30px;
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: var(--dark-gray);
    font-size: 14px;
    flex-wrap: wrap;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-excerpt {
    font-size: 16px;
    line-height: 1.8;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s;
}

.read-more:hover {
    background-color: var(--accent-color);
    transform: translateX(5px);
}

/* ===================================
   ARTICLES GRID
   =================================== */

.articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.article-card {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.article-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--primary-color);
}

.card-content p {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 15px;
    line-height: 1.6;
}

.card-content .read-more {
    font-size: 14px;
    padding: 8px 20px;
}

/* ===================================
   PAGINATION
   =================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 50px 0 30px;
    flex-wrap: nowrap;
    width: 100%;
    position: relative;
    z-index: 10;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 25px;
    transition: all 0.3s;
    white-space: nowrap;
}

.pagination-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pagination-btn i {
    font-size: 12px;
}

.pagination-info {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--light-gray);
    border-radius: 8px;
    min-height: 40px;
    white-space: nowrap;
}


/* ===================================
   SIDEBAR WIDGETS
   =================================== */

.widget {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 30px;
}

.widget-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Trending Widget */
.trending-list {
    list-style: none;
}

.trending-list li {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-list li:last-child {
    border-bottom: none;
}

.trend-thumb {
    display: block;
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    overflow: hidden;
    border-radius: 4px;
}

.trend-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.trend-thumb:hover img {
    transform: scale(1.08);
}

.trend-content a {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.5;
    display: block;
    margin-bottom: 5px;
}

.trend-content a:hover {
    color: var(--dark-gray);
}

.trend-meta {
    font-size: 12px;
    color: var(--dark-gray);
}

/* Newsletter Widget */
.newsletter-widget p {
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form input {
    padding: 12px;
    border: 2px solid var(--border-color);
    outline: none;
    font-size: 14px;
}

.newsletter-form input:focus {
    border-color: var(--primary-color);
}

.newsletter-form button {
    padding: 12px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* Categories Widget */
.categories-list {
    list-style: none;
}

.categories-list li {
    border-bottom: 1px solid var(--border-color);
}

.categories-list li:last-child {
    border-bottom: none;
}

.categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    color: var(--primary-color);
    font-weight: 600;
}

.categories-list li a:hover {
    color: var(--dark-gray);
    padding-left: 10px;
}

.categories-list .count {
    background-color: var(--light-gray);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

/* Social Widget */
.social-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 18px;
    transition: all 0.3s;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.social-link.facebook:hover { background-color: #3b5998; }
.social-link.twitter:hover { background-color: #1da1f2; }
.social-link.instagram:hover { background-color: #e1306c; }
.social-link.linkedin:hover { background-color: #0077b5; }
.social-link.youtube:hover { background-color: #ff0000; }

/* Advertisement Widget */
.ad-widget {
    background-color: var(--light-gray);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 30px;
}

.ad-widget .widget-title {
    font-size: 14px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-ad-link {
    display: block;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.sidebar-ad-link:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sidebar-ad-link img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s;
}

.sidebar-ad-link:hover img {
    transform: scale(1.02);
}

/* ===================================
   FOOTER STYLES
   =================================== */

.site-footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    margin-top: 60px;
    width: 100%;
    overflow-x: hidden;
}

.footer-main {
    padding: 50px 0 30px;
    border-bottom: 1px solid var(--accent-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary-color);
}

.footer-section p {
    line-height: 1.8;
    color: var(--medium-gray);
    font-size: 14px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--medium-gray);
    font-size: 14px;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-section ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

/* Footer social links — white background on dark footer */
.footer-section .social-link {
    background-color: rgba(255,255,255,0.1);
    color: var(--secondary-color);
}

.footer-section .social-link:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Footer newsletter form */
.footer-newsletter {
    width: 100%;
}

.footer-newsletter input {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 100%;
    box-sizing: border-box;
}

.footer-newsletter input::placeholder {
    color: rgba(255,255,255,0.5);
}

.footer-newsletter input:focus {
    border-color: rgba(255,255,255,0.6);
}

.footer-newsletter button {
    width: 100%;
    box-sizing: border-box;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    color: var(--medium-gray);
    font-size: 14px;
}

.footer-bottom p {
    word-break: break-word;
}

/* ===================================
   LOGIN PAGE STYLES
   =================================== */

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

.login-box {
    background-color: var(--secondary-color);
    border: 2px solid var(--primary-color);
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.login-box h2 {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    text-transform: capitalize;
    letter-spacing: 0.2px;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    outline: none;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.form-group input:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.form-options label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.form-options a {
    color: var(--dark-gray);
}

.form-options a:hover {
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: var(--accent-color);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    color: var(--dark-gray);
}

.login-footer a {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===================================
   ADMIN DASHBOARD STYLES
   =================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #000000 0%, #0a0a0a 100%);
    color: var(--secondary-color);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: scroll;
    scrollbar-width: none;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.admin-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sidebar-header img {
    height: 40px;
    width: auto;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
}

.sidebar-user {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-role-badge {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.admin-nav {
    padding: 12px 0;
}

.admin-nav ul {
    list-style: none;
}

.admin-nav ul li {
    position: relative;
}

.admin-nav ul li.nav-section {
    padding: 16px 24px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.admin-nav ul li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.admin-nav ul li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.6) 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.admin-nav ul li a:hover::before,
.admin-nav ul li a.active::before {
    transform: scaleY(1);
}

.admin-nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.admin-nav ul li a i {
    font-size: 16px;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

/* Notification Badge */
.notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: -0.3px;
    border-radius: 11px;
    margin-left: auto;
    animation: pulse-badge 2.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.admin-nav ul li a:hover .notification-badge,
.admin-nav ul li a.active .notification-badge {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #dc3545;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.12);
        opacity: 0.95;
    }
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f5f6f8 100%);
    min-width: 0;
    overflow-x: hidden;
}

.admin-header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.admin-header h1 i {
    color: #000;
    font-size: 24px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #1a1a1a;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #000;
}

.admin-user span {
    font-weight: 600;
    font-size: 14px;
}

.admin-main {
    padding: 32px;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.3) 100%);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 36px;
    font-weight: 900;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    line-height: 1;
}

.stat-info p {
    color: #6c757d;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0;
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #000000;
    flex-shrink: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Data Table */
.data-table {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.data-table:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    background: linear-gradient(90deg, #fafbfc 0%, #f8f9fa 100%);
}

.table-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-header h2 i {
    color: #000;
    font-size: 18px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.btn-small {
    padding: 8px 16px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    border-radius: 8px;
}

.btn-small:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-small i {
    font-size: 12px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #000000;
}

thead th {
    padding: 12px 24px;
    text-align: left;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
    color: #ffffff;
    border-bottom: none;
}

tbody td {
    padding: 16px 24px;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-size: 14px;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: linear-gradient(90deg, #f8f9fa 0%, #f5f6f8 100%);
}

tbody tr:hover td {
    color: #1a1a1a;
}

/* ===================================
   TABLE SCROLL CONTAINER - ESSENTIAL FIX
   =================================== */

/* Scrollable table wrapper - must wrap all tables */
.table-container,
.table-scroll-container,
.data-table > div[style*="overflow-x"] {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 12px 12px;
}

/* Consistent column widths for all data tables */
table th:first-child { /* #, checkbox, etc. */
    width: 60px;
    min-width: 60px;
    max-width: 80px;
    text-align: center;
}
table td:first-child {
    text-align: center;
}

/* Consistent action buttons container */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
}

/* For 3+ action buttons: switch to 2-column grid */
@media (max-width: 768px) {
    .action-buttons {
        display: grid;
        grid-template-columns: repeat(2, 36px);
        gap: 6px;
        width: auto;
    }
}

/* Global table styling */
table {
    width: 100%;
    min-width: 700px;
}

table th, table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e9ecef;
}

table tbody tr:hover {
    background: #f8f9fa;
}

/* Specific column width helpers */
.col-small { width: 80px; min-width: 80px; }
.col-medium { width: 150px; min-width: 150px; }
.col-large { width: 250px; min-width: 200px; max-width: 350px; }
.col-xl { width: 350px; min-width: 250px; }
.col-actions { width: 100px; min-width: 90px; }

/* ===================================
   MOBILE RESPONSIVE LAYOUT - COMPLETE FIX
   =================================== */

/* Make tables scroll horizontally on mobile */
@media (max-width: 768px) {

    /* Data table wrapper */
    .data-table {
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Table header remains in container */
    .data-table .table-header {
        flex: 0 0 auto;
        border-radius: 12px 12px 0 0;
        padding: 16px 20px !important;
    }

    /* Scrollable wrapper for table inside data-table */
    .data-table table {
        min-width: 600px !important;
    }

    /* Wrap any table in data-table with scrollable container */
    .data-table .table-wrapper,
    .data-table > div[style*="overflow-x:auto"],
    .data-table > div:has(> table) {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
    }

    /* Scrollable wrapper for table only */
    .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1;
        width: 100%;
    }

    /* Table styling */
    .table-container table,
    .data-table table {
        min-width: 700px !important;
        width: 100% !important;
        border-collapse: collapse !important;
        display: table !important;
    }

    /* Ensure all tables maintain structure */
    thead {
        display: table-header-group !important;
        background: #000000 !important;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    tbody {
        display: table-row-group !important;
    }

    tr {
        display: table-row !important;
    }

    th, td {
        display: table-cell !important;
    }

    /* Table header styling */
    .table-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
    }

    .table-header h2 {
        width: 100% !important;
        font-size: 16px !important;
    }

    .table-header .table-actions {
        width: 100% !important;
        flex-direction: column !important;
    }

    .btn-small {
        width: 100% !important;
        justify-content: center !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        min-height: 40px !important;
    }

    /* Table cell styling for mobile */
    thead th {
        padding: 12px 14px !important;
        font-size: 11px !important;
        font-weight: 700 !important;
    }

    tbody td {
        padding: 12px 14px !important;
        font-size: 13px !important;
        border-bottom: 1px solid #e9ecef !important;
    }

    /* Keep columns that need it nowrap, but allow title to wrap */
    tbody td:nth-child(1), /* # */
    tbody td:nth-child(3), /* Author */
    tbody td:nth-child(4), /* Category */
    tbody td:nth-child(5), /* Views */
    tbody td:nth-child(6)  /* Published */
    {
        white-space: nowrap !important;
    }
    tbody td:nth-child(2) { /* Title */
        white-space: normal !important;
        line-height: 1.4;
    }

    /* Allow action column to wrap */
    tbody td:last-child {
        white-space: normal !important;
        min-width: 100px !important;
    }

    /* Action buttons styling */
    .action-buttons {
        display: grid !important;
        grid-template-columns: repeat(2, 36px) !important;
        gap: 6px !important;
        width: auto !important;
    }

    .action-buttons form {
        width: 36px !important;
        height: 34px !important;
        display: flex !important;
    }

    .action-buttons a,
    .action-buttons button,
    .action-btn {
        width: 36px !important;
        height: 34px !important;
        padding: 0 !important;
        font-size: 13px !important;
        min-height: auto !important;
        flex: none !important;
        min-width: auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Status badges mobile */
    .status-badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }

    .ws-badge {
        font-size: 9px !important;
        padding: 3px 6px !important;
    }

    /* Prevent horizontal scroll on page */
    body, html, .admin-wrapper, .admin-content, .admin-main {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }

    /* ===================================
       RESPONSIVE FORMS
       =================================== */

    /* Change two-column grid to single column */
    .form-row,
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Form padding */
    .data-table > div[style*="padding:"] {
        padding: 16px !important;
    }

    /* Welcome banner mobile */
    .welcome-banner {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }

    .welcome-banner .welcome-action {
        width: 100%;
    }

    .welcome-banner .btn-primary {
        width: 100%;
        justify-content: center;
    }

    /* Admin header responsiveness */
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .admin-header-left {
        width: 100%;
    }

    .admin-header h1 {
        font-size: 18px;
    }
}

/* Add default table scroll wrapper for all data-table components */
.data-table table {
    width: 100%;
}

/* Ensure any table inside data-table is in a scrollable container */
.data-table {
    overflow: hidden;
}

.data-table .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

@media (max-width: 480px) {
    .table-container table,
    .dash-table {
        min-width: 450px;
        font-size: 12px;
    }

    .table-header h2 {
        font-size: 15px;
    }

    thead th {
        padding: 10px 12px;
        font-size: 10px;
    }

    tbody td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .btn-small {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
    }

    .action-buttons a,
    .action-buttons button,
    .action-btn {
        padding: 5px 6px;
        font-size: 11px;
        min-height: 32px;
    }

    .status-badge,
    .ws-badge {
        font-size: 10px;
        padding: 3px 6px;
    }

    .admin-main {
        padding: 16px !important;
    }

    .admin-header {
        padding: 16px !important;
    }
}

.status-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.status-badge.published {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.status-badge.draft {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.status-badge.pending {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.status-badge.under_review {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

.status-badge.approved {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.status-badge.returned {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.status-badge.rejected {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 36px);
    gap: 4px;
    align-items: center;
    width: 80px;
}

.action-btn {
    padding: 0;
    border: none;
    cursor: pointer;
    font-size: 13px;
    color: #ffffff;
    border-radius: 7px;
    transition: transform .15s, box-shadow .15s, opacity .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 34px;
    flex-shrink: 0;
    background: #6b7280;
    text-decoration: none;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
    opacity: .92;
    color: #ffffff;
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.action-btn.edit {
    background: #1d4ed8;
    color: #ffffff;
}

.action-btn.edit:hover {
    background: #1e40af;
    opacity: 1;
}

.action-btn.delete {
    background: #dc2626;
    color: #ffffff;
}

.action-btn.delete:hover {
    background: #b91c1c;
    opacity: 1;
}

.action-btn.approve {
    background: #15803d;
    color: #ffffff;
}

.action-btn.approve:hover {
    background: #166534;
    opacity: 1;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    border-radius: 8px;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    text-transform: capitalize;
    letter-spacing: 0.2px;
}

/* Article Editor */
.editor-container {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    padding: 30px;
    border-radius: 12px;
}

.editor-form {
    max-width: 900px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.form-group textarea:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    outline: none;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.form-group select:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.welcome-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.welcome-content p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
    font-weight: 500;
}

.welcome-action {
    flex-shrink: 0;
}

.btn-primary {
    padding: 12px 24px;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 240px;
    }

    .admin-content {
        margin-left: 240px;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .admin-main {
        padding: 24px;
    }
}

/* Tablet and Mobile Responsive Layout */
@media (max-width: 768px) {
    .admin-wrapper {
        flex-direction: column;
    }

    .admin-sidebar {
        position: fixed;
        left: -260px;
        width: 260px;
        height: 100vh;
        z-index: 9998;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        top: 0;
        pointer-events: auto;
    }

    .admin-sidebar.open {
        left: 0;
        z-index: 9999;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.2);
        pointer-events: auto;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 9997;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .sidebar-overlay.open {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .admin-content {
        margin-left: 0;
        flex: 1;
        min-height: 100vh;
        width: 100%;
    }

    .sidebar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        padding: 8px 12px;
        margin-right: 8px;
    }

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

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 16px;
    }

    .stat-card {
        padding: 20px 16px;
    }

    .admin-header {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 20px;
    }

    .admin-header-left {
        width: auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .admin-header h1 {
        font-size: 18px;
        margin: 0;
    }

    .admin-header .btn-small {
        width: auto;
    }

    .admin-main {
        padding: 16px;
    }

    /* Form responsiveness */
    form[style*="display:flex"] {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    form[style*="display:flex"] input,
    form[style*="display:flex"] select {
        flex: 1;
        min-width: 150px !important;
        max-width: 100% !important;
    }

    form[style*="display:flex"] .btn-small {
        width: 100%;
    }

    /* Alert boxes responsive */
    .alert {
        flex-direction: column;
        gap: 10px;
    }

    /* Content grid adjustment */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Prevent horizontal scroll on content */
    .admin-wrapper,
    .admin-content,
    .admin-main {
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 16px;
    }

    .admin-header h1 {
        font-size: 18px;
    }

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

    .stat-info h3 {
        font-size: 24px;
    }

    table {
        font-size: 13px;
    }

    thead th {
        padding: 10px 16px;
        font-size: 10px;
    }

    tbody td {
        padding: 12px 16px;
        font-size: 13px;
    }

    .welcome-banner {
        padding: 16px;
    }

    .welcome-content h2 {
        font-size: 18px;
    }

    .welcome-content p {
        font-size: 12px;
    }
};
    font-size: 15px;
    background-color: var(--secondary-color);
}

.form-group select:focus {
    border-color: var(--primary-color);
}

.editor-toolbar {
    background-color: var(--light-gray);
    padding: 10px;
    border: 2px solid var(--border-color);
    border-bottom: none;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: 8px 12px;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.toolbar-btn:hover {
    background-color: var(--medium-gray);
}

.content-editor {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: 2px solid var(--border-color);
    outline: none;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.8;
}

.content-editor:focus {
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-primary {
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--accent-color);
}

.btn-secondary {
    padding: 12px 30px;
    background-color: var(--light-gray);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--medium-gray);
}

/* ===================================
   ARTICLE DETAIL PAGE
   =================================== */

.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 40px;
}

.article-detail .article-header {
    margin-bottom: 30px;
}

.article-detail .category-badge {
    position: static;
    display: inline-block;
    margin-bottom: 15px;
}

.article-detail h1 {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.article-detail .article-meta {
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 30px;
}

.article-detail .featured-image {
    margin-bottom: 30px;
}

.article-detail .featured-image img {
    width: 100%;
    height: auto;
}

.article-detail .article-body {
    font-size: 18px;
    line-height: 1.8;
    color: var(--accent-color);
}

.article-detail .article-body p {
    margin-bottom: 20px;
}

.article-detail .article-body h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 30px 0 15px;
    color: var(--primary-color);
}

.article-detail .article-body h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 25px 0 12px;
    color: var(--primary-color);
}

.article-share {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.article-share h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    padding: 10px 20px;
    color: var(--secondary-color);
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s;
}

.share-btn:hover {
    opacity: 0.8;
}

.share-btn.facebook { background-color: #3b5998; }
.share-btn.twitter { background-color: #1da1f2; }
.share-btn.linkedin { background-color: #0077b5; }
.share-btn.whatsapp { background-color: #25d366; }

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .site-header {
        position: relative;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    aside.sidebar,
    .sidebar,
    .contact-sidebar,
    .about-grid > section:nth-child(2),
    .contact-grid > aside,
    .sidebar * {
        display: none !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1025px) {
    .site-header {
        position: sticky;
        top: 0;
    }

    aside.sidebar,
    .sidebar,
    .contact-sidebar,
    .about-grid > section:nth-child(2),
    .contact-grid > aside {
        display: block !important;
    }

    #tickerTrack {
        width: max-content !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    #tickerTrack {
        width: max-content !important;
    }
}

@media (max-width: 768px) {
    .header-main-inner {
        flex-direction: row !important;
        gap: 10px !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 20px !important;
        flex-wrap: wrap;
    }

    .header-main {
        padding: 10px 0;
    }

    .logo {
        flex: 0 0 auto;
        order: 1;
        margin: 0;
        flex-shrink: 1;
    }

    .logo a img {
        height: 28px;
        width: auto;
    }

    .header-ad-block {
        display: flex !important;
        order: 2;
        flex: 1 1 auto;
        width: auto;
        margin: 0;
        min-width: 150px;
        max-width: 250px;
    }

    .menu-toggle {
        display: block !important;
        order: 3;
        margin-left: 10px;
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 18px;
    }

    .header-main .container {
        flex-direction: row;
        gap: 0;
        align-items: center;
        justify-content: space-between;
        display: flex;
        width: 100%;
        padding: 15px 20px;
    }

    .header-top .container {
        flex-direction: row;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    /* Hide social media icons on mobile */
    .header-social {
        display: none;
    }

    /* Optimize search bar for mobile */
    .search-top {
        max-width: 200px;
        flex: 0 1 auto;
    }

    .search-top input {
        width: 100%;
        flex: 1;
        font-size: 12px;
        padding: 6px 12px;
    }

    .search-top button {
        padding: 6px 10px;
    }

    /* Keep date and login button visible */
    .header-date {
        font-size: 12px;
        flex: 0 0 auto;
    }

    .header-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .header-auth-btn {
        width: auto;
        padding: 6px 14px;
        font-size: 12px;
    }

    .main-nav ul {
        flex-direction: column;
        display: none;
    }

    .main-nav ul.active {
        display: flex;
    }

    /* Hide entire sidebar on mobile - only show top and bottom banner ads */
    aside.sidebar,
    .sidebar,
    .contact-sidebar,
    .about-grid > section:nth-child(2),
    .contact-grid > aside,
    .sidebar * {
        display: none !important;
    }

    /* Ensure content grid is single column on mobile */
    .content-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr !important;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-sidebar {
        width: 100%;
        position: static;
        height: auto;
    }

    .admin-content {
        margin-left: 0;
    }

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

    .footer-section .social-links {
        justify-content: flex-start;
    }

    .footer-bottom p {
        font-size: 13px;
        padding: 0 10px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 25px 15px;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .article-detail {
        padding: 20px 15px;
    }

    .article-detail h1 {
        font-size: 26px;
    }

    /* Pagination responsive */
    .pagination {
        gap: 8px;
        margin: 30px 0 20px;
        padding: 0 8px;
        flex-wrap: nowrap;
        justify-content: center;
    }

    .pagination-btn {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .pagination-info {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

@media (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    /* Further optimize search bar on very small screens */
    .search-top {
        max-width: 150px;
    }

    .search-top input {
        font-size: 11px;
        padding: 5px 10px;
    }

    .search-top button {
        padding: 5px 8px;
    }

    /* Compact date display */
    .header-date {
        font-size: 11px;
    }

    .header-date i {
        display: none;
    }

    /* Hide button text, show only icon */
    .header-auth-btn .btn-text {
        display: none;
    }

    .header-auth-btn {
        width: auto;
        padding: 6px 10px;
        justify-content: center;
        min-width: 40px;
    }

    .login-box {
        padding: 20px 12px;
    }

    .login-box h2 {
        font-size: 22px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-detail h1 {
        font-size: 22px;
    }

    .hero-article .article-image {
        height: 220px;
    }

    .hero-article .article-content {
        padding: 15px;
    }

    .card-content {
        padding: 12px;
    }

    .widget {
        padding: 15px;
    }

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

    .admin-main {
        padding: 15px;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .action-buttons {
        grid-template-columns: repeat(2, 36px);
    }
    
    #tickerTrack {
        width: 300px;
    }

    /* Pagination for very small screens */
    .pagination {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 6px;
        justify-content: center;
        margin: 24px 0;
        padding: 0 8px;
    }

    .pagination-btn {
        width: auto;
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .pagination-info {
        padding: 8px 10px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }
}

/* Extra small screens - 360px and below */
@media (max-width: 360px) {
    .header-top {
        padding: 8px 0;
    }

    .header-top .container {
        gap: 6px;
    }

    .header-date {
        font-size: 10px;
    }

    .search-top {
        max-width: 120px;
    }

    .search-top input {
        font-size: 10px;
        padding: 4px 8px;
    }

    .search-top button {
        padding: 4px 6px;
        font-size: 11px;
    }

    .header-auth-btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    .logo a img {
        height: 24px !important;
    }
}

/* ===================================
   SIDEBAR - RESPONSIVE
   =================================== */

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--accent-color);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

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

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 25px;
    border-bottom: 1px solid var(--accent-color);
    background: rgba(255,255,255,0.04);
}

.sidebar-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.sidebar-user-info strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255,255,255,0.15);
    color: var(--medium-gray);
    padding: 2px 8px;
    border-radius: 10px;
    width: fit-content;
}

.nav-section {
    padding: 15px 25px 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--dark-gray);
    list-style: none;
}

/* Toggle button — lives inside .admin-header */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: var(--light-gray);
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }

    .sidebar-close {
        display: block;
    }

    .admin-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        width: 260px !important;
    }

    .admin-sidebar.open {
        left: 0;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .admin-content {
        margin-left: 0 !important;
    }
}

/* form-control */
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: var(--secondary-color);
    transition: border-color 0.2s;
}
.form-control:focus {
    border-color: var(--primary-color);
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
}
.form-group {
    margin-bottom: 18px;
}

/* ===================================
   ABOUT / CONTACT PAGES
   =================================== */

.page-header {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    padding: 30px 25px;
    margin-bottom: 30px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.page-title i {
    width: 44px;
    height: 44px;
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    color: var(--primary-color);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.page-title h1 {
    font-size: 34px;
    font-weight: 900;
    color: var(--primary-color);
}

.page-subtitle {
    color: var(--accent-color);
    font-size: 16px;
    line-height: 1.9;
    max-width: 900px;
}

.about-grid,
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.about-widget {
    margin-bottom: 0;
}

.about-list {
    list-style: none;
    margin-top: 10px;
    display: grid;
    gap: 10px;
}

.about-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--accent-color);
}

.about-list li i {
    color: var(--success-color);
    margin-top: 3px;
}

.about-steps {
    display: grid;
    gap: 15px;
}

.about-step {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid var(--border-color);
    background: var(--light-gray);
    border-radius: 10px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 6px;
    color: var(--primary-color);
}

.step-content p {
    color: var(--accent-color);
    font-size: 14px;
    line-height: 1.8;
}

.about-text {
    color: var(--accent-color);
    font-size: 15px;
    line-height: 1.9;
}

.about-cta {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-about {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 12px 25px;
    background: var(--primary-color);
    color: var(--secondary-color);
    font-weight: 800;
    border-radius: 25px;
    transition: transform .2s, background-color .2s;
}

.btn-about:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.btn-about-secondary {
    background: var(--light-gray);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-about-secondary:hover {
    background: var(--medium-gray);
}

.contact-actions {
    margin-top: 20px;
    display: grid;
    gap: 12px;
}

.contact-note {
    margin: 0;
    color: var(--dark-gray);
    font-size: 13px;
}

.contact-icon {
    width: 42px;
    height: 42px;
    background: var(--light-gray);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info {
    display: grid;
    gap: 14px;
}

.contact-item {
    display: flex;
    gap: 12px;
    align-items: center;
}

.contact-text strong {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: var(--primary-color);
}

.contact-text span {
    color: var(--accent-color);
    font-size: 14px;
}

/* responsive */
@media (max-width: 1024px) {
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}





/* ===================================
   PROFESSIONAL DASHBOARD ENHANCEMENTS
   =================================== */

/* Enhanced Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.sidebar-overlay.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Enhanced Flash Messages */
.flash-message {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.flash-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.flash-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Buttons */
.btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #000000 0%, #333333 100%);
    color: #ffffff;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    background: linear-gradient(135deg, #333333 0%, #000000 100%);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: #000000;
    border: 1px solid #dee2e6;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #e8e8e8 0%, #ddd 100%);
    border-color: #ced4da;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.btn-info:hover {
    background: linear-gradient(135deg, #138496 0%, #0c5460 100%);
}

/* Enhanced Form Styling */
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="url"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    outline: none;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    background: #f5f5f5;
    color: #6c757d;
    cursor: not-allowed;
}

.form-group input:hover:not(:disabled),
.form-group select:hover:not(:disabled),
.form-group textarea:hover:not(:disabled) {
    border-color: #dee2e6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

/* Checkbox and Radio Styling */
.form-group input[type="checkbox"],
.form-group input[type="radio"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.form-group input[type="checkbox"]:focus,
.form-group input[type="radio"]:focus {
    box-shadow: none;
}

/* Alert Boxes */
.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-color: #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-color: #17a2b8;
}

/* Enhanced Table Responsive */
@media (max-width: 768px) {
    .data-table {
        border: none;
        overflow: visible;
        padding: 0;
        border-radius: 0;
    }

    table {
        display: block;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    thead {
        display: none;
    }

    tbody {
        display: block;
    }

    tbody tr {
        display: block;
        border: 1px solid #e9ecef;
        border-radius: 10px;
        margin-bottom: 12px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        overflow: hidden;
    }

    tbody tr:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        background: #ffffff;
    }

    tbody td {
        display: block;
        border: none;
        padding: 12px 16px;
        text-align: right;
        border-bottom: 1px solid #e9ecef;
        word-break: break-word;
    }

    tbody td:first-child {
        padding-top: 16px;
    }

    tbody td:last-child {
        border-bottom: none;
        padding-bottom: 16px;
    }

    tbody td::before {
        content: attr(data-label);
        float: left;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 11px;
        color: #6c757d;
        letter-spacing: 0.3px;
        min-width: 100px;
    }
}

/* Mobile Form Optimizations */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .form-group label {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 14px 12px;
        border-radius: 8px;
    }

    .form-group textarea {
        min-height: 120px;
    }

    .btn-primary,
    .btn-small,
    .btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .btn-primary {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 14px 12px;
    }

    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .table-header h2 {
        width: 100%;
        font-size: 16px;
    }

    .btn-small {
        width: 100%;
    }

    tbody td::before {
        min-width: 80px;
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #e9ecef;
    border-top-color: #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.badge-primary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
}

.badge-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
}

.badge-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
}

.badge-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

/* Professional Dividers */
hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, #e9ecef 50%, transparent 100%);
    margin: 24px 0;
}

/* Link Styles */
a {
    color: #000000;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: #333333;
    text-decoration: underline;
}

a.no-underline:hover {
    text-decoration: none;
}

/* Code Blocks */
code, pre {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #e83e8c;
}

pre {
    padding: 16px;
    overflow-x: auto;
    color: #333333;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f5f5;
}

::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .admin-sidebar,
    .admin-header,
    .sidebar-toggle,
    .btn-small,
    .btn-primary,
    .action-btn {
        display: none;
    }

    .admin-content {
        margin-left: 0;
    }

    body {
        background: white;
    }

    .data-table {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}


/* ===================================
   FORM CONTAINER & OPTIMIZATION
   =================================== */

.form-container {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 32px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.form-grid > .form-group[style*="grid-column"] {
    grid-column: 1/-1;
}

/* Mobile Form Optimizations */
@media (max-width: 768px) {
    .form-container {
        padding: 20px;
        border-radius: 8px;
        margin: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

    .form-group label {
        font-size: 13px;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 14px 12px;
        border-radius: 8px;
        border: 2px solid #e9ecef;
        width: 100%;
    }

    .form-group textarea {
        min-height: 120px;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        resize: vertical;
    }

    .btn-primary,
    .btn-small,
    .btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 8px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 16px;
        border: none;
        border-top: 1px solid #e9ecef;
        border-bottom: 1px solid #e9ecef;
        border-radius: 0;
        box-shadow: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }

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

    .form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 12px 10px;
    }

    .btn-primary,
    .btn-small,
    .btn {
        padding: 12px 14px;
        font-size: 13px;
        margin-bottom: 8px;
    }

    .btn-primary i,
    .btn-small i,
    .btn i {
        font-size: 14px;
    }
}

/* Admin Header Mobile Fix */
@media (max-width: 768px) {
    .admin-header {
        flex-wrap: wrap;
        padding: 14px 16px;
        gap: 12px;
    }

    .admin-header-left {
        gap: 14px;
        width: 100%;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .admin-header .btn-small {
        width: auto;
        padding: 8px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .admin-header {
        flex-direction: column;
        padding: 12px;
    }

    .admin-header-left {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-header h1 {
        font-size: 16px;
    }

    .admin-header .btn-small {
        width: 100%;
        padding: 10px 12px;
        font-size: 12px;
    }
}

/* Mobile Page Layout Fix */
@media (max-width: 768px) {
    .admin-main {
        padding: 20px;
    }

    .data-table {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 12px;
    }

    .data-table {
        margin-bottom: 16px;
        border: none;
    }

    .table-header {
        padding: 14px;
        border-bottom: 1px solid #e9ecef;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .table-header h2 {
        width: 100%;
        font-size: 15px;
    }

    .table-header .btn-small {
        width: 100%;
    }

    table {
        border-spacing: 0 10px;
    }

    tbody tr {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    tbody td {
        padding: 10px 12px;
    }

    tbody td:first-child {
        padding-top: 12px;
    }

    tbody td:last-child {
        padding-bottom: 12px;
    }

    tbody td::before {
        min-width: 70px;
        font-size: 10px;
    }
}

/* ===================================
   RESPONSIVE FORM LAYOUTS
   =================================== */

@media (max-width: 768px) {
    /* Two-column form layouts become single column */
    div[style*="grid-template-columns:1fr 300px"],
    div[style*="grid-template-columns: 1fr 300px"],
    .form-layout-two-col {
        grid-template-columns: 1fr !important;
    }

    /* Form groups */
    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        margin-bottom: 8px;
        display: block;
    }

    .form-control,
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        max-width: 100%;
    }

    /* File upload inputs */
    .form-group input[type="file"] {
        padding: 8px;
        border: 2px dashed #ddd;
        border-radius: 8px;
    }

    /* Rich text editor responsive */
    .ql-container {
        font-size: 14px;
    }

    .ql-editor {
        min-height: 300px;
    }

    /* Form actions */
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary,
    .form-actions button {
        width: 100%;
    }

    /* Data table form wrapper */
    .data-table {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .ql-editor {
        min-height: 200px;
        font-size: 13px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .table-header h2 {
        font-size: 14px;
    }

    /* Improve button sizes on mobile */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-small {
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
        touch-action: manipulation;
    }

    /* Stat card improvements */
    .stat-card {
        padding: 16px;
        min-height: auto;
    }

    .stat-card h3 {
        font-size: 24px;
    }

    .stat-card p {
        font-size: 12px;
    }

    /* Article content improvements */
    .article-title {
        font-size: 20px;
    }

    .article-detail {
        padding: 16px;
    }

    .article-detail h1 {
        font-size: 24px;
    }

    .article-detail h2 {
        font-size: 18px;
    }

    .article-detail .article-body {
        font-size: 15px;
    }

    /* Better spacing for small screens */
    .container {
        padding: 0 12px;
    }

    .admin-main {
        padding: 12px;
    }

    .data-table {
        border-radius: 8px;
    }

    .table-header {
        padding: 12px;
    }

    /* Notification badges */
    .notification-badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 18px;
        text-align: center;
    }

    /* Improve modal/overlay responsiveness */
    .modal {
        width: calc(100% - 24px);
        margin: 12px;
    }
}

/* ===================================
   IMPROVED MOBILE SIDEBAR FIX
   =================================== */

/* Ensure sidebar overlay proper z-index and pointer events */
.sidebar-overlay {
    pointer-events: none;
}

body.sidebar-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .admin-sidebar {
        width: 100%;
        left: -100%;
    }

    .admin-sidebar.open {
        left: 0;
    }

    .admin-content {
        margin-left: 0;
    }

    .admin-header {
        padding: 12px;
    }

    .admin-header-left {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .admin-header h1 {
        font-size: 16px;
    }
}
