:root{font-family:'Be Vietnam Pro','Segoe UI',system-ui,sans-serif;color:#293727;background:#f8faf7;font-size:14px;--green:#435939;--line:#dfe7d8;--muted:#839078;--wash:#edf4e7;--rail:64px;--side:244px}*{box-sizing:border-box}body{margin:0;min-height:100vh}button,input,textarea,select{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button{cursor:pointer;min-height:40px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--green);padding:9px 13px}button:hover{background:var(--wash)}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--green);border-color:var(--green);color:#fff}.primary:hover{background:#35492d}a{color:var(--green);text-decoration:none}button:focus-visible,a:focus-visible{outline:3px solid #95ae82;outline-offset:3px}input,select,textarea{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#293727;outline:none}input:focus,select:focus,textarea:focus{border-color:#8ca376;box-shadow:0 0 0 3px #e9f0e1}label{display:block;font-size:12px;font-weight:500;margin:18px 0 8px}textarea{resize:vertical;line-height:1.7;min-height:90px}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}h1,h2,h3,p{margin:0}p{line-height:1.7}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
.app-rail{position:fixed;inset:0 auto 0 0;z-index:10;width:var(--rail);background:#eef3e9;border-right:1px solid #dce5d5;display:flex;flex-direction:column;align-items:center;padding:8px 7px 12px;gap:10px}.app-rail a{display:grid;place-items:center;width:44px;height:44px;border-radius:9px;color:#708168}.app-rail a:hover{background:#e0ead7}.app-rail a.active{background:#dce9d2;color:#3c5630;border:1px solid #c7dabc;box-shadow:inset 3px 0 #65854c}.app-rail .rail-brand{font-size:25px;border-bottom:1px solid #d8e1d1;margin-bottom:10px}.app-rail .rail-account{margin-top:auto}.task-sidebar{position:fixed;inset:0 auto 0 var(--rail);width:var(--side);background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column}.sidebar-brand{height:64px;display:flex;align-items:center;gap:14px;padding:0 24px;border-bottom:1px solid var(--line)}.sidebar-brand a{font-size:15px;font-weight:650;letter-spacing:2px}.sidebar-brand>span{font-size:9px;letter-spacing:1.5px;color:var(--muted);border:1px solid var(--line);padding:3px 6px;border-radius:4px}.sidebar-body{flex:1;min-height:0;overflow:auto;padding:24px 12px}.nav-caption{font-size:9px;letter-spacing:1.2px;color:var(--muted);padding:0 10px 14px}.filter-button{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;text-align:left;margin-bottom:5px;font-size:12px;color:#6f7d65;padding:12px}.filter-button svg{width:18px;height:18px;flex:none}.filter-button>span{flex:1}.filter-button small{font-size:10px;background:#f2f5ee;min-width:22px;text-align:center;border-radius:4px;padding:2px}.filter-button.selected{color:#3d5b2d;background:#eaf2e2;font-weight:550;box-shadow:inset 3px 0 #6f8b58}.sidebar-project{margin:22px 10px 0;border-top:1px solid var(--line);padding-top:8px}.sidebar-project label{color:var(--muted);font-size:11px}.sidebar-project select{font-size:11px}.back-chat{padding:18px 24px;border-top:1px solid var(--line);font-size:11px;color:#7a8b6e}main{margin-left:calc(var(--rail) + var(--side));min-height:100vh}.topbar{min-height:86px;display:flex;align-items:center;gap:22px;border-bottom:1px solid var(--line);background:#fff;padding:18px 30px}.page-eyebrow{display:block;font-size:9px;letter-spacing:1.5px;color:var(--muted);margin-bottom:5px}.topbar h1{font-size:23px;font-weight:550;letter-spacing:-.5px}.owner-tabs{display:flex;gap:3px;border:1px solid var(--line);background:#f5f8f1;padding:3px;border-radius:9px;margin-left:auto}.owner-tabs button{font-size:12px;border:0;background:transparent;padding:8px 14px;min-height:34px;color:#7e8c74}.owner-tabs button.selected{background:#fff;color:var(--green);box-shadow:0 1px 4px #29372712}#task-add{font-size:12px;white-space:nowrap}.mobile-home,.mobile-filters{display:none}#task-workspace{max-width:1400px;padding:28px 30px;margin:0 auto}.overview{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:28px}.stat{background:#fff;border:1px solid var(--line);border-radius:10px;padding:18px 20px}.stat>span{display:block;font-size:11px;color:var(--muted)}.stat strong{display:block;font-size:26px;font-weight:550;line-height:1.6;margin-top:7px}.stat small{display:block;font-size:10px;color:#94a088}.stat.danger-stat strong{color:#ac5e4c}.list-toolbar{display:flex;align-items:center;gap:12px;justify-content:space-between;margin-bottom:18px}.list-toolbar h2{font-size:17px;font-weight:550}.list-toolbar p{font-size:11px;color:var(--muted);margin-top:5px}.list-tools{display:flex;gap:8px;align-items:center}.search-box{display:flex;align-items:center;gap:8px;margin:0;border:1px solid var(--line);border-radius:8px;background:#fff;padding:0 12px;color:#9ba58f}.search-box svg{width:17px;height:17px}.search-box input{width:210px;max-width:100%;border:0;background:transparent;padding:11px 0;font-size:12px;box-shadow:none}.icon-button{display:grid;place-items:center;width:40px;height:40px;padding:0;font-size:22px}.worker-note{padding:12px 16px;margin:0 0 16px;background:#edf4e7;border:1px solid #d6e5ca;border-radius:8px;font-size:12px;color:#5a734a}.task-list{display:flex;flex-direction:column;gap:9px}.task-card{display:flex;align-items:flex-start;gap:14px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:17px 18px;transition:border-color .15s}.task-card:hover{border-color:#a8bd98}.task-check{display:grid;place-items:center;width:24px;height:24px;min-height:24px;padding:0;border-radius:50%;border:1.5px solid #b8c7ac;flex:none;margin-top:3px;font-size:13px}.task-check.checked{background:#e7efdf;color:#5c7c46;border-color:#a3bc90}.task-check.high{border-color:#c78c73}.task-check.codex{border-radius:7px;color:#718a5e;background:#f5f8f1;border-color:var(--line)}.task-card-content{flex:1;min-width:0}.task-title{display:block;border:0;padding:0;min-height:0;font-size:14px;font-weight:500;line-height:1.7;background:transparent;color:#2e3e28;text-align:left;width:100%;overflow-wrap:anywhere}.task-title:hover{background:transparent;color:#597a41}.task-card.is-done .task-title{text-decoration:line-through;color:#8b9781}.task-meta{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-top:8px;font-size:10px;color:#8a9780}.tag{display:inline-flex;align-items:center;gap:4px;border-radius:5px;padding:3px 7px;background:#f4f7ef;border:1px solid #e7ecdf;line-height:1.5}.tag.overdue,.tag.failed{background:#fff2ed;color:#ac604d;border-color:#efd6cc}.tag.running,.tag.queued{color:#6c8156;background:#f0f5e8}.tag.done{color:#5c7b47;background:#eaf4e2}.task-desc{font-size:12px;color:#8c9882;line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:5px;overflow-wrap:anywhere}.card-action{display:grid;place-items:center;flex:none;width:34px;min-height:34px;padding:0;background:#f7faf3;font-size:15px}.task-priority{font-size:10px;color:#a5725c}.empty{background:#fff;border:1px dashed #d4dfc9;border-radius:12px;text-align:center;padding:55px 20px;margin-top:15px}.empty-icon{display:grid;place-items:center;width:52px;height:52px;margin:0 auto 18px;border-radius:16px;background:#eef5e7;color:#7d9b67;font-size:25px}.empty h3{font-size:17px;font-weight:500}.empty p{color:var(--muted);font-size:13px;margin:10px 0 20px}.empty .primary{font-size:12px}.page-footer{display:flex;gap:10px;justify-content:space-between;padding:22px 0 0;font-size:9px;color:#9ba68f}.error{color:#aa5040;font-size:12px;line-height:1.6;margin-top:12px}.error:empty{display:none}
dialog{position:fixed;inset:0 0 0 auto;margin:0;width:500px;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-left:1px solid var(--line);background:#fff;color:#293727;padding:0;box-shadow:-15px 0 50px #23351b15}dialog::backdrop{background:#17251166}#task-form{display:flex;flex-direction:column;height:100%}.editor-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:22px 24px;border-bottom:1px solid var(--line);flex:none}.editor-heading h2{font-size:20px;font-weight:550}.editor-body{flex:1;min-height:0;overflow:auto;padding:0 24px 24px;overscroll-behavior:contain}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check-field{display:flex;align-items:center;gap:10px;font-size:12px;line-height:1.6;padding:12px;background:#f2f7ec;border-radius:8px}.check-field input{width:18px;height:18px;flex:none;accent-color:var(--green)}.field-hint{font-size:11px;color:var(--muted);line-height:1.8}.editor-body label small{font-weight:400;font-size:10px;color:var(--muted);margin-left:6px}.editor-footer{display:flex;gap:8px;flex-wrap:wrap;padding:16px 24px max(16px,env(safe-area-inset-bottom));border-top:1px solid var(--line);flex:none;background:#fff}.editor-footer button{font-size:11px}.editor-footer .primary{margin-left:auto}.danger{color:#ac5b48;background:#fff7f3;border-color:#edd6cc}.detail-heading{display:flex;justify-content:space-between;align-items:center;margin-top:24px;padding-bottom:10px;border-bottom:1px solid var(--line)}.detail-heading h3{font-size:12px;font-weight:550}.detail-heading span{font-size:11px;color:var(--muted)}.subtask-check{display:flex;align-items:flex-start;gap:10px;line-height:1.7;font-size:12px;font-weight:400;margin:12px 0}.subtask-check input{width:17px;height:17px;flex:none;margin-top:3px;accent-color:var(--green)}.run{border:1px solid var(--line);background:#f8faf5;border-radius:8px;padding:12px;margin-top:12px}.run summary{cursor:pointer;font-size:11px;line-height:1.8;color:#6b7f5b}.run p{font-size:10px;color:#98a18e;margin:6px 0}.run pre{font:12px/1.8 'Be Vietnam Pro',system-ui,sans-serif;white-space:pre-wrap;overflow-wrap:anywhere;max-height:350px;overflow:auto;margin:10px 0 0}.run.error-run{background:#fff8f4;border-color:#ead8ce}.toast{position:fixed;bottom:max(22px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#314a27;color:#fff;padding:13px 20px;border-radius:10px;font-size:12px;z-index:200;max-width:90vw;box-shadow:0 5px 22px #23351b22}#task-login{width:430px;max-width:calc(100% - 40px);padding:30px;margin:80px auto;background:#fff;border:1px solid var(--line);border-radius:14px}.login-mark{display:grid;place-items:center;width:48px;height:48px;background:var(--wash);color:var(--green);font-size:30px;border-radius:13px;margin-bottom:22px}#task-login h2{font-size:23px;font-weight:550}#task-login p{font-size:13px;color:var(--muted);margin-top:12px}#task-login .primary{margin-top:18px;width:100%}
@media(max-width:1150px){:root{--side:210px;--rail:56px}.topbar{padding:18px 22px;gap:14px}.page-eyebrow{font-size:8px}#task-workspace{padding:24px 22px}.stat{padding:15px}.owner-tabs button{padding:8px 10px}.search-box input{width:155px}.overview{gap:9px}}
@media(max-width:750px){:root{font-size:16px}.app-rail,.task-sidebar{display:none}main{margin:0}.topbar{position:sticky;top:0;z-index:15;display:grid;grid-template-columns:36px minmax(0,1fr) auto;padding:12px 16px;gap:10px;min-height:70px}.mobile-home{display:grid;place-items:center;width:36px;height:44px;font-size:24px}.topbar .page-eyebrow{display:none}.topbar h1{font-size:22px}.topbar #task-add{font-size:12px;min-height:44px}.owner-tabs{grid-column:1/-1;margin:0;display:grid;grid-template-columns:1fr 1fr}.owner-tabs button[data-owner="all"]{display:none}.owner-tabs button{font-size:14px;min-height:42px}.mobile-filters{display:flex;gap:8px;margin-bottom:16px}.mobile-filters select{font-size:12px;min-height:44px;width:50%;padding:10px}#task-workspace{padding:18px 16px}.overview{display:flex;gap:8px;overflow:auto;margin-bottom:22px;padding-bottom:5px;scroll-snap-type:x proximity}.stat{flex:0 0 130px;scroll-snap-align:start;padding:14px}.stat>span{font-size:11px}.stat strong{font-size:24px}.stat small{font-size:9px}.list-toolbar{flex-direction:column;align-items:stretch;gap:14px}.list-toolbar h2{font-size:18px}.list-toolbar p{font-size:11px}.list-tools{width:100%}.search-box{flex:1;min-width:0}.search-box input{font-size:16px;width:100%;padding:12px 0}.icon-button{width:44px;height:44px;flex:none}.task-card{padding:16px 12px;gap:10px}.task-title{font-size:16px;line-height:1.65}.task-desc{font-size:13px}.task-meta{font-size:10px;gap:5px}.task-check{width:28px;height:28px;min-height:28px;margin-top:2px}.card-action{width:36px;min-height:44px}.task-list{gap:10px}.page-footer{flex-direction:column;font-size:10px;gap:5px}.empty{padding:36px 16px}.empty p{font-size:14px}.worker-note{font-size:12px}dialog{inset:auto 0 0;margin:0;width:100%;max-width:100%;height:92dvh;max-height:92dvh;border:0;border-radius:18px 18px 0 0}.editor-heading{padding:18px 18px 15px}.editor-heading h2{font-size:21px}.editor-body{padding:0 18px 20px}.editor-body label{font-size:13px}.editor-body input,.editor-body select,.editor-body textarea{font-size:16px;min-height:44px}.field-row{gap:10px}.check-field input{min-height:18px}.check-field{font-size:13px}.field-hint{font-size:12px}.editor-footer{padding:12px 18px max(14px,env(safe-area-inset-bottom));gap:7px}.editor-footer button{min-height:44px;font-size:12px;padding:9px 11px}.detail-heading h3{font-size:13px}.subtask-check{font-size:14px}.subtask-check input{min-height:18px}.run pre{font-size:14px}.run summary{font-size:12px}.toast{font-size:13px;width:max-content}#task-login{margin:30px auto;padding:24px}#task-login input{font-size:16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

.topbar-actions{display:flex;gap:8px;align-items:center}
.zalo-remind-fields{margin-top:18px;padding:0 12px 12px;background:#f6f9f3;border:1px solid var(--line);border-radius:9px}.zalo-remind-fields .check-field{background:transparent;padding:0}.zalo-tag{color:#326eaa;background:#f2f8ff}
@media(max-width:750px){.topbar-actions{grid-column:3;grid-row:1;gap:6px}.topbar-actions button{font-size:11px;padding:9px 10px;min-height:44px}}

.recipient-tools{display:flex;gap:8px;align-items:center}.recipient-tools select{flex:1;min-width:0}.recipient-tools button{flex:none;width:44px;height:44px;padding:0}#edit-zalo-search,#edit-zalo-recipient{margin-top:8px}#task-zalo-settings{font-size:12px;margin-top:8px}#task-zalo-offset-fields{margin-top:14px}#idle-hint{margin-top:8px}
#repeat-field[hidden]+div{grid-column:1/-1}

.tasks-model-link{font-size:12px;color:#526b3e;text-decoration:none;padding:10px;border:1px solid #d7e0ce;border-radius:8px}.task-model-label{font-size:12px;color:#6d805f;margin:0 0 12px}


#task-zalo-settings{display:inline-block;color:#1766ba}

#execution-field{border:0;padding:0;margin:16px 0 0;min-width:0}
#execution-field legend{font-weight:600;margin-bottom:8px}
.execution-options{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#edf2e9;border-radius:10px}
.execution-options label{position:relative;cursor:pointer;margin:0;text-align:center}
.execution-options input{position:absolute;opacity:0;width:1px;height:1px}
.execution-options span{display:grid;place-items:center;min-height:44px;padding:8px;border:1px solid transparent;border-radius:8px}
.execution-options input:checked+span{background:#fff;border-color:#c8d7c0;color:#324c2c}
.execution-options input:focus-visible+span{outline:2px solid #607952;outline-offset:-2px}

/* Rail bottom: preview, Models, logout */
.app-rail .rail-account{margin-top:auto;display:flex;flex-direction:column;gap:8px;align-items:center}
.app-rail .rail-account button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:9px;background:transparent;color:#708168;cursor:pointer}
.app-rail .rail-account button:hover{background:#e0ead7}

/* Zalo: results-only hides the reminder offset */
.zalo-remind-fields:has(#edit-zalo-results-only:checked) #task-zalo-offset-fields{display:none}


/* Copy button in the tag row: same size as the neighbouring tags */
.meta-copy{display:inline-flex;align-items:center;gap:4px;border-radius:5px;padding:3px 7px;background:#f4f7ef;border:1px solid #e7ecdf;color:#536e40;font:inherit;font-size:10px;line-height:1.5;cursor:pointer}
.meta-copy:hover{background:#e0ead7;color:#304b21;border-color:#cbd9c0}

/* The generic button{min-height:40px} must not stretch the copy tag: same size as Zalo / Tự chạy tags */
.task-meta button:is(.meta-copy,.task-view-result,.task-delete-done){min-height:0;height:auto;margin:0;padding:3px 7px;border-radius:5px;font-size:10px;font-weight:400;line-height:1.5;background:#f4f7ef;border:1px solid #e7ecdf;color:#536e40}
.task-meta button.meta-copy:hover{background:#e0ead7;color:#304b21;border-color:#cbd9c0}

/* ---- Kế hoạch bán hàng ---- */
.sidebar-pages{display:grid;gap:4px;margin:0 0 14px}
.sidebar-pages a{display:block;padding:9px 12px;border-radius:8px;color:#536e40;text-decoration:none;font-size:13px}
.sidebar-pages a:hover{background:#eef3e9}.sidebar-pages a.active{background:#dce9d2;color:#2f4a24;font-weight:600}
.app-rail a.active svg{stroke:currentColor}
#plan-view{display:none}
body.plan-mode #plan-view:not([hidden]){display:block;padding:18px 28px 40px}
body.plan-mode #task-workspace,body.plan-mode .owner-tabs,body.plan-mode #task-add,body.plan-mode #task-filters,body.plan-mode .sidebar-project,body.plan-mode .nav-caption{display:none!important}
.plan-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:16px}
.plan-toolbar strong{font-size:15px;min-width:150px;text-align:center}
.plan-toolbar button{min-height:36px;padding:6px 12px}
.plan-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;align-items:start}
.plan-day{background:#fff;border:1px solid var(--line);border-radius:10px;padding:10px;display:grid;gap:8px;min-width:0}
.plan-day.is-today{border-color:#6d8b57;box-shadow:0 0 0 2px #dce9d2}
.plan-day>header{display:flex;justify-content:space-between;align-items:center;gap:6px;border-bottom:1px solid #eef2ea;padding-bottom:6px}
.plan-day>header div{display:grid}.plan-day>header strong{font-size:13px;color:#2f4a24}.plan-day>header span{font-size:11px;color:#8a9780}
.plan-slot{display:grid;gap:4px}
.plan-slot-head{display:flex;justify-content:space-between;align-items:center}
.plan-slot-head b{font-size:11px;letter-spacing:.4px;color:#65845a}
.plan-plus{min-height:0;width:24px;height:24px;padding:0;border-radius:6px;font-size:14px;line-height:1;background:#f4f7ef;color:#536e40;border:1px solid #e1e8da}
.plan-plus:hover{background:#e0ead7}
.plan-empty{font-size:11px;color:#c0c8b8}
.plan-entry{display:grid;gap:2px;text-align:left;width:100%;min-height:0;padding:6px 8px;border-radius:8px;border:1px solid #e1e8da;background:#f8fbf5;color:#2d3a28;font:inherit;font-size:12px;line-height:1.35;cursor:pointer}
.plan-entry:hover{background:#eef5e8;border-color:#c9d9bd}
.plan-entry.is-backup{border-style:dashed}
.plan-th{justify-self:start;font-size:9px;font-weight:700;letter-spacing:.6px;color:#fff;background:#6d8b57;border-radius:4px;padding:1px 5px}
.plan-prod{overflow-wrap:anywhere}
.plan-tagrow{display:flex;flex-wrap:wrap;gap:4px;margin-top:2px}
.plan-badge{font-size:9px;border-radius:4px;padding:1px 5px;background:#eef2ea;color:#536e40}
.plan-badge.b-new-photo{background:#e3f0ff;color:#2a5a8c}.plan-badge.b-old-product{background:#fff0d9;color:#8a5a14}.plan-badge.b-reels{background:#fde4ef;color:#9b2f5d}
.plan-note-line{font-size:10px;color:#7e8c74;font-style:italic}
.plan-daynote{font-size:11px;color:#65735d;border-top:1px dashed #e6ecdf;padding-top:5px;overflow-wrap:anywhere}
.plan-daynote.is-holiday{color:#a5522f;font-weight:600}
.plan-backup{margin-top:22px}.plan-backup h3{font-size:13px;color:#536e40;margin:0 0 8px}
.plan-backup-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.plan-backup-item{display:grid;gap:4px}.plan-slot-tag{font-size:10px;color:#8a9780}
.plan-form{display:grid;gap:8px;min-width:min(520px,86vw)}
.plan-form h2{margin:0 0 4px;font-size:17px}.plan-form label{font-size:12px;color:#536e40}
.plan-form input[type=date],.plan-form input:not([type]),.plan-form select,.plan-form textarea{width:100%;box-sizing:border-box;padding:9px 10px;border:1px solid #cbd9c0;border-radius:8px;font:inherit;font-size:14px;background:#fff}
.plan-form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.plan-tags{display:flex;flex-wrap:wrap;gap:6px 14px;border:1px solid #e1e8da;border-radius:8px;padding:8px 10px}.plan-tags legend{font-size:11px;color:#8a9780;padding:0 4px}
.plan-tags label{display:flex;align-items:center;gap:5px;font-size:13px;color:#2d3a28}
.plan-form-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
#plan-error,#plan-day-error{color:#b3412c;min-height:1em;margin:0}
@media(max-width:1100px){.plan-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:750px){body.plan-mode #plan-view:not([hidden]){padding:14px 12px 40px}.plan-grid{grid-template-columns:1fr}.plan-form-row{grid-template-columns:1fr}.plan-entry{font-size:13px}.plan-plus{width:34px;height:34px}.sidebar-pages{display:none}}

/* Product images in plan entries */
.plan-imgs{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:3px}
.plan-imgs img{width:44px;height:56px;object-fit:cover;border-radius:5px;border:1px solid #e1e8da;background:#f4f7ef}
.share-list{display:grid;gap:8px;margin-top:6px}
.share-row{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;border:1px solid #e1e8da;border-radius:8px;padding:8px 10px}
.share-row strong{font-size:13px;color:#2f4a24}
.share-row input{width:100%;box-sizing:border-box;margin-top:4px;font-size:12px;padding:6px 8px;border:1px solid #cbd9c0;border-radius:6px;background:#f8fbf5}
.share-row button{min-height:36px;padding:6px 10px;font-size:12px}
@media(max-width:750px){.share-row{grid-template-columns:1fr}}

/* Share-link mode (?plan=<token>): only the plan, no tasks, no navigation */
html.plan-public .app-rail,html.plan-public .task-sidebar,html.plan-public .owner-tabs,html.plan-public .topbar-actions>a,html.plan-public #task-add,html.plan-public #task-login,html.plan-public #task-workspace,html.plan-public .mobile-home,html.plan-public #plan-open,html.plan-public #plan-share{display:none!important}
html.plan-public main{margin-left:0}
html.plan-public .topbar{grid-template-columns:minmax(0,1fr) auto}

/* ---- Compact data-entry dialogs: fit the screen, scroll inside only when needed ---- */
.plan-dialog{width:min(720px,96vw);max-height:calc(100dvh - 20px);padding:0;border:1px solid #cbd9c0;border-radius:12px;overflow:auto}
.plan-form.compact{min-width:0;padding:12px 16px 14px;gap:8px}
.plan-form.compact h2{font-size:15px;margin:0}
.plan-form.compact label,.plan-lab{display:block;margin-bottom:2px;font-size:11px;color:#536e40}
.plan-form.compact input[type=date],.plan-form.compact input:not([type]),.plan-form.compact select,.plan-form.compact textarea{padding:6px 8px;font-size:13px;border-radius:7px}
.plan-form.compact textarea{resize:vertical;min-height:0}
.plan-form.compact .field-hint{margin:0;font-size:11px}
.pf-row3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.pf-row2{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.plan-form.compact .plan-tags{border:0;padding:0;gap:4px 14px}
.plan-form.compact .plan-tags label{display:flex;align-items:center;gap:5px;margin:0;font-size:12px}
.plan-form.compact .plan-form-actions{margin-top:2px}
.plan-form.compact .plan-form-actions button{min-height:34px;padding:6px 14px;font-size:13px}
.plan-switch{display:flex!important;align-items:center;gap:8px;font-size:13px!important;color:#2d3a28!important}
.remind-channels{display:grid;gap:4px}.remind-channels label{display:flex;align-items:center;gap:5px;margin:0;font-size:13px}
.remind-channels small{color:#7e8c74}.remind-channels a{font-size:12px;color:#536e40}
@media(max-width:640px){.pf-row2{grid-template-columns:1fr}.pf-row3{grid-template-columns:1fr 1fr}.pf-row3>div:last-child{grid-column:1/-1}.plan-form.compact{padding:10px 12px 12px}}
@media(max-height:560px){.plan-form.compact textarea{rows:2}}
html.plan-public #plan-remind{display:none!important}

/* ---- per-entry reminder row, 4-column first row, badges ---- */
.pf-row4{display:grid;grid-template-columns:1.2fr 1.1fr .9fr 1fr;gap:8px}
.plan-form.compact input[type=time]{width:100%;box-sizing:border-box;padding:6px 8px;font-size:13px;border:1px solid #cbd9c0;border-radius:7px;background:#fff}
.plan-remind-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;border:1px solid #e1e8da;border-radius:8px;padding:6px 10px;background:#f8fbf5}
.plan-remind-row .plan-switch{margin:0}
.plan-remind-row select{width:auto!important;min-width:130px}
.remind-channels.inline{display:flex;flex-wrap:wrap;gap:4px 12px}
.plan-badge.b-time{background:#eef2ea;color:#2f4a24;font-weight:600}
.plan-badge.b-remind{background:#fff6d6;color:#7a5c00}
@media(max-width:640px){.pf-row4{grid-template-columns:1fr 1fr}.plan-remind-row select{min-width:0;flex:1}}

/* ---- reminder recipients (Zalo people / groups) ---- */
.plan-targets{border:1px solid #e1e8da;border-radius:8px;background:#f8fbf5;font-size:12px}
.plan-targets summary{cursor:pointer;padding:6px 10px;color:#536e40;list-style:none}
.plan-targets summary::-webkit-details-marker{display:none}
.plan-targets summary::after{content:'▾';float:right;color:#8a9780}
.plan-targets[open] summary::after{content:'▴'}
.plan-targets summary b{color:#2d3a28;font-weight:600;overflow-wrap:anywhere}
.plan-targets-body{padding:0 10px 8px;display:grid;gap:6px}
.plan-targets-bar{display:grid;grid-template-columns:1fr auto auto;gap:6px}
.plan-targets-bar input,.plan-targets-bar select{padding:5px 8px;font-size:12px;border:1px solid #cbd9c0;border-radius:7px;background:#fff;box-sizing:border-box;min-height:0}
.plan-targets-bar button{min-height:0;padding:4px 9px;font-size:13px}
.plan-targets-list{display:grid;gap:2px;max-height:132px;overflow:auto;border:1px solid #e6ecdf;border-radius:7px;background:#fff;padding:4px 8px}
.plan-targets-list label{display:flex;align-items:center;gap:6px;margin:0;font-size:12px;color:#2d3a28;padding:2px 0}
html.plan-public #plan-targets{display:none!important}
@media(max-height:620px){.plan-targets-list{max-height:90px}}

/* ---- Lịch bán hàng dialogs in the same layout as the Zalo settings dialog:
   title bar with × , padded body, rounded cards, bordered fields, red "danger" button ---- */
.plan-dialog{width:min(640px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:0;overflow:hidden;border:1px solid #dce4d4;border-radius:12px}
.plan-dialog[open]{display:flex;flex-direction:column}
.plan-dialog .plan-form{display:flex;flex-direction:column;min-width:0;min-height:0;gap:0;padding:0}
.pd-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 18px;border-bottom:1px solid #dce4d4}
.pd-head h2{margin:0;font-size:15px}
.pd-head button{min-width:40px;min-height:34px;padding:4px 8px}
.pd-body{display:grid;gap:10px;padding:12px 18px 16px;overflow:auto;overscroll-behavior:contain}
.pd-body label{font-size:12px;color:#526c3f}
.pd-body input:not([type=checkbox]),.pd-body select,.pd-body textarea{display:block;width:100%;box-sizing:border-box;margin-top:3px;padding:8px 10px;border:1px solid #cdd8c3;border-radius:8px;font:inherit;font-size:13px;background:#fff;min-height:0}
.pd-body textarea{resize:vertical}
.pd-body .check-field{display:flex;align-items:center;gap:8px;margin:0;font-size:13px;color:#2d3a28}
.pd-body .check-field input{margin:0;width:auto}
.pd-body .plan-tags{display:flex;flex-wrap:wrap;gap:4px 18px;border:0;padding:0}
.pd-card{display:grid;gap:8px;padding:10px 12px;border:1px solid #dce4d4;border-radius:10px;background:#f7faf4}
.pd-card[hidden]{display:none}
.pd-card.pd-warn{background:#fff9ed;border-color:#ecdfbd}
.pd-card p{margin:0;font-size:13px;line-height:1.6;color:#65735d}
.pd-card-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px}
.pd-card-line select{width:auto;margin:0;min-width:140px}
.pd-card .plan-targets{border:0;background:transparent}
.pd-card .plan-targets summary{padding:0}
.pd-card .plan-targets-body{padding:6px 0 0}
.pd-error{margin:0;font-size:13px;color:#ae4638}.pd-error:empty{display:none}
.pd-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.pd-danger{margin-left:auto;background:#fff;color:#8d3e32;border:1px solid #dfc8c3}
.pd-danger[hidden]{display:none}
.icon-button{min-width:36px;min-height:34px;padding:4px 8px}
html.plan-public #plan-remind-row{display:none!important}
@media(max-width:640px){.plan-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}.pd-body{padding:10px 12px 14px}.pd-head{padding:10px 12px}}

/* ---- recipients picker: two columns (people | groups) ---- */
.plan-targets-bar{grid-template-columns:1fr auto}
.plan-targets-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:none;overflow:visible;border:0;background:transparent;padding:0}
.plan-targets-col{display:flex;flex-direction:column;min-width:0;border:1px solid #dce4d4;border-radius:8px;background:#fff;overflow:hidden}
.plan-targets-title{padding:5px 10px;font-size:11px;font-weight:600;letter-spacing:.2px;color:#3c5630;background:#eef5e8;border-bottom:1px solid #dce4d4}
.plan-targets-items{display:grid;align-content:start;gap:1px;max-height:150px;overflow:auto;padding:4px 10px}
.plan-targets-items label{display:flex;align-items:flex-start;gap:7px;margin:0;padding:3px 0;font-size:12px;line-height:1.35;color:#2d3a28;cursor:pointer}
.plan-targets-items label input{margin:2px 0 0;flex:none}
.plan-targets-items label span{min-width:0;overflow-wrap:anywhere}
.plan-targets-empty{margin:0;padding:4px 0;font-size:12px;color:#98a18f}
@media(max-width:640px){.plan-targets-list{grid-template-columns:1fr}.plan-targets-items{max-height:110px}}
@media(max-height:620px){.plan-targets-items{max-height:90px}}

/* ---- fix: the page-wide `input{width:100%;padding:11px 12px;border:...}` must not stretch checkboxes ---- */
.plan-dialog input[type=checkbox]{width:16px;height:16px;min-height:0;padding:0;margin:0;border:0;border-radius:3px;box-shadow:none;flex:none;accent-color:#6d8b57;cursor:pointer}
.plan-dialog .plan-targets-items label input[type=checkbox]{margin:1px 0 0}
.pd-body .plan-targets-bar input{margin:0;padding:6px 10px;font-size:12px}
.pd-body .plan-targets-bar .icon-button{min-height:0;height:100%;padding:4px 10px}
.plan-targets-items label{box-sizing:border-box;width:100%}

/* ---- Backup row: same 7 columns (and breakpoints) as the day cards, so each item lines up under its day ---- */
.plan-backup-grid{align-items:stretch}
.plan-backup-cell{display:grid;gap:6px;align-content:start;min-width:0;padding:8px 10px;border:1px dashed #cbd9c0;border-radius:10px;background:#fbfdf9}
.plan-backup-cell.is-today{border-color:#6d8b57;border-style:solid}
.plan-backup-cell.is-empty{background:transparent;border-color:#e6ecdf}
.plan-backup-day{display:flex;justify-content:space-between;align-items:baseline;gap:6px;border-bottom:1px solid #eef2ea;padding-bottom:4px}
.plan-backup-day strong{font-size:12px;color:#2f4a24}.plan-backup-day span{font-size:11px;color:#8a9780}
.plan-backup-item{display:grid;gap:3px}

/* ---- collapsible menu column ---- */
.sidebar-toggle{flex:none;display:inline-grid;place-items:center;width:34px;height:34px;min-height:0;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:#536e40;font-size:20px;line-height:1;cursor:pointer}
.sidebar-toggle:hover{background:#eef3e9}
@media(min-width:751px){html.sidebar-collapsed .task-sidebar{display:none}html.sidebar-collapsed main{margin-left:var(--rail)}}
@media(max-width:750px){.sidebar-toggle{display:none}}
html.plan-public .sidebar-toggle{display:none!important}

/* Keep the recurrence badge visible alongside the task's current status. */
#task-list .task-card {
  border-inline-start: 7px solid var(--task-status-accent, var(--line));
}
#task-list .task-card[data-status="todo"] { --task-status-accent: #87939e; }
#task-list .task-card:is([data-status="doing"], [data-status="running"], [data-status="queued"]) { --task-status-accent: #4779ae; }
#task-list .task-card[data-status="review"] { --task-status-accent: #b57412; }
#task-list .task-card[data-status="done"] { --task-status-accent: #4d8453; }
#task-list .task-card[data-status="todo"] { background: #f1f3f6; }
#task-list .task-card:is([data-status="doing"], [data-status="running"], [data-status="queued"]) { background: #e8f3ff; }
#task-list .task-card[data-status="review"] { background: #fff1d4; }
#task-list .task-card[data-status="done"] { background: #e0f3e3; }
#task-list .task-card[data-status="done"] .task-title { color: #284a30; text-decoration: none; }

#task-list .tag.todo { color: #fff; background: #4d5969; border-color: transparent; }
#task-list .tag:is(.doing, .running, .queued) { color: #fff; background: #205b96; border-color: transparent; }
#task-list .tag.review { color: #fff; background: #865000; border-color: transparent; }
#task-list .tag.done { color: #fff; background: #26633a; border-color: transparent; }
#task-list .tag.task-repeat { color: #fff; background: #693b99; border-color: transparent; }

.task-meta button.task-view-result { background: #fff; color: #245235; border-color: #8bb69a; }
.task-meta button.task-delete-done { background: #fff; color: #9b2b28; border-color: #dcb2ae; }
#task-results-dialog { width: min(800px, calc(100% - 24px)); max-height: 88dvh; padding: 0; }
#task-results-dialog .editor-heading { gap: 12px; }
#task-results-title { margin: 5px 0 0; overflow-wrap: anywhere; }
.task-results-body { overflow: auto; max-height: 68dvh; padding: 12px 16px 18px; }
#task-results-rows { display: grid; gap: 14px; }
.task-result-entry { border: 1px solid var(--line); border-radius: 8px; }
.task-result-entry header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.task-result-entry h3 { margin: 0; font-size: 14px; }
.task-result-entry time { color: var(--muted); font-size: 12px; }
.task-result-entry .task-result-text { padding: 12px; }
.task-result-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.task-result-text a { color: #174f95; text-decoration: underline; }

#task-notifications { position: relative; display: grid; place-items: center; flex: none; width: 40px; padding: 0; }
#task-notice-count { position: absolute; inset: -4px -4px auto auto; min-width: 17px; padding: 2px 4px; border-radius: 10px; background: #a3312e; color: #fff; font-size: 10px; line-height: 1.2; }
#task-notice-dialog { width: min(520px, calc(100% - 24px)); max-height: 88dvh; padding: 0; }
#task-notice-list { display: grid; gap: 8px; }
.task-notice-item { display: grid; gap: 5px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.task-notice-item.is-unread { background: #e9f3ff; border-color: #a9c5e6; border-inline-start: 4px solid #205b96; }
.task-notice-item.is-read { background: #f5f6f3; }
.task-notice-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.task-notice-heading .task-notice-title { min-width: 0; min-height: 36px; padding: 4px 0; border: 0; background: transparent; color: #244a6b; text-align: left; text-decoration: underline; }
.task-notice-actions { display: flex; flex: none; gap: 4px; }
.task-notice-actions button { min-height: 36px; padding: 5px 7px; font-size: 11px; }
.task-notice-meta { font-size: 12px; color: var(--muted); }
.task-notice-item.is-unread .task-notice-meta strong { color: #205b96; }
@media(max-width:750px) {
  .overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; overflow: visible; padding: 0; margin-bottom: 16px; }
  .overview .stat { min-width: 0; padding: 7px 5px; }
  .overview .stat > span { font-size: 10px; }
  .overview .stat strong { font-size: 19px; line-height: 1.25; margin-top: 3px; }
  .overview .stat small { font-size: 9px; line-height: 1.25; margin-top: 3px; }
  .topbar { grid-template-columns: 30px minmax(30px, 1fr) max-content; padding-inline: 10px; column-gap: 5px; }
  .topbar .mobile-home { width: 30px; }
  .topbar-actions { flex-wrap: nowrap; gap: 4px; white-space: nowrap; }
  .topbar-actions #task-notifications { width: 38px; }
  .topbar-actions :is(#plan-open, #task-add, #plan-add) { font-size: 11px; padding-inline: 7px; }
}

.plan-editor-footer { flex: none; padding: 10px 18px; border-top: 1px solid var(--line); background: #fff; }
.plan-editor-footer .pd-error:not(:empty) { margin-bottom: 6px; }
@media(max-width:750px) {
  #plan-editor { width: calc(100% - 12px); max-height: calc(100dvh - 12px); }
  #plan-editor .pd-head { padding: 6px 10px; gap: 8px; }
  #plan-editor .pd-body { min-height: 0; gap: 7px; padding: 8px 10px; }
  #plan-editor .pf-row4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
  #plan-editor .pf-row2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 125px), 1fr)); gap: 6px; }
  #plan-editor :is(.pf-row2, .pf-row4) > div { min-width: 0; }
  #plan-editor .pd-body :is(input:not([type=checkbox]), select, textarea) { padding: 5px 6px; font-size: 16px; }
  #plan-editor .pd-body textarea { height: 3.65em; }
  #plan-editor .pd-body .plan-tags { gap: 4px 10px; }
  #plan-editor .pd-body .check-field { gap: 4px; font-size: 12px; }
  #plan-editor .pd-card { padding: 6px 8px; gap: 5px; }
  #plan-editor .pd-card-line { gap: 4px 8px; }
  #plan-editor .pd-card-line select { min-width: 0; }
  #plan-editor .plan-editor-footer { padding: 6px 10px max(6px, env(safe-area-inset-bottom)); }
  #plan-editor .pd-actions { gap: 5px; }
  #plan-editor .pd-actions button { min-height: 40px; padding: 5px 8px; font-size: 12px; }
}

#task-notice-error { color:#922d2a; margin:8px 16px 0; }
#task-notice-error:empty { display:none; }
@media(max-width:750px) {
  #plan-editor .pd-head { flex:none; }
  #plan-editor .pd-body { grid-template-columns:minmax(0,1fr); flex:1 1 auto; }
  #plan-editor .pd-body > *, #plan-editor .pd-body :is(input,select,textarea) { min-inline-size:0; max-inline-size:100%; }
  #plan-editor .pd-body .pf-row2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #plan-editor .pf-row2 > div:only-child, #plan-editor .pf-row2:has(> [hidden]) > div:not([hidden]) { grid-column:1/-1; }
  #plan-editor .pd-body .plan-remind-row { display:grid; grid-template-columns:minmax(0,1fr); }
  #plan-editor .pd-card-line { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  #plan-editor .pd-card-line select { width:100%!important; }
  #plan-editor .plan-targets-bar { grid-template-columns:minmax(0,1fr) auto; }
  #plan-editor .plan-editor-footer { position:relative; }
}
@media(max-width:360px) {
  #plan-editor .pd-body .pf-row2 { grid-template-columns:minmax(0,1fr); }
}

.plan-date-actions {
  --plan-control-height:40px;
  display:grid; grid-template-columns:220px repeat(2, 104px);
  grid-auto-rows:var(--plan-control-height); align-items:stretch; gap:8px; min-width:0;
}
.plan-date-actions > * {
  box-sizing:border-box; height:100%; min-height:0; min-width:0; margin:0;
  border:1px solid var(--line); border-radius:8px;
}
.plan-week-stepper {
  display:grid; grid-template-columns:32px minmax(0,1fr) 32px;
  align-items:stretch; background:#f4f7f0; overflow:hidden;
}
.plan-date-actions #plan-range {
  display:grid; place-items:center; min-width:0; padding:0 4px;
  color:#324831; line-height:1.15; text-align:center;
}
.plan-date-actions #plan-today { padding:0 7px; white-space:nowrap; }
.plan-date-actions :is(#plan-prev,#plan-next) {
  display:grid; place-items:center; height:100%; min-height:0; padding:0; margin:0;
  border:0; border-radius:0; background:transparent; color:#435939; font-size:19px; line-height:1;
}
.plan-date-actions :is(#plan-prev,#plan-next):hover { background:#e6eddf; }
.plan-date-picker { position:relative; display:grid; place-items:center; background:#fff; }
#plan-view-date {
  box-sizing:border-box; position:absolute; inset:0; width:100%; height:100%;
  min-width:0; min-height:0; padding:0; margin:0; border:0; opacity:0; cursor:pointer; font-size:16px;
}
#plan-view-date::-webkit-calendar-picker-indicator { position:absolute; inset:0; width:100%; height:100%; margin:0; padding:0; cursor:pointer; }
.plan-date-picker span { pointer-events:none; color:#435939; font-size:14px; white-space:nowrap; }
.plan-date-picker:focus-within { outline:2px solid #819578; outline-offset:2px; }
@media(max-width:750px) {
  .plan-toolbar {
    gap:7px; margin-bottom:12px; padding:6px;
    border:1px solid var(--line); border-radius:11px; background:#fff;
  }
  .plan-date-actions {
    width:100%; grid-template-columns:minmax(0,1fr) repeat(2, clamp(66px,18vw,80px)); gap:5px;
  }
  .plan-week-stepper { grid-template-columns:24px minmax(0,1fr) 24px; }
  .plan-date-actions #plan-range { padding:0 1px; font-size:clamp(10px,3vw,13px); }
  .plan-date-actions #plan-today { padding:0 3px; font-size:12px; }
  .plan-date-picker span { font-size:12px; }
  .plan-toolbar #plan-share {
    order:2; margin-inline-start:auto; min-height:34px; padding:5px 8px;
    border-color:transparent; background:transparent; color:#435939; font-size:12px;
  }
  .plan-toolbar #plan-status { order:1; flex:1 1 120px; margin:0; }
  .plan-toolbar #plan-status:empty { display:none; }
}
.plan-grid.plan-single-day, .plan-single-day .plan-backup-grid { grid-template-columns:minmax(0,1fr); }
@media(max-width:750px) {
  #plan-editor .pf-row4 > div { min-inline-size: 0; }
  #plan-editor .pf-row4 :is(input[type=date],input[type=time],select) { box-sizing: border-box; inline-size: 100%; max-inline-size: 100%; min-inline-size: 0; block-size: 38px; min-block-size: 38px; }
  #plan-editor .pf-row4 :is(input[type=date],input[type=time]) { -webkit-appearance: none; appearance: none; }
  #plan-editor .pf-row4 :is(input[type=date],input[type=time])::-webkit-date-and-time-value { min-inline-size: 0; margin: 0; text-align: start; }
}

.plan-sheet-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; }
.plan-sheet-controls #plan-sheet-link { margin:0; }
.plan-sheet-controls button { min-height:36px; white-space:nowrap; }

.task-notice-failed { color:#9a3029; font-weight:650; }
.task-notice-error-link { display:block; margin-top:3px; color:#9a3029; font-size:11px; }

#task-overview button.stat { width:100%; min-width:0; text-align:left; color:#293727; }
#task-overview button.stat:hover { border-color:#9cb68d; background:#f7faf5; }
#task-overview button.stat[aria-pressed="true"] { border-color:#779760; background:#ebf4e4; box-shadow:inset 0 -2px #779760; }

/* Hàng hóa (quản lý hàng mới trong kho) */
#goods-view{display:none}
body.goods-mode #goods-view:not([hidden]){display:block;padding:18px 28px 40px}
body.goods-mode #task-workspace,body.goods-mode #plan-view,body.goods-mode .owner-tabs,body.goods-mode #task-add,body.goods-mode #plan-add,body.goods-mode #task-filters,body.goods-mode .sidebar-project,body.goods-mode .nav-caption{display:none!important}
.gd-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:10px}
.gd-filters{display:contents}
.gd-meta{display:none}
.gd-toolbar input[type=search],.gd-toolbar select{padding:8px 10px;border:1px solid #cbd9c0;border-radius:8px;font:inherit;font-size:13px;background:#fff;min-width:0}
.gd-toolbar input[type=search]{flex:1 1 200px;max-width:320px}
.gd-stages{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.gd-stage{border:1px solid #cbd9c0;background:#fff;border-radius:999px;padding:6px 12px;font:inherit;font-size:12.5px;color:#41563a;cursor:pointer}
.gd-stage b{margin-left:4px}
.gd-stage[aria-pressed=true]{background:#435939;color:#fff;border-color:#435939}
.gd-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.gd-card{background:#fff;border:1px solid #dfe7d8;border-radius:12px;padding:12px 14px}
.gd-card small{display:block;color:#839078;font-size:11px;letter-spacing:.4px;text-transform:uppercase}
.gd-card b{display:block;font-size:22px;margin-top:4px;color:#2c3e25}
.gd-card span{font-size:12px;color:#6b7b61}
.gd-grid2{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:12px}
.gd-box{background:#fff;border:1px solid #dfe7d8;border-radius:12px;padding:12px 14px;margin-bottom:12px}
.gd-grid2 .gd-box{margin-bottom:0}
.gd-box h3{margin:0 0 8px;font-size:13.5px}
.gd-table{width:100%;border-collapse:collapse;font-size:13px}
.gd-table th{position:sticky;top:0;background:#f1f6ec;text-align:left;font-weight:600;font-size:11.5px;color:#536e40;padding:8px;border-bottom:1px solid #dce4d4;white-space:nowrap}
.gd-table td{padding:7px 8px;border-bottom:1px solid #eef2ea;vertical-align:middle}
.gd-table .num{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.gd-small td,.gd-small th{padding:5px 8px}
.gd-scroll{overflow:auto;background:#fff;border:1px solid #dfe7d8;border-radius:12px;margin-bottom:12px;max-height:70vh}
.gd-scroll .gd-table{min-width:980px}
.gd-thumb{width:44px;height:56px;object-fit:cover;border-radius:6px;background:#eef3e9;display:block}
.gd-noimg{width:44px;height:56px;border-radius:6px;background:#eef3e9;display:grid;place-items:center;color:#a2b096;font-size:11px}
.gd-name b{display:block;font-size:13px}.gd-name span{color:#839078;font-size:11.5px}
.gd-row-edit{cursor:pointer}
.gd-row-edit:hover{background:#f8faf5}
.gd-stage-select{padding:5px 6px;border:1px solid #cbd9c0;border-radius:8px;font:inherit;font-size:12px;background:#fff}
.gd-diff{color:#b4532f;font-size:11.5px}
.gd-alerts{margin:0;padding:0 0 0 18px;font-size:12.5px;color:#41563a;display:grid;gap:4px}
.gd-alerts .ok{color:#6b7b61;list-style:none;margin-left:-18px}
.gd-process summary{cursor:pointer;font-weight:600;font-size:13.5px}
.gd-process ol{margin:10px 0 0;padding-left:20px;display:grid;gap:7px;font-size:13px;line-height:1.5}
@media(max-width:1100px){.gd-grid2{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.gd-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.gd-grid2{grid-template-columns:1fr}}
.gd-group-row{cursor:pointer}.gd-group-row:hover{background:#f8faf5}
#goods-sheet-link{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cdd8c3;border-radius:8px;font:inherit;font-size:12.5px;margin:3px 0 6px}
@media(max-width:750px){body.goods-mode #goods-view:not([hidden]){padding:14px 12px 40px}.sidebar-pages{display:none}}

/* Hàng hóa: bố cục gọn trên điện thoại */
@media(max-width:750px){
 .gd-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:6px;margin-bottom:8px}
 .gd-toolbar input[type=search]{max-width:none;min-width:0;padding:8px 10px}
 .gd-toolbar button{padding:8px 12px;font-size:13px;white-space:nowrap}
 .gd-long{display:none}
 .gd-filters{display:grid;grid-column:1/-1;grid-template-columns:1fr 1fr;gap:6px}
 .gd-filters select{width:100%;padding:7px 8px;font-size:12.5px}
 .gd-stages{flex-wrap:nowrap;overflow-x:auto;margin:0 -12px 8px;padding:0 12px 2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
 .gd-stages::-webkit-scrollbar{display:none}
 .gd-stage{flex:none;padding:5px 10px;font-size:12px;white-space:nowrap}
 .gd-cards{gap:6px;margin-bottom:8px}
 .gd-card{padding:8px 10px;border-radius:10px}
 .gd-card small{font-size:10px}.gd-card b{font-size:17px;margin-top:2px}.gd-card span{font-size:11px}
 .gd-grid2{gap:8px;margin-bottom:8px}
 .gd-box{padding:10px 12px;margin-bottom:8px}
 .gd-box h3{font-size:13px;margin-bottom:6px}
 .gd-scroll{max-height:none;border-radius:10px}
 .gd-scroll .gd-table{min-width:0}
 #goods-table th:nth-child(3),#goods-table td:nth-child(3),#goods-table th:nth-child(4),#goods-table td:nth-child(4),#goods-table th:nth-child(6),#goods-table td:nth-child(6),#goods-table th:nth-child(7),#goods-table td:nth-child(7),#goods-table th:nth-child(8),#goods-table td:nth-child(8),#goods-table th:nth-child(10),#goods-table td:nth-child(10),#goods-table th:nth-child(11),#goods-table td:nth-child(11){display:none}
 #goods-table .gd-meta{display:block;color:#6b7b61;font-size:11px;line-height:1.35;margin-top:2px}
 #goods-table th,#goods-table td{padding:6px}
 #goods-table .gd-stage-select{max-width:108px;font-size:11.5px}
 .gd-thumb,.gd-noimg{width:38px;height:48px}
}

/* Chatbot: hộp thư hội thoại, bot, kênh */
#bot-view{display:none}
body.bot-mode #bot-view:not([hidden]){display:block;padding:14px 24px 24px}
body.bot-mode #task-workspace,body.bot-mode #plan-view,body.bot-mode #goods-view,body.bot-mode .owner-tabs,body.bot-mode #task-add,body.bot-mode #plan-add,body.bot-mode #task-filters,body.bot-mode .sidebar-project,body.bot-mode .nav-caption{display:none!important}
.cb-tabs{display:flex;gap:4px;border-bottom:1px solid #dfe7d8;margin-bottom:12px}
.cb-tabs button{border:0;background:none;padding:9px 14px;font:inherit;font-size:14px;color:#6b7b61;border-bottom:2px solid transparent;cursor:pointer;display:inline-flex;gap:6px;align-items:center}
.cb-tabs button[aria-selected=true]{color:#2c3e25;border-bottom-color:#435939;font-weight:600}
.cb-badge{background:#d2552f;color:#fff;border-radius:999px;font-size:11px;min-width:18px;height:18px;padding:0 5px;display:inline-grid;place-items:center;font-weight:600}
.cb-badge-warn{background:#c98a1b}
.cb-note{margin:0 0 10px;padding:9px 12px;border-radius:10px;font-size:13px}
.cb-note-warn{background:#fff6e0;border:1px solid #ecd9a4;color:#7a5a12}
.cb-inbox{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:0;border:1px solid #dfe7d8;border-radius:12px;background:#fff;overflow:hidden;height:calc(100dvh - 190px);min-height:420px}
.cb-list-col{display:flex;flex-direction:column;min-height:0;border-right:1px solid #e6ece0}
.cb-list-head{display:flex;gap:6px;padding:8px;border-bottom:1px solid #eef2ea}
.cb-list-head select,.cb-list-head input{padding:7px 9px;border:1px solid #cbd9c0;border-radius:8px;font:inherit;font-size:13px;background:#fff;min-width:0}
.cb-list-head input{flex:1}
.cb-list{overflow:auto;flex:1}
.cb-row{display:block;width:100%;text-align:left;border:0;border-bottom:1px solid #f0f3ec;border-left:4px solid transparent;background:#fff;padding:9px 11px;font:inherit;cursor:pointer}
.cb-row:hover{background:#f8faf5}.cb-row.is-open{background:#eef4e8}
.cb-row.st-need{border-left-color:#e0a21b}.cb-row.st-ai{border-left-color:#7a56c8}.cb-row.st-draft{border-left-color:#9bb28a}.cb-row.st-log{border-left-color:#c7cdc2}
.cb-row-top{display:flex;justify-content:space-between;gap:8px;font-size:13.5px}.cb-row-top span{color:#839078;font-size:11.5px;white-space:nowrap}
.cb-row-text{color:#5d6b54;font-size:12.5px;margin:2px 0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cb-row-meta{display:flex;gap:8px;align-items:center;font-size:11px;color:#839078}
.cb-pill{border-radius:999px;padding:1px 8px;font-size:11px;background:#eef1ec;color:#5d6b54}
.cb-pill.st-need{background:#fdf0cf;color:#8a5f0b}.cb-pill.st-ai{background:#ece5fa;color:#5a3ea6}.cb-pill.st-draft{background:#e5efdd;color:#44603a}.cb-pill.st-log{background:#eef1ec;color:#6b7b61}
.cb-unread{margin-left:auto;background:#d2552f;color:#fff;font-style:normal;border-radius:999px;min-width:17px;height:17px;display:inline-grid;place-items:center;font-size:10.5px;padding:0 4px}
.cb-empty-list,.cb-empty{color:#839078;font-size:13px;padding:22px 16px;text-align:center;line-height:1.6}
.cb-empty span{font-size:12px}
.cb-chat-col{display:flex;flex-direction:column;min-width:0;min-height:0}
.cb-empty{margin:auto}
.cb-pane{display:flex;flex-direction:column;min-height:0;flex:1}
.cb-pane[hidden]{display:none}
.cb-chat-head{display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid #eef2ea}
.cb-chat-title{flex:1;min-width:0}.cb-chat-title b{display:block;font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cb-chat-title span{font-size:11.5px;color:#839078;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cb-chat-head select{padding:6px 8px;border:1px solid #cbd9c0;border-radius:8px;font:inherit;font-size:12.5px;background:#fff;max-width:170px}
.cb-back{display:none}
.cb-banner{margin:0;padding:7px 12px;font-size:12.5px;background:#fff6e0;color:#7a5a12;border-bottom:1px solid #f0e2b8}.cb-banner-bad{background:#fdeceb;color:#9b2c1f;border-color:#f1cdc9}
.cb-msgs{flex:1;overflow:auto;padding:12px;display:flex;flex-direction:column;gap:9px;background:#f8faf6}
.cb-msg{display:flex;flex-direction:column;max-width:82%}.cb-msg.in{align-self:flex-start}.cb-msg.out{align-self:flex-end;align-items:flex-end}
.cb-bubble{padding:8px 11px;border-radius:14px;font-size:14px;line-height:1.45;white-space:pre-wrap;word-break:break-word;background:#fff;border:1px solid #e3eadc}
.cb-msg.by-ai .cb-bubble{background:#efe9fb;border-color:#ddd0f4}.cb-msg.by-owner .cb-bubble{background:#e3f0da;border-color:#cfe3c3}
.cb-msg small{font-size:10.5px;color:#9aa690;margin-top:2px}
.cb-draft{padding:9px 12px;border-top:1px solid #ddd0f4;background:#f4effd}
.cb-draft label{display:block;font-size:12px;color:#5a3ea6;margin-bottom:4px;font-weight:600}
.cb-draft textarea,.cb-form textarea{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid #cbd9c0;border-radius:10px;font:inherit;font-size:14px;resize:vertical;background:#fff}
.cb-draft-actions{display:flex;gap:6px;margin-top:6px}
.cb-form{display:flex;gap:8px;align-items:flex-end;padding:9px 12px;border-top:1px solid #eef2ea}.cb-form textarea{flex:1;resize:none}
.cb-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:12px;flex-wrap:wrap}
.cb-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:10px}
.cb-card{background:#fff;border:1px solid #dfe7d8;border-radius:12px;padding:12px 14px;display:grid;gap:5px;align-content:start}
.cb-card header{display:flex;justify-content:space-between;gap:8px;align-items:center}.cb-card p{margin:0;font-size:13px}.cb-card .mut{color:#839078;font-size:12px}
.cb-err{color:#9b2c1f;font-size:12px!important}
.cb-card-actions{display:flex;gap:6px;margin-top:4px}
.cb-accs{border:1px solid #dfe7d8;border-radius:10px;padding:8px 12px;margin:0}.cb-accs legend{font-size:12px;color:#536e40;padding:0 6px}
#cb-acc-guide{font-size:12.5px;line-height:1.55}#cb-acc-guide code{background:#eef3e9;padding:1px 4px;border-radius:4px;font-size:11.5px}
@media(max-width:900px){
 body.bot-mode #bot-view:not([hidden]){padding:10px 10px 16px}
 .cb-inbox{grid-template-columns:1fr;height:calc(100dvh - 170px)}
 .cb-inbox .cb-chat-col{display:none}
 .cb-inbox.cb-open .cb-list-col{display:none}.cb-inbox.cb-open .cb-chat-col{display:flex}
 .cb-back{display:inline-block}
 .cb-chat-head select{max-width:120px}
 .cb-msg{max-width:92%}
}

.cb-group{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:7px 12px;border-bottom:1px solid #eef2ea;background:#f6f9f2;font-size:12.5px}
.cb-group label{display:flex;gap:6px;align-items:center;color:#536e40}.cb-group select{padding:5px 8px;border:1px solid #cbd9c0;border-radius:8px;font:inherit;font-size:12.5px;background:#fff}
.cb-form[hidden],.cb-group[hidden]{display:none}
.cb-form .secondary{align-self:stretch}

.cb-img{display:block;max-width:240px;max-height:280px;width:auto;height:auto;border-radius:10px;margin-bottom:4px;background:#eef3e9}
.cb-media{display:inline-block;margin-top:4px;font-size:12.5px;color:#435939;text-decoration:underline;word-break:break-all}
.cb-bubble a{color:inherit}
.cb-img.cb-sticker{max-width:130px;max-height:130px;background:transparent;border-radius:0}
.plan-img-row{margin-top:10px;padding-top:8px;border-top:1px dashed #cbd9c0}.plan-img-row label{display:block;font-size:12px;color:#536e40;margin-bottom:3px}

.sys-notice{background:#fdeceb;border-bottom:1px solid #f1cdc9;color:#8a2b1f;padding:8px 16px;font-size:13px;line-height:1.45}
.sys-notice[hidden]{display:none}
.sys-notice-row+.sys-notice-row{margin-top:4px}
.sys-notice a{color:#8a2b1f;font-weight:600;text-decoration:underline;white-space:nowrap}
