/* ============================================================
   1. GLOBAL VARIABLES & BASE
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --side-bg: #111827;
    --side-hover: #1f2937;
    --primary: #2563eb;
    --accent: #fbbf24; /* Màu vàng thương hiệu */
    --text-muted: #9ca3af;
    --bg-body: #f3f4f6;
    --main-blue: #004a99;
    --main-yellow: #ffd400;
}

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--bg-body); 
    color: #1f2937; 
    margin: 0; 
}

/* ============================================================
   2. LAYOUT & SIDEBAR
   ============================================================ */
.admin-container { display: flex; min-height: 100vh; }

.sidebar { 
    width: 280px; 
    background: var(--side-bg); 
    color: white; 
    flex-shrink: 0; 
    position: sticky; 
    top: 0; 
    height: 100vh; 
}

.sidebar-brand { 
    padding: 30px 25px; 
    border-bottom: 1px solid #374151; 
}

.sidebar-brand h5 { 
    color: var(--accent); 
    font-weight: 700; 
    margin: 0; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}

.menu-label { 
    padding: 20px 25px 10px; 
    font-size: 11px; 
    text-transform: uppercase; 
    color: var(--text-muted); 
    font-weight: 700; 
}

.menu-item { 
    padding: 12px 25px; 
    display: flex; 
    align-items: center; 
    color: #d1d5db; 
    text-decoration: none; 
    transition: 0.2s; 
    border-left: 4px solid transparent; 
}

.menu-item i { margin-right: 15px; width: 20px; font-size: 18px; }

.menu-item:hover, 
.menu-item.active { 
    background: var(--side-hover); 
    color: white; 
    border-left-color: var(--accent); 
}

.menu-item.logout { color: #f87171; margin-top: auto; }

/* ============================================================
   3. MAIN CONTENT & COMPONENTS
   ============================================================ */
.main-content { flex-grow: 1; padding: 40px; }

.content-header { 
    margin-bottom: 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.section-title { 
    border-left: 5px solid var(--main-blue); 
    padding-left: 15px; 
    margin-bottom: 20px; 
    color: var(--main-blue); 
    font-weight: bold; 
    text-transform: uppercase; 
}

.card { 
    border: none; 
    border-radius: 12px; 
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); 
    overflow: hidden; 
    margin-bottom: 20px;
}

.card-header { 
    background: white; 
    border-bottom: 1px solid #f3f4f6; 
    padding: 20px 25px; 
    font-weight: 600; 
}

.card-seo { background-color: #fff9e6; border: 1px solid #ffeeba; }

/* ============================================================
   4. TABLES & DATA
   ============================================================ */
.table { margin-bottom: 0; }

.table thead th { 
    background: #f9fafb; 
    color: #4b5563; 
    font-weight: 600; 
    font-size: 13px; 
    padding: 15px; 
    border: none; 
}

.table tbody td { 
    padding: 15px; 
    vertical-align: middle; 
    border-color: #f3f4f6; 
}

.badge-post { 
    font-size: 0.75rem; 
    max-width: 200px; 
    display: block; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

/* ============================================================
   5. FORMS & BUTTONS
   ============================================================ */
.form-control, .form-select { 
    padding: 10px 15px; 
    border-radius: 8px; 
    border: 1px solid #d1d5db; 
}

.btn-accent { 
    background: var(--accent); 
    color: #000; 
    font-weight: 600; 
    border: none; 
}

.btn-accent:hover { background: #f59e0b; }

.ck-editor__editable { min-height: 300px; }

/* Image Previews */
.preview-logo { 
    width: 120px; 
    height: 120px; 
    object-fit: contain; 
    border: 2px dashed #ccc; 
    border-radius: 50%; 
    padding: 5px; 
    background: #fff; 
}

.preview-service { 
    width: 100%; 
    height: 80px; 
    object-fit: cover; 
    border-radius: 5px; 
    margin-bottom: 5px; 
    border: 1px solid #ddd; 
}

/* ============================================================
   6. COMMENTS & REPLIES
   ============================================================ */
.reply-list { margin-top: 10px; }

.reply-item { 
    background: #f8f9fa; 
    border-left: 3px solid #0d6efd; 
    padding: 8px 12px; 
    margin-bottom: 5px; 
    font-size: 0.85rem; 
    border-radius: 4px; 
    position: relative; 
}

.reply-item:hover .btn-del-mini { opacity: 1; }

.btn-del-mini { 
    position: absolute; 
    right: 5px; 
    top: 5px; 
    opacity: 0; 
    transition: 0.3s; 
    color: #dc3545; 
    font-size: 0.7rem; 
}

/* ============================================================
   7. LOGIN PAGE (Dành riêng cho login.php)
   ============================================================ */
 bodylogin { 
            font-family: 'Inter', sans-serif; 
            background: var(--side-bg); /* Nền tối giống Sidebar */
            height: 100vh; 
            display: flex; 
            align-items: center; 
            justify-content: center;
            margin: 0;
        }   
   
.login-body {
    background: var(--side-bg) !important;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card { 
    width: 100%; 
    max-width: 400px; 
    background: #fff; 
    border-radius: 16px; 
    padding: 40px; 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3); 
}

.brand-logo { 
    color: var(--accent); 
    font-weight: 700; 
    font-size: 24px; 
    text-align: center; 
    letter-spacing: 1px; 
    margin-bottom: 30px; 
    text-transform: uppercase; 
}

.btn-login { 
    background: var(--side-bg); 
    color: var(--accent); 
    font-weight: 700; 
    border: none; 
    padding: 12px; 
    border-radius: 8px; 
    transition: 0.3s; 
    text-transform: uppercase; 
}

.btn-login:hover { 
    background: #1f2937; 
    color: #fff; 
    transform: translateY(-1px); 
}

.error-box { 
    background: #fef2f2; 
    color: #dc2626; 
    padding: 10px; 
    border-radius: 8px; 
    font-size: 13px; 
    margin-bottom: 20px; 
    border-left: 4px solid #dc2626; 
}