* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f4f6f8; color: #1f2933; }
a { color: #b51616; text-decoration: none; }
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #121923; color: #fff; padding: 24px 18px; }
.sidebar h1 { font-size: 20px; margin: 0 0 24px; }
.sidebar a { display: block; color: #dfe6ee; padding: 11px 12px; border-radius: 6px; margin-bottom: 4px; }
.sidebar a:hover, .sidebar a.active { background: #b51616; color: #fff; }
.main { padding: 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.card { background: #fff; border: 1px solid #e1e6ec; border-radius: 8px; padding: 20px; box-shadow: 0 8px 24px rgba(16,24,40,.04); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat strong { display: block; font-size: 30px; color: #b51616; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e1e6ec; }
th, td { padding: 12px 10px; border-bottom: 1px solid #edf1f5; text-align: left; vertical-align: top; }
th { background: #f8fafc; font-size: 13px; text-transform: uppercase; color: #52606d; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 8px 13px; border: 0; border-radius: 6px; background: #b51616; color: #fff; cursor: pointer; font-weight: 700; }
.btn.secondary { background: #334e68; }
.btn.light { background: #e8eef5; color: #1f2933; }
.btn.danger { background: #8a1c1c; }
label { display: block; font-weight: 700; margin: 14px 0 6px; }
input[type=text], input[type=password], input[type=number], textarea, select { width: 100%; border: 1px solid #cbd5df; border-radius: 6px; padding: 10px 12px; font: inherit; background: #fff; }
textarea.code { min-height: 520px; font-family: Consolas, monospace; font-size: 14px; line-height: 1.45; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.notice { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; background: #e6ffed; border: 1px solid #a7f3b8; }
.error { background: #fff1f1; border-color: #ffc9c9; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(420px, 100%); }
.login h2 { text-align: center; margin-top: 0; }
.login form p { text-align: center; }
.login .btn { background: #16873c; min-width: 120px; }
.login .btn:hover { background: #0f6c2f; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.media-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: #eef2f6; }
.hint { color: #627386; font-size: 13px; line-height: 1.5; }
.preview-link { word-break: break-all; font-family: Consolas, monospace; font-size: 12px; }
@media (max-width: 760px) { .admin-shell { grid-template-columns: 1fr; } .sidebar { position: static; } .main { padding: 18px; } }


/* Dấu ấn Bình Long - nhóm trang PHP hệ thống */
.bl-admin-intro { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.bl-admin-intro h3 { margin-top:0; margin-bottom:8px; }
.bl-admin-intro p { margin-bottom:0; max-width:900px; }
.status-badge { display:inline-flex; align-items:center; padding:5px 9px; border-radius:999px; font-size:12px; font-weight:700; white-space:nowrap; }
.status-badge.ok { background:#e6ffed; border:1px solid #a7f3b8; color:#176b36; }
.status-badge.missing { background:#fff1f1; border:1px solid #ffc9c9; color:#9b1c1c; }
.system-pages-table code { font-family:Consolas, monospace; font-size:12px; word-break:break-all; }
@media (max-width:900px) { .bl-admin-intro { flex-direction:column; } }


/* Trình sửa trực tiếp trang Bình Long */
.editor-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:16px; }
.warning-note { background:#fff8e6; border-color:#f2d58a; color:#5f4a12; }
.bl-source-editor { min-height:68vh !important; resize:vertical; tab-size:2; white-space:pre; overflow:auto; }
.editor-savebar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:14px; }
@media (max-width:900px) {
  .editor-toolbar, .editor-savebar { flex-direction:column; align-items:stretch; }
}

