:root{--sidebar:#222d32;--sidebar2:#1a2226;--blue:#3c8dbc;--blue2:#367fa9;--bg:#ecf0f5;--line:#dfe5e8;--text:#333;--muted:#7c8b93;--cyan:#00c0ef;--green:#00a65a;--orange:#f39c12;--red:#dd4b39;--shadow:0 1px 2px rgba(0,0,0,.08)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Arial,"Helvetica Neue",sans-serif;color:var(--text);background:var(--bg)}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.admin-shell{min-height:100vh}.admin-sidebar{position:fixed;inset:0 auto 0 0;width:248px;background:var(--sidebar);color:#b8c7ce;z-index:30;display:flex;flex-direction:column;box-shadow:2px 0 10px rgba(0,0,0,.08)}.sidebar-brand{height:58px;background:var(--blue2);color:#fff;display:flex;align-items:center;padding:0 15px;gap:10px}.brand-mark{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;color:var(--blue2);font-size:20px;font-weight:900;box-shadow:inset 0 0 0 3px rgba(60,141,188,.18)}.brand-copy{line-height:1}.brand-copy strong{font-size:18px;letter-spacing:.5px;display:block}.brand-copy small{font-size:9px;letter-spacing:1.5px;opacity:.85}.sidebar-close{display:none;margin-left:auto;background:transparent;color:white;border:0;font-size:29px}.admin-profile{display:flex;align-items:center;gap:11px;padding:16px 15px;border-bottom:1px solid rgba(255,255,255,.04)}.profile-avatar{width:42px;height:42px;border-radius:50%;background:#f5b041;color:#fff;display:grid;place-items:center;font-weight:800;font-size:17px;border:2px solid rgba(255,255,255,.35)}.admin-profile strong{display:block;color:#fff;font-size:13px;margin-bottom:5px}.admin-profile span{font-size:11px}.admin-profile i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#3cbe67;margin-right:4px}.sidebar-search{margin:0 10px 10px;display:flex;align-items:center;background:#374850;border-radius:3px;overflow:hidden}.sidebar-search span{padding:0 8px;color:#85949b}.sidebar-search input{width:100%;border:0;background:transparent;color:#fff;outline:0;padding:9px 8px 9px 0;font-size:12px}.sidebar-search input::placeholder{color:#9daab0}.admin-menu{overflow:auto;padding-bottom:20px;flex:1}.menu-label{font-size:10px;color:#627178;background:var(--sidebar2);padding:10px 15px;letter-spacing:.7px}.menu-item{min-height:43px;padding:0 14px;display:flex;align-items:center;gap:11px;border-left:3px solid transparent;color:#b8c7ce;font-size:13px;transition:.15s}.menu-item:hover,.menu-item.active{background:#1e282c;color:#fff;border-left-color:var(--blue)}.menu-item .mi{width:19px;text-align:center;font-size:16px;color:#aab7bd}.menu-item span:nth-child(2){flex:1}.menu-item em,.menu-item small{font-style:normal;font-size:9px;padding:2px 5px;border-radius:3px;background:#00a65a;color:#fff}.menu-item.disabled{opacity:.62;cursor:default}.menu-item.disabled small{background:#6c7a80}.menu-group{border:0}.menu-group summary{cursor:pointer;list-style:none}.menu-group summary::-webkit-details-marker{display:none}.menu-group .arrow{flex:0 0 auto;font-size:20px;transition:.15s}.menu-group[open] .arrow{transform:rotate(90deg)}.submenu{background:#2c3b41;padding:5px 0}.submenu a{display:block;padding:9px 18px 9px 50px;font-size:12px;color:#8aa4af;position:relative}.submenu a:before{content:"○";position:absolute;left:31px}.submenu a:hover,.submenu a.active{color:#fff}.logout-link:hover{border-left-color:#dd4b39}.sidebar-foot{padding:11px 15px;background:var(--sidebar2);font-size:10px;color:#6d7d84;line-height:1.45}.sidebar-foot b{color:#8fa1a8}.admin-workspace{margin-left:248px;min-height:100vh;display:flex;flex-direction:column}.admin-topbar{height:58px;background:var(--blue);display:flex;align-items:center;justify-content:space-between;padding:0 18px;color:#fff;position:sticky;top:0;z-index:20;box-shadow:0 1px 4px rgba(0,0,0,.12)}.topbar-left{display:flex;align-items:center;gap:14px}.menu-toggle{border:0;background:transparent;color:#fff;font-size:21px;cursor:pointer;padding:8px}.topbar-title strong{display:block;font-size:15px}.topbar-title small{font-size:10px;opacity:.75}.topbar-actions{height:100%;display:flex;align-items:center}.top-icon{min-width:43px;height:58px;display:grid;place-items:center;position:relative;border-left:1px solid rgba(255,255,255,.08);font-size:18px}.notify-dot{position:absolute;width:7px;height:7px;background:#f39c12;border-radius:50%;top:13px;right:10px}.top-user{height:58px;display:flex;align-items:center;gap:8px;padding:0 12px;border-left:1px solid rgba(255,255,255,.08);font-size:12px}.mini-avatar{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#f5b041;font-weight:bold}.admin-main{padding:18px;flex:1}.page-heading{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}.page-heading h1{font-size:22px;font-weight:500;margin:0 0 4px}.page-heading p{margin:0;color:#7a8890;font-size:12px}.breadcrumb{display:flex;align-items:center;gap:7px;font-size:11px;color:#84939a}.breadcrumb a{color:var(--blue)}.dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:16px}.small-box{min-height:112px;color:#fff;position:relative;overflow:hidden;border-radius:2px;box-shadow:var(--shadow)}.small-box.cyan{background:var(--cyan)}.small-box.green{background:var(--green)}.small-box.orange{background:var(--orange)}.small-box.red{background:var(--red)}.small-box .inner{padding:13px 14px 30px}.small-box h3{font-size:32px;margin:0 0 5px;font-weight:700}.small-box p{font-size:13px;margin:0}.small-box .box-icon{position:absolute;right:12px;top:9px;font-size:57px;color:rgba(0,0,0,.13);font-weight:bold}.small-box .more{position:absolute;left:0;right:0;bottom:0;height:27px;background:rgba(0,0,0,.08);display:grid;place-items:center;font-size:10px}.content-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:16px;margin-bottom:16px}.card{background:#fff;border-top:3px solid #d2d6de;border-radius:2px;box-shadow:var(--shadow);margin-bottom:16px;padding:0}.card.blue{border-top-color:var(--blue)}.card.green{border-top-color:var(--green)}.card.orange{border-top-color:var(--orange)}.card.red{border-top-color:var(--red)}.card-head{min-height:43px;padding:11px 13px;border-bottom:1px solid #f0f0f0;display:flex;align-items:center;justify-content:space-between}.card-head h2,.card-head h3{font-size:14px;font-weight:500;margin:0}.card-body{padding:14px}.card>h2,.card>h3{font-size:16px;margin:0;padding:14px;border-bottom:1px solid #eee}.card>p{padding:0 14px 14px}.card>.field:first-child,.card>form:first-child{margin-top:14px}.chart-placeholder{height:250px;display:flex;align-items:flex-end;gap:12px;padding:20px 14px 35px;border-bottom:1px solid #eee;position:relative;background:linear-gradient(#fff,#fbfdfe)}.chart-placeholder:before{content:"";position:absolute;inset:20px 14px 35px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 47px,#edf1f3 48px);pointer-events:none}.bar-col{flex:1;display:flex;gap:4px;align-items:flex-end;height:100%;position:relative;z-index:1}.bar-col span{flex:1;min-width:5px;border-radius:2px 2px 0 0}.bar-col .b1{background:#00a65a}.bar-col .b2{background:#f39c12}.bar-col .b3{background:#3c8dbc}.chart-labels{display:flex;justify-content:space-around;font-size:10px;color:#8a979d;margin-top:-27px;padding-bottom:12px;position:relative;z-index:2}.legend{display:flex;gap:14px;flex-wrap:wrap;font-size:10px;color:#708087}.legend i{width:8px;height:8px;display:inline-block;border-radius:50%;margin-right:4px}.legend .l1{background:#00a65a}.legend .l2{background:#f39c12}.legend .l3{background:#3c8dbc}.health-list{display:grid;gap:13px}.health-row{display:grid;grid-template-columns:100px 1fr 42px;gap:8px;align-items:center;font-size:11px}.progress{height:7px;background:#e9eef0;border-radius:20px;overflow:hidden}.progress span{display:block;height:100%;background:var(--blue)}.progress.green span{background:var(--green)}.progress.orange span{background:var(--orange)}.progress.red span{background:var(--red)}.donuts{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;border-top:1px solid #eee;padding:18px 10px}.donut-wrap{text-align:center;font-size:10px;color:#708087}.donut{--p:65;--c:#00a65a;width:56px;height:56px;border-radius:50%;margin:0 auto 7px;background:conic-gradient(var(--c) calc(var(--p)*1%),#edf1f3 0);position:relative;display:grid;place-items:center}.donut:after{content:"";position:absolute;inset:7px;background:#fff;border-radius:50%}.donut b{position:relative;z-index:1;font-size:10px;color:#333}.quick-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.quick-action{border:1px solid #e6ebed;background:#fafcfd;border-radius:3px;padding:12px;display:flex;align-items:center;gap:10px;font-size:12px}.quick-action:hover{background:#f2f8fb;border-color:#cfe0e9}.quick-action b{width:30px;height:30px;border-radius:3px;background:#e7f3f9;color:var(--blue);display:grid;place-items:center;font-size:17px}.workflow{display:grid;grid-template-columns:repeat(5,1fr);gap:10px}.workflow-step{padding:13px;border:1px solid #e7ecee;background:#fafcfc;border-radius:3px;font-size:11px;min-height:78px}.workflow-step b{display:block;color:var(--blue);font-size:20px;margin-bottom:5px}.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.kpi{padding:18px}.kpi b{font-size:28px;display:block}.kpi span{color:#718078}.row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.field{margin-bottom:14px}.field label{display:block;font-size:12px;font-weight:700;margin-bottom:6px}.field input,.field select,.field textarea{width:100%;padding:10px 11px;border:1px solid #d2d6de;border-radius:2px;background:#fff;outline:0}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--blue)}.field textarea{min-height:120px;resize:vertical}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;background:var(--blue);color:#fff;padding:9px 13px;border-radius:2px;font-weight:700;font-size:12px;cursor:pointer}.btn:hover{background:var(--blue2)}.btn.gray{background:#e8edf0;color:#41535c}.notice{padding:11px 12px;border-radius:2px;background:#eaf5eb;margin-bottom:14px}.bad{background:#fdeeee;color:#8c2525}.hint{font-size:12px;color:#7e8d94}table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:10px 11px;border-bottom:1px solid #f0f0f0;font-size:12px}th{font-size:10px;color:#66777f;text-transform:uppercase;background:#fafafa}tr:hover td{background:#fbfdfe}.table-wrap{overflow:auto}.admin-footer{min-height:45px;background:#fff;border-top:1px solid #d2d6de;padding:0 18px;display:flex;align-items:center;justify-content:space-between;font-size:11px;color:#7e8c92}.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#2b6e91,#3c8dbc 55%,#215774)}.login .box{width:min(420px,92vw);background:#fff;border-radius:3px;padding:30px;box-shadow:0 18px 60px rgba(0,0,0,.22)}.login h1{font-size:28px;margin:6px 0}.sidebar-backdrop{display:none}
@media(max-width:1100px){.dashboard-grid{grid-template-columns:1fr 1fr}.content-grid{grid-template-columns:1fr}.grid{grid-template-columns:1fr 1fr}.workflow{grid-template-columns:1fr 1fr}.workflow-step:last-child{grid-column:1/-1}}
@media(max-width:760px){.admin-workspace{margin-left:0}.admin-sidebar{transform:translateX(-102%);transition:.2s}.sidebar-open .admin-sidebar{transform:translateX(0)}.sidebar-open .sidebar-backdrop{display:block;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:25}.sidebar-close{display:block}.admin-main{padding:12px}.page-heading{display:block}.breadcrumb{margin-top:8px}.topbar-title small,.top-user>span:nth-child(2),.top-user>b{display:none}.dashboard-grid{gap:10px}.small-box h3{font-size:26px}.content-grid{gap:10px}.row,.grid{grid-template-columns:1fr}.workflow{grid-template-columns:1fr}.workflow-step:last-child{grid-column:auto}.quick-actions{grid-template-columns:1fr}.admin-footer{display:block;padding:12px 14px;line-height:1.6}.admin-footer span{display:block}.donuts{gap:6px}.chart-placeholder{height:210px}.page-heading h1{font-size:19px}}
@media(max-width:480px){.dashboard-grid{grid-template-columns:1fr}.small-box{min-height:98px}.small-box .inner{padding-top:10px}.top-icon{min-width:36px}.admin-topbar{padding:0 8px}.health-row{grid-template-columns:84px 1fr 36px}}

/* V4 - Danh mục sản phẩm chuyên nghiệp */
.category-toolbar{display:flex;justify-content:space-between;gap:14px;align-items:stretch;margin-bottom:16px}.category-stats{display:grid;grid-template-columns:repeat(4,minmax(145px,1fr));gap:12px;flex:1}.cat-stat{background:#fff;border:1px solid #e6ecef;min-height:78px;padding:12px 14px;display:flex;align-items:center;gap:11px;box-shadow:var(--shadow);border-radius:4px}.cat-stat-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:700}.cat-stat-icon.blue{background:var(--blue)}.cat-stat-icon.green{background:var(--green)}.cat-stat-icon.orange{background:var(--orange)}.cat-stat-icon.red{background:var(--red)}.cat-stat b{display:block;font-size:22px;line-height:1.05}.cat-stat small{color:#829097;font-size:11px}.category-add-mobile{display:none;white-space:nowrap}.category-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(310px,.65fr);gap:16px;align-items:start}.category-list-card,.category-form-card{min-width:0}.category-head{gap:12px}.category-head p,.category-form-card .card-head p{margin:4px 0 0;color:#89969c;font-size:11px}.category-filter{display:flex;align-items:center;border:1px solid #d9e0e4;background:#fff;border-radius:3px;min-width:225px}.category-filter span{padding-left:10px;color:#83939a}.category-filter input{border:0;outline:0;width:100%;padding:9px 10px;font-size:12px}.category-table-wrap{overflow:auto}.category-table th{white-space:nowrap}.category-table td{vertical-align:middle}.category-name-cell{display:flex;align-items:center;gap:10px;min-width:210px}.category-thumb{width:38px;height:38px;border-radius:7px;background:#edf5f9;color:var(--blue2);display:grid;place-items:center;font-weight:800;flex:0 0 auto}.category-name-cell strong{display:block;font-size:12px;color:#27363d}.category-name-cell small{display:block;margin-top:3px;color:#91a0a6;font-size:10px}.category-name-cell em{display:block;font-style:normal;color:#77909b;font-size:10px;margin-top:2px}.level-badge{display:inline-flex;padding:4px 7px;border-radius:20px;font-size:10px;font-weight:700}.level-badge.root{background:#e8f4fb;color:#2679a6}.level-badge.sub{background:#fff3dc;color:#a66400}.product-count{display:inline-grid;place-items:center;min-width:27px;height:27px;padding:0 7px;border-radius:14px;background:#f1f4f5;color:#53666f}.status-pill{border:0;border-radius:18px;padding:6px 9px;display:inline-flex;align-items:center;gap:6px;cursor:pointer;font-size:10px;font-weight:700}.status-pill i{width:7px;height:7px;border-radius:50%}.status-pill.on{background:#e8f7ef;color:#16854b}.status-pill.on i{background:#20ad61}.status-pill.off{background:#f1f3f4;color:#78868c}.status-pill.off i{background:#9ba6aa}.inline-form{margin:0}.text-right{text-align:right!important}.row-actions{display:flex;justify-content:flex-end;gap:5px}.row-actions form{margin:0}.icon-btn{width:31px;height:31px;border:1px solid #dfe6e9;border-radius:3px;background:#fff;display:inline-grid;place-items:center;font-size:14px;cursor:pointer}.icon-btn.edit{color:#2d7eaa}.icon-btn.view{color:#4f8d65}.icon-btn.delete{color:#c64d40}.icon-btn:hover{background:#f6fafc}.category-empty{display:none;padding:28px;text-align:center;color:#87959b}.category-form-card{position:sticky;top:74px}.category-form .field label b{color:#d94b3c}.category-form .field label span{font-weight:400;color:#8d9ba1}.field-help{display:block;color:#8c9aa0;font-size:10px;margin-top:5px}.slug-input{display:flex;border:1px solid #d2d6de;border-radius:2px;overflow:hidden;background:#fff}.slug-input span{display:grid;place-items:center;padding:0 10px;background:#f4f6f7;color:#829199}.slug-input input{border:0!important}.form-row-2{display:grid;grid-template-columns:1fr 1fr;gap:10px}.switch-field{min-height:38px;display:flex!important;align-items:center;gap:8px;font-weight:400!important;margin:0}.switch-field input{position:absolute;opacity:0;pointer-events:none}.switch-field span{width:38px;height:21px;background:#c7d0d4;border-radius:20px;position:relative;transition:.18s}.switch-field span:after{content:"";position:absolute;width:17px;height:17px;background:#fff;border-radius:50%;left:2px;top:2px;box-shadow:0 1px 3px rgba(0,0,0,.18);transition:.18s}.switch-field input:checked+span{background:var(--green)}.switch-field input:checked+span:after{left:19px}.switch-field b{font-size:11px}.category-form-actions{display:flex;gap:8px;flex-wrap:wrap}.category-tip{margin-top:18px;border-top:1px solid #edf0f2;padding-top:14px;display:grid;gap:4px;font-size:11px}.category-tip>b{color:#3f525a;margin-bottom:3px}.category-tip>span{font-weight:700;color:var(--blue2)}.category-tip>small{color:#83939a;padding-left:7px}.category-table code,.notice code{background:#f2f4f5;padding:2px 4px;border-radius:3px}
@media(max-width:1250px){.category-stats{grid-template-columns:repeat(2,1fr)}.category-layout{grid-template-columns:minmax(0,1.3fr) minmax(300px,.7fr)}}
@media(max-width:900px){.category-layout{grid-template-columns:1fr}.category-form-card{position:static}.category-add-mobile{display:inline-flex}.category-toolbar{align-items:flex-end}.category-stats{grid-template-columns:repeat(4,1fr)}.cat-stat{padding:10px;min-height:70px}.cat-stat-icon{width:35px;height:35px}.cat-stat b{font-size:18px}.cat-stat small{font-size:9px}}
@media(max-width:760px){.category-toolbar{display:block}.category-stats{grid-template-columns:1fr 1fr;margin-bottom:10px}.category-add-mobile{width:100%}.category-head{display:block}.category-filter{min-width:0;width:100%;margin-top:10px}.category-table-wrap{overflow:visible}.category-table,.category-table tbody,.category-table tr,.category-table td{display:block;width:100%}.category-table thead{display:none}.category-table tbody{padding:10px}.category-table tr{border:1px solid #e4eaed;border-radius:7px;margin-bottom:10px;padding:11px;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.03)}.category-table td{border:0;padding:6px 0;display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:right}.category-table td:before{content:attr(data-label);font-size:10px;text-transform:uppercase;color:#8a989e;font-weight:700;text-align:left}.category-table td:first-child{display:block;text-align:left;padding-top:0;padding-bottom:10px;border-bottom:1px solid #edf0f1}.category-table td:first-child:before{display:none}.category-name-cell{min-width:0}.row-actions{justify-content:flex-end}.category-table .text-right{text-align:right!important}.form-row-2{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.cat-stat{min-height:64px}.cat-stat-icon{width:32px;height:32px}.cat-stat b{font-size:16px}.form-row-2{grid-template-columns:1fr}.category-table tbody{padding:8px}.category-form-actions .btn{flex:1}}

/* V5 Category SEO */
.seo-editor-block{margin-top:18px;padding-top:18px;border-top:1px solid #e9eef3}.seo-editor-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:16px}.seo-editor-title b{display:block;font-size:15px;color:#172033}.seo-editor-title small{display:block;color:#7a8494;margin-top:4px;line-height:1.45}.category-form textarea{width:100%;resize:vertical;min-height:88px;border:1px solid #dfe6ed;border-radius:9px;padding:11px 12px;font:inherit;color:#1d2736;background:#fff;outline:none;box-sizing:border-box}.category-form textarea:focus{border-color:#4d8df7;box-shadow:0 0 0 3px rgba(77,141,247,.10)}.seo-show{margin:4px 0 17px}.google-preview{border:1px solid #e2e8f0;border-radius:12px;padding:15px;background:#fff}.google-preview>small{display:block;font-size:10px;font-weight:800;color:#8993a3;letter-spacing:.08em;margin-bottom:10px}.gp-url{font-size:12px;color:#45604d;margin-bottom:5px;word-break:break-all}.gp-title{font-size:18px;color:#1a0dab;line-height:1.25;margin-bottom:5px;word-break:break-word}.google-preview p{font-size:13px;line-height:1.5;color:#4d5156;margin:0}.field label span{float:right;font-size:11px;font-weight:600;color:#8a94a5}.field-help{display:block;margin-top:6px;color:#8a94a5;font-size:11px;line-height:1.45}
@media(max-width:700px){.seo-editor-block{margin-top:14px;padding-top:14px}.seo-editor-title{align-items:center}.google-preview{padding:13px}.gp-title{font-size:16px}.category-form textarea{font-size:16px;min-height:105px}}

/* V6 - Danh mục sản phẩm compact + pagination */
.compact-toolbar{margin-bottom:12px}.compact-stats .cat-stat{min-height:64px;padding:9px 12px}.compact-stats .cat-stat-icon{width:34px;height:34px}.compact-stats .cat-stat b{font-size:18px}.category-layout-compact{grid-template-columns:minmax(0,1fr);position:relative}.compact-head{display:flex;align-items:center;padding:12px 14px!important}.compact-head h2{font-size:15px}.compact-head p{margin-top:2px}.category-filter-form{margin-left:auto;max-width:300px;min-width:220px}.category-filter-form input{min-width:0}.filter-clear{width:30px;height:30px;display:grid;place-items:center;color:#87949a;text-decoration:none;font-size:18px}.compact-add{min-height:36px;padding:0 13px;margin-left:8px}.compact-category-table th,.compact-category-table td{padding-top:8px!important;padding-bottom:8px!important}.compact-name .category-thumb{width:32px;height:32px;border-radius:6px}.compact-name strong{font-size:11.5px}.compact-name small,.compact-name em{font-size:9.5px}.compact-category-table .status-pill{padding:5px 8px}.compact-category-table .icon-btn{width:29px;height:29px}.category-no-result{text-align:center!important;color:#87949a;padding:30px!important}.category-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border-top:1px solid #edf0f2;background:#fbfcfd}.pagination-info{font-size:11px;color:#7d8b91}.category-pagination nav{display:flex;align-items:center;gap:4px;flex-wrap:wrap}.category-pagination nav a,.category-pagination nav span{min-width:31px;height:31px;padding:0 8px;border:1px solid #dfe6e9;border-radius:5px;display:grid;place-items:center;text-decoration:none;font-size:11px;color:#53666f;background:#fff}.category-pagination nav .current{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:700}.category-pagination nav .disabled{opacity:.4}.category-pagination nav .dots{border:0;background:transparent;min-width:20px}.compact-form-card{position:fixed;z-index:1002;right:18px;top:72px;width:min(410px,calc(100vw - 36px));max-height:calc(100vh - 90px);overflow:auto;transform:translateX(calc(100% + 30px));opacity:0;pointer-events:none;transition:.22s ease;box-shadow:0 18px 50px rgba(20,35,45,.18)}.compact-form-card.is-open{transform:none;opacity:1;pointer-events:auto}.category-panel-backdrop{position:fixed;inset:0;background:rgba(15,28,36,.22);z-index:1001;opacity:0;pointer-events:none;transition:.2s}.category-panel-backdrop.show{opacity:1;pointer-events:auto}.compact-form-head{display:flex;align-items:flex-start;justify-content:space-between;position:sticky;top:0;background:#fff;z-index:3}.panel-close{border:0;background:#f2f5f6;color:#63747c;width:32px;height:32px;border-radius:50%;font-size:20px;cursor:pointer}.compact-form-body{padding:12px!important}.form-tabs{display:flex;gap:5px;padding:4px;background:#f1f4f5;border-radius:7px;margin-bottom:12px}.form-tab{flex:1;border:0;background:transparent;padding:8px 10px;border-radius:5px;font-size:11px;font-weight:700;color:#687981;cursor:pointer}.form-tab.active{background:#fff;color:var(--blue2);box-shadow:0 1px 3px rgba(0,0,0,.08)}.form-tab-panel{display:none}.form-tab-panel.active{display:block}.compact-form-body .field{margin-bottom:11px}.compact-form-body .field input,.compact-form-body .field select{min-height:36px!important}.compact-form-body .category-form textarea{min-height:78px}.compact-actions{position:sticky;bottom:0;background:#fff;padding-top:10px;border-top:1px solid #edf0f2;margin-top:10px}.google-preview-details{border:1px solid #e2e8f0;border-radius:8px;overflow:hidden}.google-preview-details summary{cursor:pointer;padding:10px 12px;font-size:11px;font-weight:700;color:#52636b;background:#f8fafb}.compact-google{border:0;border-top:1px solid #edf0f2;border-radius:0;padding:12px}.compact-google .gp-title{font-size:16px}
@media(max-width:900px){.compact-stats{grid-template-columns:repeat(4,1fr)}.compact-add{display:none}.category-filter-form{max-width:none;min-width:0;flex:1}.compact-head{gap:8px}.compact-form-card{top:64px;right:10px;width:calc(100vw - 20px);max-height:calc(100vh - 76px)}}
@media(max-width:760px){.compact-stats{grid-template-columns:1fr 1fr}.compact-head{display:grid;grid-template-columns:1fr}.category-filter-form{width:100%;margin:8px 0 0}.compact-category-table tbody{padding:7px}.compact-category-table tr{padding:9px;margin-bottom:8px}.compact-category-table td{padding:4px 0!important}.compact-category-table td:first-child{padding-bottom:8px!important}.category-pagination{align-items:flex-start;flex-direction:column}.category-pagination nav{width:100%;justify-content:center}.category-pagination nav a,.category-pagination nav span{min-width:34px;height:34px}.compact-form-card{top:58px;right:6px;width:calc(100vw - 12px);max-height:calc(100vh - 66px)}.category-panel-backdrop{background:rgba(15,28,36,.35)}}
@media(max-width:480px){.compact-stats .cat-stat{min-height:58px}.compact-stats .cat-stat-icon{width:30px;height:30px}.compact-stats .cat-stat b{font-size:16px}.compact-form-body{padding:10px!important}.form-tab{padding:9px 6px}.pagination-info{width:100%;text-align:center}}


/* V7 - Category dedicated create/edit pages */
.editor-page-head{display:flex;justify-content:space-between;align-items:flex-end;margin:0 0 18px}.editor-page-head h1{margin:6px 0 4px;font-size:26px}.editor-page-head p{margin:0;color:#64748b}.back-link{font-size:13px;font-weight:700;text-decoration:none;color:#2563eb}.editor-grid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:18px;align-items:start}.editor-section{margin-bottom:18px}.editor-section .card-body{padding:20px}.editor-section .field{margin-bottom:17px}.editor-section .field label{display:flex;justify-content:space-between;font-weight:700;margin-bottom:7px}.editor-section input,.editor-section select,.editor-section textarea{width:100%;box-sizing:border-box;border:1px solid #dbe2ea;border-radius:9px;padding:11px 12px;background:#fff;font:inherit}.editor-section textarea{resize:vertical}.slug-input{display:flex;border:1px solid #dbe2ea;border-radius:9px;overflow:hidden}.slug-input span{padding:11px;background:#f8fafc;border-right:1px solid #dbe2ea;color:#64748b}.slug-input input{border:0;border-radius:0}.switch-row{display:flex;gap:10px;align-items:center;padding:11px 0;font-weight:650}.switch-row input{width:18px!important;height:18px}.google-preview{border:1px solid #e2e8f0;border-radius:12px;padding:16px;margin-top:14px;background:#fff}.google-preview small{color:#475569}.google-preview h3{font-size:19px;color:#1a0dab;margin:5px 0}.google-preview p{color:#4d5156;margin:0;line-height:1.5}.sticky-save{position:sticky;top:82px}.editor-save,.editor-cancel{width:100%;display:block;text-align:center;box-sizing:border-box;margin-top:12px}.editor-cancel{text-decoration:none;border:1px solid #dbe2ea;padding:10px 12px;border-radius:9px;color:#334155;font-weight:700}.save-note{font-size:12px;color:#64748b;line-height:1.5;margin:13px 0 0}
@media(max-width:900px){.editor-grid{grid-template-columns:1fr}.sticky-save{position:static}.editor-page-head h1{font-size:22px}.editor-section .card-body{padding:15px}.category-add-mobile{display:inline-flex!important}}

/* V8 - category image + rich content editor */
.category-image-uploader{display:grid;grid-template-columns:180px minmax(0,1fr);gap:16px;align-items:center}.category-image-preview{width:180px;aspect-ratio:4/3;border:1px dashed #cbd5e1;border-radius:12px;overflow:hidden;background:#f8fafc;display:flex;align-items:center;justify-content:center}.category-image-preview img{width:100%;height:100%;object-fit:cover}.image-placeholder{text-align:center;color:#94a3b8}.image-placeholder b{display:block;font-size:30px}.image-upload-actions{display:flex;flex-direction:column;align-items:flex-start;gap:10px}.upload-button{display:inline-flex!important;align-items:center;justify-content:center;background:#0f6cbd;color:#fff!important;border-radius:9px;padding:10px 15px;cursor:pointer}.upload-button input{display:none}.remove-image{font-size:13px!important;display:flex!important;align-items:center;gap:7px}.remove-image input{width:16px!important}.rich-editor-shell{border:1px solid #dbe2ea;border-radius:10px;overflow:hidden;background:#fff}.rich-toolbar{display:flex;gap:5px;align-items:center;flex-wrap:wrap;padding:8px;border-bottom:1px solid #e5e7eb;background:#f8fafc}.rich-toolbar button{border:1px solid transparent;background:#fff;border-radius:6px;min-width:34px;height:32px;padding:0 8px;cursor:pointer;color:#334155;font-weight:650}.rich-toolbar button:hover{border-color:#cbd5e1;background:#f1f5f9}.rich-toolbar>span{width:1px;height:22px;background:#dbe2ea;margin:0 3px}.rich-editor{min-height:170px;padding:14px 15px;outline:none;line-height:1.75;color:#334155}.long-content-field .rich-editor{min-height:300px}.rich-editor:empty:before{content:attr(data-placeholder);color:#94a3b8}.rich-editor h2{font-size:24px;margin:18px 0 8px}.rich-editor h3{font-size:20px;margin:15px 0 7px}.rich-editor p{margin:0 0 10px}.rich-editor ul,.rich-editor ol{padding-left:24px}
@media(max-width:700px){.category-image-uploader{grid-template-columns:1fr}.category-image-preview{width:100%;max-width:260px}.rich-toolbar button{min-width:38px;height:38px}.rich-editor{min-height:190px}.long-content-field .rich-editor{min-height:260px}}


/* V9 - Professional product list */
.product-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:14px}.product-stat{background:#fff;border:1px solid #e5eaed;border-radius:8px;min-height:76px;padding:12px 14px;display:flex;align-items:center;gap:12px;box-shadow:0 1px 2px rgba(0,0,0,.035)}.ps-icon{width:40px;height:40px;border-radius:9px;display:grid;place-items:center;font-size:18px;font-weight:800}.ps-icon.blue{background:#eaf4fa;color:#3184b5}.ps-icon.green{background:#e8f7ef;color:#14935a}.ps-icon.orange{background:#fff4df;color:#d88a07}.ps-icon.gray{background:#f0f3f5;color:#718087}.product-stat b{display:block;font-size:21px;line-height:1.05}.product-stat small{display:block;color:#7f8d94;margin-top:4px;font-size:11px}.product-list-card{overflow:hidden}.product-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border-bottom:1px solid #edf0f2}.product-list-head h2{margin:0 0 3px;font-size:15px;font-weight:650}.product-list-head p{margin:0;color:#819096;font-size:11px}.product-create-btn{display:inline-flex;align-items:center;min-height:36px;padding:0 13px;white-space:nowrap}.product-filters{display:grid;grid-template-columns:minmax(250px,1.5fr) minmax(150px,.7fr) minmax(140px,.65fr) minmax(145px,.7fr) auto auto;gap:8px;padding:11px 14px;background:#fafcfd;border-bottom:1px solid #edf0f2}.product-filters select,.product-search{height:38px;border:1px solid #dce4e8;border-radius:7px;background:#fff}.product-search{display:flex;align-items:center;min-width:0}.product-search span{padding-left:10px;color:#829198}.product-search input{border:0;outline:0;width:100%;min-width:0;padding:0 10px;background:transparent;font-size:12px}.product-filters select{padding:0 9px;font-size:11px;color:#46575f}.filter-submit,.filter-reset{height:38px;border-radius:7px;padding:0 13px;display:grid;place-items:center;font-size:11px;font-weight:700}.filter-submit{border:0;background:#3c8dbc;color:#fff;cursor:pointer}.filter-reset{border:1px solid #dce4e8;background:#fff;color:#66777e}.product-table-wrap{overflow-x:auto}.product-table{width:100%;border-collapse:collapse}.product-table th{padding:10px 12px;text-align:left;background:#fff;color:#75848a;font-size:10px;text-transform:uppercase;letter-spacing:.25px;border-bottom:1px solid #e9edef;white-space:nowrap}.product-table td{padding:10px 12px;border-bottom:1px solid #eef1f2;vertical-align:middle;font-size:11px}.product-table tbody tr:hover{background:#fbfdfe}.product-main-cell{display:flex;align-items:center;gap:10px;min-width:245px}.product-thumb{width:48px;height:48px;border-radius:8px;overflow:hidden;background:#edf5f8;color:#3c8dbc;display:grid;place-items:center;flex:0 0 auto;font-size:17px;font-weight:800;border:1px solid #e4ebee}.product-thumb img{width:100%;height:100%;object-fit:cover}.product-copy{min-width:0}.product-copy strong{display:block;font-size:12px;color:#26373e;margin-bottom:4px;max-width:300px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.product-meta{display:flex;gap:6px;flex-wrap:wrap;color:#87959a;font-size:9.5px}.product-meta span+span:before{content:'·';margin-right:6px}.product-category-badge{display:inline-flex;background:#f1f5f7;color:#566870;border-radius:20px;padding:5px 8px;font-size:10px;white-space:nowrap}.price-stack{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;max-width:140px}.price-stack strong{color:#d43d2f;font-size:12px;white-space:nowrap}.price-stack del{color:#9aa5aa;font-size:9px}.price-stack small{color:#7f8e94;font-size:9px}.seo-score{display:inline-flex;align-items:baseline;gap:1px;border-radius:20px;padding:5px 8px;font-size:9px;font-weight:700}.seo-score b{font-size:11px}.seo-score.good{background:#e8f7ef;color:#17874f}.seo-score.mid{background:#fff5df;color:#b67609}.seo-score.low{background:#fdeceb;color:#c13b33}.star-toggle{border:0;background:transparent;color:#c9d0d3;font-size:20px;line-height:1;cursor:pointer;padding:5px}.star-toggle.on{color:#f4a915}.product-actions{justify-content:flex-end}.product-actions form{display:inline}.product-empty{text-align:center!important;padding:42px!important;color:#829096}.product-empty b,.product-empty span{display:block}.product-empty b{color:#506168;font-size:13px;margin-bottom:5px}.product-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 14px;background:#fbfcfd;border-top:1px solid #edf0f2;font-size:11px;color:#7b898f}.product-pagination nav{display:flex;gap:4px}.product-pagination a,.product-pagination span{min-width:31px;height:31px;padding:0 8px;border:1px solid #dfe6e9;border-radius:5px;display:grid;place-items:center;background:#fff}.product-pagination .current{background:#3c8dbc;border-color:#3c8dbc;color:#fff;font-weight:700}.product-pagination .disabled{opacity:.4}.inline-form{display:inline;margin:0}
@media(max-width:1100px){.product-filters{grid-template-columns:2fr 1fr 1fr}.filter-submit,.filter-reset{min-width:90px}.product-stats{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.product-stats{grid-template-columns:1fr 1fr;gap:8px}.product-stat{min-height:66px;padding:9px 10px}.ps-icon{width:34px;height:34px}.product-stat b{font-size:18px}.product-list-head{align-items:flex-start}.product-list-head p{line-height:1.4}.product-create-btn{font-size:11px}.product-filters{grid-template-columns:1fr 1fr;padding:10px}.product-search{grid-column:1/-1}.filter-submit,.filter-reset{width:100%}.product-table-wrap{overflow:visible}.product-table thead{display:none}.product-table,.product-table tbody{display:block}.product-table tbody{padding:8px}.product-table tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px;border:1px solid #e6ecef;border-radius:10px;padding:11px;margin-bottom:9px;background:#fff}.product-table td{display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;padding:0;font-size:11px;text-align:right}.product-table td:before{content:attr(data-label);font-size:9px;text-transform:uppercase;color:#8b989d;font-weight:700;text-align:left}.product-table td:first-child{grid-column:1/-1;display:block;text-align:left;padding-bottom:8px;border-bottom:1px solid #eef1f2}.product-table td:first-child:before{display:none}.product-main-cell{min-width:0}.product-thumb{width:54px;height:54px}.product-copy strong{max-width:none;white-space:normal;font-size:13px}.product-table td:last-child{grid-column:1/-1;border-top:1px solid #eef1f2;padding-top:9px}.product-actions{width:100%;justify-content:flex-end}.product-category-badge{white-space:normal;text-align:right}.price-stack{justify-content:flex-end}.product-pagination{flex-direction:column;align-items:center}.product-pagination nav{justify-content:center;flex-wrap:wrap}.product-pagination a,.product-pagination span{min-width:34px;height:34px}}
@media(max-width:460px){.product-stats{grid-template-columns:1fr 1fr}.product-stat{gap:8px}.product-stat small{font-size:9.5px}.product-filters{grid-template-columns:1fr}.product-search{grid-column:auto}.product-list-head{display:grid}.product-create-btn{width:100%;justify-content:center}.product-table tr{grid-template-columns:1fr}.product-table td{grid-column:1/-1}.product-table td:first-child,.product-table td:last-child{grid-column:1/-1}}

/* V10 - Professional product create/edit */
.product-editor-head{align-items:flex-end}.preview-product{padding:9px 12px;text-decoration:none;white-space:nowrap}.product-editor-grid{grid-template-columns:minmax(0,1fr) 310px}.product-form-two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.product-form-three{display:grid;grid-template-columns:1fr 1fr .65fr;gap:14px}.money-input{display:flex;border:1px solid #dbe2ea;border-radius:9px;overflow:hidden;background:#fff}.money-input input{border:0!important;border-radius:0!important}.money-input span{display:grid;place-items:center;min-width:42px;background:#f8fafc;border-left:1px solid #e2e8f0;color:#64748b;font-weight:700}.product-image-uploader .category-image-preview{width:190px;aspect-ratio:1/1}.product-publish-card .card-body{padding-top:12px}.publish-summary{display:grid;gap:8px;margin:12px 0 4px;padding:12px;border:1px solid #e7ecef;border-radius:9px;background:#f8fafc}.publish-summary div{display:flex;justify-content:space-between;gap:8px}.publish-summary span{font-size:10px;color:#829198;text-transform:uppercase;font-weight:700}.publish-summary b{font-size:11px;color:#33454d;text-align:right;overflow-wrap:anywhere}.product-editor-form .field label span{font-weight:400;color:#84939a}.product-editor-form .field label b{color:#d94b3c}.product-editor-form .rich-editor{min-height:160px}.product-editor-form .long-content-field .rich-editor{min-height:340px}
@media(max-width:1000px){.product-editor-grid{grid-template-columns:1fr}.product-publish-card{position:static}.product-form-three{grid-template-columns:1fr 1fr}.product-form-three .field:last-child{grid-column:1/-1}}
@media(max-width:700px){.product-editor-head{display:block}.preview-product{display:inline-flex;margin-top:12px}.product-form-two,.product-form-three{grid-template-columns:1fr}.product-form-three .field:last-child{grid-column:auto}.product-image-uploader .category-image-preview{width:100%;max-width:280px}.product-editor-form .editor-section .card-body{padding:14px}.product-editor-form .long-content-field .rich-editor{min-height:280px}}

/* V11 - Compact professional product form */
.compact-product-head{margin-bottom:14px}.compact-product-head h1{font-size:23px;margin-bottom:2px}.compact-product-head p{font-size:12px}.compact-product-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:14px;align-items:start}.compact-main-card{margin-bottom:14px}.compact-main-card .card-body{padding:17px}.compact-product-form .field{margin-bottom:13px}.compact-name-field input{font-size:15px;font-weight:650}.compact-info-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:12px}.compact-commerce-grid{display:grid;grid-template-columns:1fr 1fr .55fr;gap:12px}.compact-image-row{display:grid;grid-template-columns:118px 1fr;gap:14px;align-items:center;padding-top:4px}.compact-image-preview{width:118px;height:96px;border:1px dashed #ccd8dd;border-radius:9px;overflow:hidden;background:#f8fafb;display:grid;place-items:center}.compact-image-preview img{width:100%;height:100%;object-fit:cover}.compact-image-preview .image-placeholder{display:grid;place-items:center;gap:2px;color:#84939a}.compact-image-preview .image-placeholder b{font-size:24px}.compact-image-preview .image-placeholder span{font-size:10px}.compact-image-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.compact-image-actions small{display:block;width:100%;color:#87959b}.compact-content-card{margin-bottom:14px}.compact-content-card .card-body{padding:16px}.compact-product-form .rich-editor{min-height:130px}.compact-product-form .compact-long-content .rich-editor{min-height:240px}.compact-advanced{margin-bottom:14px;overflow:hidden}.compact-advanced>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 16px;cursor:pointer;background:#fff}.compact-advanced>summary::-webkit-details-marker{display:none}.compact-advanced>summary span{display:grid;gap:2px}.compact-advanced>summary b{font-size:13px}.compact-advanced>summary small{font-size:10px;color:#84939a}.compact-advanced>summary i{font-style:normal;color:#819096;font-size:17px;transition:.2s}.compact-advanced[open]>summary i{transform:rotate(180deg)}.advanced-body{padding:15px 16px 17px!important;border-top:1px solid #edf1f3}.compact-google-preview{margin-top:8px}.compact-save-card{position:sticky;top:78px}.compact-save-card .card-body{padding:15px}.compact-save-title{display:flex;justify-content:space-between;gap:8px;align-items:center;padding-bottom:10px;border-bottom:1px solid #edf1f3;margin-bottom:5px}.compact-save-title b{font-size:13px}.compact-save-title span{font-size:9px;color:#7f8e94;text-transform:uppercase}.compact-save-btn{margin-top:8px}.compact-product-form .switch-row{padding:9px 0}.compact-product-form .editor-cancel{margin-top:8px}
@media(max-width:980px){.compact-product-layout{grid-template-columns:1fr}.compact-save-card{position:static}.compact-save-card .card-body{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}.compact-save-title{grid-column:1/-1}.compact-save-btn,.compact-save-card .editor-cancel{margin-top:0}.compact-save-card .switch-row{padding:8px 0}}
@media(max-width:700px){.compact-product-head h1{font-size:21px}.compact-info-grid,.compact-commerce-grid{grid-template-columns:1fr}.compact-image-row{grid-template-columns:92px 1fr}.compact-image-preview{width:92px;height:82px}.compact-main-card .card-body,.compact-content-card .card-body{padding:13px}.compact-product-form .compact-long-content .rich-editor{min-height:220px}.compact-save-card .card-body{grid-template-columns:1fr}.compact-save-title{grid-column:auto}.compact-save-btn{min-height:44px}.compact-product-form input,.compact-product-form select,.compact-product-form textarea{font-size:16px}}


/* V12 - AI viết bài theo tên sản phẩm */
.product-name-ai-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch}
.ai-product-btn{white-space:nowrap;min-width:142px;border-radius:9px}
.ai-product-btn:disabled{opacity:.65;cursor:wait}
.ai-product-status{display:none;margin-top:9px;padding:9px 11px;border-radius:8px;font-size:13px;line-height:1.45}
.ai-product-status.loading,.ai-product-status.success,.ai-product-status.error{display:block}
.ai-product-status.loading{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe}
.ai-product-status.success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.ai-product-status.error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
@media(max-width:640px){
  .product-name-ai-row{grid-template-columns:1fr}
  .ai-product-btn{width:100%;min-height:44px}
}


/* V13 - Tự động tải ảnh Google về hosting khi lưu sản phẩm */
.google-image-save-option{margin:10px 0 4px;padding:10px;border:1px solid #dbeafe;background:#f8fbff;border-radius:10px}
.google-image-switch{align-items:flex-start!important;margin:0!important}
.google-image-switch span{display:flex;flex-direction:column;gap:3px}
.google-image-switch span b{font-size:13px;color:#0f172a}
.google-image-switch span small{font-size:11.5px;line-height:1.4;color:#64748b;font-weight:400}

/* V14 - Google Images settings */
.google-config-shell{max-width:850px}
.google-config-note{padding:14px;border-radius:10px;background:#f8fafc;border:1px solid #e2e8f0;color:#475569;font-size:13px;line-height:1.7}

/* V15 - Media library trong bộ soạn thảo */
.rich-image-library{min-width:54px!important}
.media-manager-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:9999;padding:24px;overflow:auto}
.media-manager-backdrop[hidden]{display:none}
.media-manager{max-width:1050px;margin:3vh auto;background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.25);overflow:hidden}
.media-manager-head,.media-manager-tools,.media-manager-foot{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid #e5e7eb}
.media-manager-head{justify-content:space-between}.media-manager-head>div{display:flex;flex-direction:column;gap:2px}.media-manager-head small{color:#64748b}
.media-manager-head button{border:0;background:none;font-size:28px;cursor:pointer}
.media-manager-tools{flex-wrap:wrap}.media-manager-tools select{min-width:240px;min-height:40px;border:1px solid #cbd5e1;border-radius:8px;padding:0 10px}
.media-upload-btn{cursor:pointer}.media-manager-path{padding:9px 18px;background:#f8fafc;color:#64748b;font:12px monospace;border-bottom:1px solid #e5e7eb}
.media-grid{padding:16px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;min-height:280px;max-height:58vh;overflow:auto}
.media-card{border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:6px;cursor:pointer;text-align:left;overflow:hidden}
.media-card:hover{border-color:#2563eb;box-shadow:0 4px 16px rgba(37,99,235,.12)}
.media-card img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:7px}
.media-card span{display:block;padding:7px 2px 2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:#475569}
.media-empty{grid-column:1/-1;display:grid;place-items:center;color:#94a3b8;min-height:180px}
.media-manager-foot{justify-content:space-between;border-top:1px solid #e5e7eb;border-bottom:0;color:#64748b;font-size:12px}
body.media-open{overflow:hidden}
.rich-editor img{max-width:100%;height:auto;border-radius:8px;margin:8px auto;display:block}
.rich-editor.rich-dragover{outline:2px dashed #2563eb;outline-offset:-5px;background:#eff6ff}
@media(max-width:800px){.media-manager-backdrop{padding:8px}.media-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.media-manager-tools select{width:100%;min-width:0}.media-manager-foot span{display:none}}
@media(max-width:480px){.media-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.media-manager{margin:1vh auto}}

/* V16 - SEO tự động */
.seo-auto-panel{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;margin-bottom:10px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:10px}
.seo-auto-panel>div{display:flex;flex-direction:column;gap:3px}.seo-auto-panel b{color:#1e3a8a}.seo-auto-panel small{color:#64748b}
.seo-score-row{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.seo-chip{font-size:11px;font-weight:700;padding:5px 8px;border-radius:999px;background:#f1f5f9;color:#64748b}.seo-chip.good{background:#dcfce7;color:#166534}.seo-chip.warn{background:#fef3c7;color:#92400e}
@media(max-width:640px){.seo-auto-panel{align-items:stretch;flex-direction:column}.seo-auto-panel .btn{width:100%}}

/* V17 - SEO Title Auto Smart */
.seo-title-auto-row{display:flex;flex-direction:column;gap:4px;margin:-2px 0 12px;padding:10px 12px;border:1px solid #e2e8f0;border-radius:9px;background:#fff}
.seo-title-auto-row label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:#0f172a;cursor:pointer}
.seo-title-auto-row input{width:16px;height:16px;accent-color:#2563eb}
.seo-title-auto-row small{padding-left:24px;color:#64748b;font-size:11.5px;line-height:1.45}

/* V18 - 3 key SEO tự động */
.seo-keyword-field{margin-top:4px}
.seo-key-preview{display:flex;gap:7px;flex-wrap:wrap;margin-top:8px}
.seo-key-preview span{display:inline-flex;padding:5px 8px;border-radius:999px;background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe;font-size:11px;font-weight:700}

/* V19 - SEO Keywords hiển thị rõ trong SEO & Nâng cao */
.seo-keyword-visible{
  margin-top:12px;
  padding:14px;
  border:1px solid #c7d2fe;
  border-radius:10px;
  background:#fafaff;
}
.seo-keyword-visible label{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.seo-key-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 7px;
  border-radius:999px;
  background:#4f46e5;
  color:#fff;
  font-size:10px;
  font-weight:800;
  letter-spacing:.03em;
}
.seo-keyword-visible input{
  margin-top:7px;
}
.seo-key-preview{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  margin-top:9px;
}
.seo-key-preview span{
  display:inline-flex;
  padding:5px 9px;
  border-radius:999px;
  background:#eef2ff;
  border:1px solid #c7d2fe;
  color:#3730a3;
  font-size:11px;
  font-weight:700;
}

/* V20 - Gắn ảnh URL + tải ảnh URL về hosting */
.rich-image-link{min-width:72px!important}
.media-url-wrap{display:flex;align-items:center;gap:7px;flex:1;min-width:420px}
.media-url-wrap input{flex:1;min-width:220px;height:40px;border:1px solid #cbd5e1;border-radius:8px;padding:0 10px;font-size:12px}
.media-url-wrap .btn{white-space:nowrap}
@media(max-width:850px){
  .media-url-wrap{width:100%;min-width:0;flex-wrap:wrap}
  .media-url-wrap input{width:100%;min-width:0;flex-basis:100%}
  .media-url-wrap .btn{flex:1}
}

/* V21 - HTML source mode */
.rich-html-toggle.active{background:#0f172a!important;color:#fff!important;border-color:#0f172a!important}
.rich-html-source{width:100%;min-height:300px;border:0;outline:0;resize:vertical;padding:14px 15px;background:#0f172a;color:#d1fae5;font:13px/1.65 Consolas,Monaco,monospace;tab-size:2;box-sizing:border-box}
.rich-editor-shell.html-source-mode .rich-toolbar{background:#eef2ff}
.rich-editor table{width:100%;border-collapse:collapse}
.rich-editor th,.rich-editor td{border:1px solid #d1d5db;padding:7px}
.rich-editor figure{max-width:100%;margin:14px auto}

/* V24 - Cây thư mục cụm SEO sản phẩm */
.seo-cluster-legend{display:flex;gap:14px;flex-wrap:wrap;align-items:center;padding:10px 14px;margin:0 0 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px;font-size:11px;color:#64748b}
.seo-cluster-legend b{color:#334155}
.seo-cluster-child-row{background:#fbfcff}
.seo-cluster-child-row .product-main-cell{padding-left:22px}
.seo-tree-line{display:flex;align-items:center;gap:6px;min-width:0}
.seo-tree-prefix{flex:0 0 auto;color:#64748b;font-size:12px}
.seo-tree-line strong{min-width:0}
.seo-cluster-badge{display:inline-flex;flex:0 0 auto;padding:3px 7px;border-radius:999px;font-size:9px;font-weight:800;letter-spacing:.02em}
.seo-cluster-badge.main{background:#dcfce7;color:#166534;border:1px solid #bbf7d0}
.seo-cluster-badge.child{background:#eef2ff;color:#3730a3;border:1px solid #c7d2fe}
.seo-parent-ref{font-size:10px;color:#64748b;margin:3px 0 1px 20px}
.icon-btn.cluster{border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d}
.icon-btn.cluster:hover{background:#dcfce7}
@media(max-width:900px){
 .seo-cluster-child-row .product-main-cell{padding-left:10px}
 .seo-cluster-legend{gap:7px}
 .seo-cluster-legend span{width:100%}
}
