/* Lịch đăng bài — kế thừa hệ style của trang Order (cùng một ngôn ngữ giao diện). */
*{box-sizing:border-box}body{margin:0;font-family:'Be Vietnam Pro',sans-serif;font-size:14px;color:#232323;line-height:1.5}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}[hidden]{display:none!important}a{color:#b7102b;text-decoration:none}h1,h2,h3,p{margin:0}h2{font-size:19px;letter-spacing:-.4px}h3{font-size:16px}.appnav,.navtab,.navuser{display:flex}.navtab{align-items:center;text-decoration:none}.applogo{text-decoration:none}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.page-lich .workspace-main{padding:28px 26px;min-height:100vh}.masthead{display:flex}.page-lich .brand h1{font-size:clamp(24px,2.35vw,36px);font-weight:800}.brand p{margin-top:4px;color:#77717a}.header-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.button,.text-button,.icon-button{border-radius:7px;min-height:40px;padding:9px 14px;background:#fff;color:#b7102b;border:1px solid #eed5da;font-weight:500}.button:hover,.text-button:hover{background:#fff2f4}.button.primary{background:#c8102e;color:#fff;border-color:#c8102e}.button.danger-button{color:#a01026;border-color:#f3c5cf}.small-button{min-height:34px;padding:6px 10px;font-size:12px}.text-button{border:0;background:none}.icon-button{color:#68646b;border-color:#e6e2e5;font-size:12px}
input,select,textarea{min-height:40px;padding:9px 11px;border:1px solid #e0dce2;border-radius:7px;background:#fff;color:#303038;max-width:100%}textarea{width:100%;resize:vertical;min-height:90px}input[type=checkbox]{min-height:auto;accent-color:#c8102e}input[type=month]{width:170px}.month-field{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:500;color:#77717a}
.small{font-size:12px}.muted{color:#7a7480}.notice{background:#f8f5fa;color:#62596a;border:1px solid #ebe5ef;border-radius:7px;padding:9px 13px;font-size:12px;margin-bottom:17px}.notice.error{color:#a01026;background:#fff2f3;border-color:#f3c5cf}.notice a{text-decoration:underline}
.badge{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:6px;background:#f0edf3;color:#6d6873;font-size:11px;font-weight:600;line-height:1.6;white-space:nowrap}.badge.green{background:#e3f5ea;color:#0a7a3c}.badge.amber{background:#fdf0dc;color:#9a5e08}.badge.red{background:#fbe3e8;color:#b30f2b}.badge.blue{background:#e3ecfd;color:#2b5bc7}
/* ── Báo cáo nội dung tháng — đầu trang, đếm toàn bộ bảng content ── */
.report{margin-bottom:20px}
.report .section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.report .section-title h2{font-size:17px}
.report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.report-card{background:#fff;border:1px solid #ece7ee;border-radius:10px;padding:13px 15px;display:flex;flex-direction:column;gap:2px;min-height:96px}
.report-card b{font-size:27px;font-weight:800;letter-spacing:-.6px;color:#2f2b33;line-height:1.15}
.report-card span{font-size:11px;font-weight:600;color:#8b8293;text-transform:uppercase;letter-spacing:.5px}
.report-card small{font-size:11px;color:#a09aa7;margin-top:auto;padding-top:6px}
.report-card[data-nt=TikTok]{border-left:4px solid #232323}
.report-card[data-nt=Facebook]{border-left:4px solid #2865df}
.report-card.rp{border-left:4px solid #c8102e}
.rp-head{display:flex;align-items:baseline;gap:9px}
.rp-total{font-size:15px;color:#a09aa7;font-weight:700}
.rp-bar{height:7px;border-radius:99px;background:#f0ebf2;margin-top:9px;overflow:hidden}
.rp-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,#e0566f,#c8102e)}
/* ── Chip KPI: bấm = lọc ── */
.kpi-strip{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.kpi{display:flex;align-items:baseline;gap:8px;padding:8px 14px;border:1px solid #e8e5e8;border-radius:9px;background:#fff;color:#625c67;font-size:12px;font-weight:500;min-height:42px;text-align:left}
.kpi b{font-size:18px;font-weight:700;letter-spacing:-.3px;color:#2f2b33}
.kpi:hover{border-color:#d4c9d4}
.kpi[aria-pressed=true]{border-color:#c8102e;background:#fdeff2;color:#a51026;box-shadow:inset 0 0 0 1px #c8102e}
.kpi[data-tone=blue] b{color:#2865df}.kpi[data-tone=red] b{color:#c8102e}.kpi[data-tone=amber] b{color:#b56908}.kpi[data-tone=green] b{color:#09803c}.kpi[data-tone=gray] b{color:#8b8690}
/* ── Thanh công cụ ── */
.workbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.workbar-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.workbar-filters input[type=search]{width:230px}
.workbar-filters select{max-width:165px;font-size:12px}
.chip-toggle{border:1px solid #eed5da;background:#fff;color:#b7102b;border-radius:7px;min-height:40px;padding:9px 13px;font-weight:600;font-size:12px}
.chip-toggle[aria-pressed=true]{background:#c8102e;color:#fff;border-color:#c8102e}
.view-switch{display:flex;border:1px solid #e8e5e8;border-radius:8px;overflow:hidden;background:#fff}
.view-switch button{border:0;background:none;padding:9px 14px;font-size:12px;font-weight:600;color:#77717a;min-height:40px}
.view-switch button[aria-selected=true]{background:#c8102e;color:#fff}
/* ── Lịch tháng ── */
.calendar-wrap{width:100%;display:flex;justify-content:center}
.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:minmax(96px,1fr);gap:6px;min-height:420px;width:100%;max-width:100%;overflow:auto;padding-right:2px}
.cal-dow{font-size:11px;font-weight:600;color:#8b8293;text-align:center;padding:2px 0 4px;text-transform:uppercase;letter-spacing:.4px}
.calendar .cal-dow{grid-row:1;align-self:end}
.cal-day{border:1px solid #ece7ee;border-radius:8px;background:#fff;padding:6px 6px 5px;display:flex;flex-direction:column;gap:4px;align-items:stretch;text-align:left;min-height:0;overflow:hidden}
.cal-day.blank{background:#faf9fb;border-style:dashed;border-color:#efecf1;cursor:default}
.cal-day.today{border-color:#c8102e;box-shadow:inset 0 0 0 1px #c8102e}
.cal-num{font-size:12px;font-weight:700;color:#8b8293;flex:0 0 auto}
.cal-day.today .cal-num{color:#c8102e}
.cal-day.has .cal-num{color:#2f2b33}
.cal-list{display:flex;flex-direction:column;gap:4px;overflow:auto;min-height:0}
/* Ô bài đăng trong ngày: giờ · nền tảng · tiêu đề · chấm trạng thái */
.cal-post{border:1px solid #e9e4ec;border-left-width:4px;background:#fff;border-radius:6px;padding:4px 6px;font-size:11px;line-height:1.4;color:#4d4852;text-align:left;width:100%;display:block}
.cal-post:hover{background:#faf7fb;border-color:#d4c9d4}
.cal-post b{display:flex;align-items:center;gap:5px;font-size:11px;color:#2f2b33;white-space:nowrap;overflow:hidden}
.cal-post .pt{font-weight:600;color:#7a7480}
.cal-post-title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#6d6873}
.cal-post[data-tt=cho-noi-dung]{border-left-color:#e0566f;background:#fff5f7}
.cal-post[data-tt=san-sang]{border-left-color:#e8a93d;background:#fffaef}
.cal-post[data-tt=da-dang]{border-left-color:#3fae6a;background:#f3fbf6}
.cal-post[data-tt=chua-order]{border-left-color:#b9b2c0;background:#faf9fb}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;flex:0 0 auto}
.dot[data-tt=cho-noi-dung]{background:#d11a3c}.dot[data-tt=san-sang]{background:#d99016}.dot[data-tt=da-dang]{background:#159a54}.dot[data-tt=chua-order]{background:#a49daa}
/* ── Chế độ Hôm nay: danh sách dọc để làm việc, không phải lịch ── */
.today-wrap{max-width:860px}
.today-title{margin-bottom:12px}
.today-row{display:flex;align-items:center;gap:12px;background:#fff;border:1px solid #ece7ee;border-left-width:4px;border-radius:9px;padding:11px 15px;margin-bottom:10px;text-align:left;width:100%}
.today-row[data-tt=cho-noi-dung]{border-left-color:#e0566f}
.today-row[data-tt=san-sang]{border-left-color:#e8a93d}
.today-row[data-tt=da-dang]{border-left-color:#3fae6a}
.today-row[data-tt=chua-order]{border-left-color:#b9b2c0}
.today-gio{font-weight:700;font-size:13px;color:#2f2b33;min-width:44px;flex:0 0 auto}
.today-main{flex:1;min-width:0}
.today-main b{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.today-sub{display:flex;gap:6px;flex-wrap:wrap;margin-top:3px}
.today-tools{display:flex;gap:6px;flex:0 0 auto}
.icon-link{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;padding:5px 8px;border:1px solid #eee4e8;border-radius:7px;background:#fff;color:#b7102b;font-size:12px;text-decoration:none}
.icon-link:hover{background:#fff2f4}
.empty{padding:22px;text-align:center;color:#8b8293;background:#faf9fb;border-radius:9px;font-size:13px}
/* ── Bảng tổng content của tháng — nhìn toàn bảng như trong Base ── */
.month-table{margin-top:26px}
.month-table .section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px}
.month-table .section-title h2{font-size:17px}
.table-scroll{overflow:auto;width:100%;max-height:62vh;border:1px solid #ebe7ec;border-radius:9px;background:#fff}
.post-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1700px;font-size:12px;line-height:1.5}
.post-table th{text-align:left;font-weight:600;background:#f7f5f8;white-space:nowrap;color:#625c67;position:sticky;top:0;z-index:2;font-size:11px;letter-spacing:.3px}
.post-table th,.post-table td{padding:11px 14px;border-bottom:1px solid #eeebef}
.post-table tbody tr:last-child td{border-bottom:0}
.post-table td{vertical-align:top}
.post-table tbody tr{cursor:pointer}
.post-table tbody tr:hover td{background:#fbf8fb}
.post-table tr[data-tt=cho-noi-dung] td:first-child{box-shadow:inset 3px 0 0 #e0566f}
.post-table tr[data-tt=san-sang] td:first-child{box-shadow:inset 3px 0 0 #e8a93d}
.post-table tr[data-tt=da-dang] td:first-child{box-shadow:inset 3px 0 0 #3fae6a}
.post-table tr[data-tt=chua-order] td:first-child{box-shadow:inset 3px 0 0 #b9b2c0}
.th-sort{border:0;background:none;padding:0;font:inherit;font-weight:inherit;color:inherit;cursor:pointer;text-align:left}
.th-sort:hover{color:#c8102e}
.cell-date{white-space:nowrap;font-weight:600;color:#303039}
.cell-date small{display:block;font-weight:400;color:#8b8293}
.cell-title{min-width:200px;max-width:330px}
.row-title{border:0;background:none;padding:0;text-align:left;font:inherit;font-weight:600;color:#303039;cursor:pointer}
.row-title:hover{color:#c8102e}
.cell-labels{min-width:140px;max-width:240px;color:#6d6873;font-size:11px;line-height:1.55}
.cell-labels small{display:block}
.cell-text{min-width:130px;max-width:220px;color:#6d6873;font-size:11px;line-height:1.5}
.cell-text small{display:block}
.cell-links{white-space:nowrap}
.cell-links .icon-link{min-width:28px;min-height:28px;padding:3px 6px;font-size:11px}
.cell-link{display:inline-block;color:#b7102b;font-weight:600;white-space:nowrap;font-size:11px}
.cell-link:hover{text-decoration:underline}
.cell-order{white-space:nowrap;text-align:right}
.cell-order small{display:block;margin-top:4px;font-size:10px;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-btn{min-height:30px;padding:5px 11px;font-size:11px;font-weight:700;letter-spacing:.4px;background:#c8102e;color:#fff;border-color:#c8102e;display:inline-block;text-decoration:none}
.order-btn:hover{background:#a80d27;color:#fff}
.order-btn.ghost{background:#fff;color:#b7102b;border-color:#eed5da}
.order-btn.ghost:hover{background:#fff2f4}
.cell-order .warn{color:#b56908}
/* ── Bài chưa xếp ngày ── */
.unscheduled{margin-top:18px;font-size:12px}
.unscheduled summary{cursor:pointer;color:#7a7480;font-weight:600;padding:8px 0}
#setupDetails{margin-top:18px;font-size:12px;color:#62596a}
#setupDetails summary{cursor:pointer;font-weight:600;padding:6px 0}
#setupFields h3{margin:10px 0 4px;font-size:13px}
#setupFields ul{margin:0;padding-left:20px}
/* ── Dialog ── */
dialog{border:1px solid #e6dfe6;border-radius:14px;padding:0;max-width:min(720px,94vw);width:720px;max-height:88vh;box-shadow:0 24px 70px #2b172022}
dialog::backdrop{background:#2b1a1eb3}
.dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:18px 20px 0}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:.8px;color:#a08b95;text-transform:uppercase;margin-bottom:4px}
.dialog-header h2{font-size:20px;line-height:1.35;overflow-wrap:anywhere}
#dialogBody{padding:14px 20px 20px;overflow:auto}
.quick-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.fact-line{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:14px}
.fact{font-size:11px;color:#7a7480;background:#f8f5fa;border-radius:6px;padding:4px 9px}
.fact b{color:#2f2b33;font-weight:600}
.brief-card{border:1px solid #ece7ee;border-radius:9px;padding:12px 14px;margin-bottom:10px;background:#fff}
.brief-card h3{font-size:12px;color:#8b8293;text-transform:uppercase;letter-spacing:.5px;margin-bottom:6px}
.multiline{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.order-link-card{border:1px solid #dfe8f5;border-left:4px solid #2865df;border-radius:9px;padding:12px 14px;margin-bottom:10px;background:#f8faff}
.order-link-card h3{font-size:13px;margin-bottom:6px}
.warn-card{border:1px solid #f3d9a8;border-left:4px solid #d99016;border-radius:9px;padding:10px 14px;margin-bottom:10px;background:#fffaef;font-size:12px;color:#8a5a12}
.nt-badge[data-nt="fb-loai"]{background:#f3e8ff;color:#6b21a8;border-color:#d8b4fe}
.nt-badge{display:inline-flex;padding:1px 7px;border-radius:5px;background:#eee8f4;color:#5b4b6e;font-size:10px;font-weight:700}
.nt-badge[data-nt=TikTok]{background:#e8f4fd;color:#1755a4}
.nt-badge[data-nt=Facebook]{background:#e3ecfd;color:#2b4fc7}
@media(max-width:700px){
  .masthead{flex-direction:column;align-items:stretch}.header-actions{justify-content:flex-start}
  .workbar-filters,.workbar-filters input[type=search]{width:100%}
  .workbar-filters input[type=search]{flex:1;min-width:140px;width:auto}
  .view-switch{width:100%}.view-switch button{flex:1}
  .calendar{grid-auto-rows:minmax(72px,auto);height:auto!important}
  .cal-post-title{white-space:normal}
  .today-row{flex-wrap:wrap}.today-tools{width:100%}
  dialog{width:94vw}
}
