* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; background: #f6f4ef; color: #26221c; }
.hidden { display: none !important; }

.layout { display: flex; min-height: 100vh; }

/* --- Menu trái --- */
.sidebar { width: 248px; flex-shrink: 0; background: #2b2118; color: #f3ead9; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { padding: 20px 18px 14px; border-bottom: 1px solid rgba(243,234,217,.15); }
.brand-name { font-size: 19px; font-weight: 700; }
.brand-sub { font-size: 12px; opacity: .75; margin-top: 4px; line-height: 1.45; }
.menu { display: flex; flex-direction: column; gap: 4px; padding: 14px 10px; }
.menu-item { display: flex; align-items: center; gap: 10px; text-align: left; background: transparent; border: 0; color: #f3ead9; font-size: 14.5px; padding: 10px 10px; border-radius: 8px; cursor: pointer; }
.menu-item:hover { background: rgba(243,234,217,.1); }
.menu-item.active { background: #f3ead9; color: #2b2118; font-weight: 600; }
.menu-code { font-size: 11.5px; font-weight: 700; background: #c96f2e; color: #fff; border-radius: 5px; padding: 2px 6px; min-width: 30px; text-align: center; }
.menu-item.active .menu-code { background: #2b2118; color: #f3ead9; }
.sidebar-foot { margin-top: auto; padding: 14px 18px; font-size: 12px; line-height: 1.55; opacity: .7; border-top: 1px solid rgba(243,234,217,.15); }

/* --- Vùng chính --- */
.main { flex: 1; padding: 26px 30px 60px; max-width: 1100px; }
.view h1 { font-size: 23px; margin-bottom: 6px; }
.view-desc { font-size: 14px; color: #6b6252; margin-bottom: 18px; line-height: 1.55; }
.loading { color: #6b6252; font-size: 14px; }

.project-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin: 22px 0 12px; }
.project-head h2 { font-size: 18px; }
.project-meta { font-size: 13px; color: #6b6252; }
.group-title { font-size: 15px; font-weight: 700; margin: 18px 0 10px; color: #7a4a21; }

/* --- Mẫu danh sách → chi tiết (dùng chung) --- */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid #e3dccb; border-radius: 10px; padding: 14px; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.card:hover { border-color: #c96f2e; box-shadow: 0 2px 10px rgba(43,33,24,.08); }
.card-code { font-size: 11.5px; font-weight: 700; color: #c96f2e; letter-spacing: .4px; }
.card-name { font-size: 15.5px; font-weight: 600; margin: 3px 0 5px; line-height: 1.35; }
.card-meta { font-size: 12.5px; color: #6b6252; line-height: 1.5; }
.card-price { font-size: 14.5px; font-weight: 700; color: #2b2118; margin-top: 6px; }
.empty-state { border: 1.5px dashed #cbbfa5; border-radius: 10px; padding: 34px 20px; text-align: center; color: #6b6252; font-size: 15px; background: #fbf9f4; }

/* --- Bảng giá Juno --- */
.price-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e3dccb; border-radius: 10px; overflow: hidden; font-size: 13.5px; margin-bottom: 8px; }
.price-table th, .price-table td { padding: 8px 12px; border-bottom: 1px solid #eee7d6; text-align: right; }
.price-table th:first-child, .price-table td:first-child { text-align: left; }
.price-table thead th { background: #f3ead9; text-align: right; }
.price-table thead th:first-child { text-align: left; }
.note { font-size: 12.5px; color: #6b6252; line-height: 1.55; }

/* --- Chi tiết --- */
.detail-overlay { position: fixed; inset: 0; background: rgba(38,34,28,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; overflow-y: auto; }
.detail-panel { background: #fff; border-radius: 12px; max-width: 560px; width: 100%; padding: 24px; position: relative; }
.detail-close { position: absolute; top: 12px; right: 12px; border: 0; background: #f3ead9; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.detail-panel h3 { font-size: 19px; margin: 2px 0 4px; padding-right: 34px; }
.detail-panel .detail-sub { font-size: 13px; color: #6b6252; margin-bottom: 14px; }
.detail-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid #f0ead9; font-size: 14px; }
.detail-row .k { color: #6b6252; }
.detail-row .v { font-weight: 600; text-align: right; }
.detail-section { margin-top: 16px; }
.detail-section h4 { font-size: 14px; margin-bottom: 8px; color: #7a4a21; }

/* --- A1 --- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stat-card { background: #fff; border: 1px solid #e3dccb; border-radius: 10px; padding: 16px; cursor: pointer; text-align: left; font: inherit; width: 100%; }
.stat-card:hover { border-color: #c96f2e; }
.stat-num { font-size: 26px; font-weight: 800; }
.stat-label { font-size: 13px; color: #6b6252; margin-top: 3px; line-height: 1.45; }
.stat-none { font-size: 15px; font-weight: 600; color: #6b6252; }

/* --- Thanh lọc (A3, B5) --- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 16px; font-size: 13.5px; color: #6b6252; }
.filter-bar select, .filter-bar input[type="search"] { font: inherit; font-size: 13.5px; padding: 6px 9px; border: 1px solid #d8cfb8; border-radius: 7px; background: #fff; color: #26221c; }
.filter-bar input[type="search"] { min-width: 220px; }

/* --- C2: danh sách lịch đăng --- */
.sched-list { display: flex; flex-direction: column; gap: 8px; }
.sched-row { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid #e3dccb; border-radius: 10px; padding: 12px 16px; }
.sched-date { min-width: 118px; }
.sched-day { font-weight: 700; font-size: 15px; }
.sched-dow { font-size: 12.5px; color: #6b6252; margin-top: 2px; }
.sched-main { flex: 1; }
.sched-title { font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.sched-meta { font-size: 12.5px; color: #6b6252; margin-top: 2px; }
.sched-meta a, .detail-row .v a, .detail-sub a { color: #b35e1d; }
.badge { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.badge-live { background: #e2f2df; color: #2e6b26; }
.badge-next { background: #fdeeda; color: #9a5a12; }
.badge-other { background: #eee9db; color: #6b6252; }

/* --- A1: thẻ chữ + hộp chờ duyệt --- */
.stat-text { font-size: 16.5px; font-weight: 700; line-height: 1.4; }
.approve-box { margin-top: 26px; background: #fff; border: 1px solid #e3dccb; border-radius: 10px; padding: 18px; }
.approve-box h2 { font-size: 17px; margin-bottom: 12px; }
.approve-list { display: flex; flex-direction: column; gap: 8px; }
.approve-item { text-align: left; font: inherit; font-size: 14px; background: #fbf9f4; border: 1px solid #e3dccb; border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.approve-item:hover { border-color: #c96f2e; }
.approve-code { font-weight: 800; color: #c96f2e; margin-right: 6px; }
.approve-meta { color: #6b6252; font-size: 12.5px; }

@media (max-width: 720px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .main { padding: 20px 16px 50px; }
}
