:root{--ink:#111316;--ink2:#1b1f24;--paper:#fff;--soft:#f5f6f7;--soft2:#eceff2;--line:#e2e5e9;--muted:#747b85;--red:#ed1c24;--red2:#bd1319;--green:#18a66a;--sidebar:248px;--radius:14px}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:'Kanit',Arial,sans-serif;color:var(--ink);background:#f6f7f8;font-weight:300}a{text-decoration:none;color:inherit}button,input,textarea,select{font:inherit}.app-shell{display:grid;grid-template-columns:var(--sidebar) 1fr;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:var(--sidebar);background:#101215;color:#fff;padding:24px 18px;display:flex;flex-direction:column;z-index:30}.brand{display:block;padding:4px 8px 24px}.brand-mark{font-size:34px;font-weight:700;line-height:1;letter-spacing:-.055em}.brand-mark span{color:var(--red)}.brand-mark.light{color:#fff}.brand small,.brand-caption{color:#8d949e;font-size:10px;letter-spacing:.15em;text-transform:uppercase}.sidebar nav{display:grid;gap:5px}.sidebar nav a{display:flex;align-items:center;gap:12px;padding:12px 13px;border-radius:10px;color:#aeb4bc;font-size:14px}.sidebar nav a i{width:20px;text-align:center}.sidebar nav a:hover,.sidebar nav a.active{background:#1c2025;color:#fff}.sidebar nav a.active i{color:#ff3c43}.sidebar nav a.disabled{opacity:.55;pointer-events:none}.sidebar nav em{font-style:normal;margin-left:auto;font-size:9px;background:#2a2f36;padding:2px 5px;border-radius:99px}.sidebar-bottom{margin-top:auto;border-top:1px solid #2a2f35;padding-top:18px}.user-mini{display:flex;align-items:center;gap:10px;margin-bottom:12px}.avatar{width:38px;height:38px;border-radius:12px;background:var(--red);display:grid;place-items:center;font-weight:600}.user-mini strong,.user-mini span{display:block}.user-mini strong{font-size:13px}.user-mini span{font-size:10px;color:#8d949e;text-transform:uppercase}.logout{width:100%;border:0;background:none;color:#9da4ad;text-align:left;padding:9px 0;cursor:pointer}.logout:hover{color:#fff}.main{grid-column:2;min-width:0}.topbar{position:sticky;top:0;z-index:20;height:76px;background:rgba(255,255,255,.94);backdrop-filter:blur(12px);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 30px;gap:14px}.topbar strong,.topbar span{display:block}.topbar strong{font-size:17px;font-weight:500}.topbar span{font-size:11px;color:var(--muted)}.top-actions{margin-left:auto;display:flex;gap:8px}.menu-toggle{display:none;border:0;background:none;font-size:20px}.content{padding:28px 30px 60px;max-width:1600px;margin:auto}.primary-btn,.ghost-btn,.link-btn{border:1px solid var(--line);border-radius:10px;min-height:42px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:500;cursor:pointer;background:#fff;color:var(--ink)}.primary-btn{background:var(--red);border-color:var(--red);color:#fff}.primary-btn:hover{background:var(--red2)}.primary-btn.large{min-height:49px}.ghost-btn:hover{border-color:#aeb3ba}.link-btn{min-height:0;padding:0;border:0;background:none;color:var(--red)}.alert{padding:12px 15px;border-radius:10px;margin-bottom:18px;display:flex;gap:8px;align-items:center;font-size:13px}.alert.success{background:#eaf8f1;color:#10704a}.alert.error{background:#fff0f0;color:#b11920}.welcome-card{background:linear-gradient(125deg,#14171b,#272c33);color:#fff;border-radius:20px;padding:30px 32px;display:flex;align-items:end;justify-content:space-between;gap:20px;overflow:hidden;position:relative}.welcome-card:after{content:'';position:absolute;width:280px;height:280px;border-radius:50%;background:#ed1c2420;right:-60px;top:-100px}.welcome-card>*{position:relative;z-index:1}.welcome-card h1{font-size:36px;margin:4px 0 6px;line-height:1}.welcome-card p{margin:0;color:#b8bec6}.kicker{font-size:10px;font-weight:600;letter-spacing:.14em;color:var(--red)}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:18px 0}.stat-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;display:flex;gap:14px;align-items:center}.stat-card i{width:42px;height:42px;border-radius:12px;background:#fff1f2;color:var(--red);display:grid;place-items:center}.stat-card span,.stat-card strong{display:block}.stat-card span{font-size:11px;color:var(--muted)}.stat-card strong{font-size:27px;font-weight:600}.dash-grid{display:grid;grid-template-columns:1.6fr .8fr;gap:14px}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:20px}.panel-head{display:flex;align-items:end;justify-content:space-between;gap:15px;margin-bottom:14px}.panel-head h2,.roadmap h2{margin:3px 0 0;font-size:24px}.panel-head>a{font-size:12px;color:var(--red)}.mini-list{display:grid}.mini-list>a{display:grid;grid-template-columns:48px 1fr auto;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #edf0f2}.mini-img{width:48px;height:48px;border-radius:10px;background:#f4f5f6;display:grid;place-items:center;overflow:hidden}.mini-img img{width:100%;height:100%;object-fit:contain}.mini-list strong,.mini-list span{display:block}.mini-list strong{font-size:14px}.mini-list span{font-size:11px;color:var(--muted)}.status{font-style:normal;font-size:10px;padding:4px 8px;border-radius:999px;background:#edf0f2;color:#69717c;text-transform:capitalize;white-space:nowrap}.status.published{background:#e8f8f1;color:#128052}.status.draft{background:#fff4dc;color:#926400}.status.archived{background:#eef0f2;color:#6a7079}.roadmap ul{list-style:none;padding:0;margin:16px 0 0;display:grid;gap:10px}.roadmap li{padding-left:25px;position:relative;color:#7a818b}.roadmap li:before{content:'○';position:absolute;left:0}.roadmap li.done{color:#24282d}.roadmap li.done:before{content:'✓';color:var(--green);font-weight:600}.two-col{display:grid;grid-template-columns:1.4fr .6fr;gap:14px}.sticky{position:sticky;top:96px;align-self:start}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:720px}th,td{text-align:left;padding:12px 10px;border-bottom:1px solid #edf0f2;font-size:13px;vertical-align:middle}th{font-size:10px;color:#7b828b;text-transform:uppercase;letter-spacing:.07em;font-weight:500}td small{display:block;color:var(--muted)}.products-table .thumb{width:58px;height:58px;background:#f5f6f7;border-radius:10px;display:grid;place-items:center;overflow:hidden}.products-table .thumb img{width:100%;height:100%;object-fit:contain}.product-cell{display:flex;gap:10px;align-items:center}.product-cell strong,.product-cell small{display:block}.mode-pill{font-size:10px;padding:5px 8px;border-radius:999px}.mode-pill.quote{background:#fff0f0;color:#b3151c}.mode-pill.buy{background:#e8f8f1;color:#0b7a4a}.mode-pill.both{background:#eef1ff;color:#4a55a8}.muted{color:var(--muted)}.filters-bar{display:grid;grid-template-columns:1fr 210px 180px auto;gap:9px;margin-bottom:18px}.search-box{position:relative}.search-box i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#9ba1a9}.search-box input{padding-left:36px!important}.filters-bar input,.filters-bar select,.form-stack input,.form-stack textarea,.form-stack select,.form-grid input,.form-grid textarea,.form-grid select,.product-settings input,.product-settings select{width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 12px;outline:none;color:var(--ink)}input:focus,textarea:focus,select:focus{border-color:#ee777b;box-shadow:0 0 0 3px #ed1c2410}.form-stack{display:grid;gap:12px}.form-stack label,.form-grid label,.product-settings label{display:grid;gap:5px;font-size:12px;font-weight:400}.form-stack textarea,.form-grid textarea{resize:vertical}.switch-row{display:flex!important;align-items:center;justify-content:space-between!important;gap:15px}.switch-row input{width:19px!important;height:19px}.hidden{display:none!important}.product-form{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:14px;align-items:start}.form-main{display:grid;gap:14px}.form-section{padding:22px}.section-title{display:flex;gap:12px;align-items:start;padding-bottom:18px;border-bottom:1px solid #edf0f2;margin-bottom:18px}.section-title>span{width:34px;height:34px;border-radius:10px;background:#fff0f0;color:var(--red);display:grid;place-items:center;font-weight:600}.section-title h2{margin:0;font-size:20px}.section-title p{margin:2px 0 0;color:var(--muted);font-size:12px}.form-grid{display:grid;gap:12px}.form-grid.two{grid-template-columns:1fr 1fr}.form-grid .full{grid-column:1/-1}.product-settings h2{margin:3px 0 16px}.product-settings{display:grid;gap:12px}.price-row{display:grid;grid-template-columns:.55fr 1fr;gap:9px}.mode-explainer{background:#f7f8f9;border-radius:9px;padding:10px;font-size:11px;color:#646b74;line-height:1.45}.save-stack{display:grid;gap:8px;margin-top:4px}.upload-zone{min-height:170px;border:1px dashed #b9bfc7;border-radius:14px;display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;background:#fafbfb}.upload-zone:hover{border-color:var(--red);background:#fff9f9}.upload-zone i{font-size:28px;color:var(--red)}.upload-zone span{font-size:11px;color:var(--muted)}.upload-zone input{display:none}.image-manager{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}.image-item{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:#fff}.image-item img{width:100%;height:150px;object-fit:contain}.image-actions{padding:8px;display:flex;gap:5px;flex-wrap:wrap}.tiny-btn,.primary-tag{border:1px solid var(--line);background:#fff;border-radius:7px;padding:5px 7px;font-size:10px}.tiny-btn.danger{color:#bd1c22}.primary-tag{background:#e8f8f1;color:#11764d;border-color:#d7f1e5}.empty{text-align:center;padding:40px;color:var(--muted)}.login-page{background:#0f1114;min-height:100vh}.login-wrap{display:grid;grid-template-columns:1.15fr .85fr;min-height:100vh}.login-visual{background:radial-gradient(circle at 80% 15%,#662026 0,transparent 36%),linear-gradient(135deg,#15181d,#090a0c);color:#fff;padding:70px;display:flex;align-items:flex-end}.visual-copy{max-width:620px}.visual-copy h1{font-size:64px;line-height:.94;margin:16px 0 18px;letter-spacing:-.04em}.visual-copy p{font-size:18px;color:#b8bec6;max-width:520px}.visual-pills{display:flex;gap:8px;flex-wrap:wrap;margin-top:22px}.visual-pills span{border:1px solid #343941;border-radius:999px;padding:7px 11px;font-size:11px}.login-panel{background:#f5f6f7;display:grid;place-items:center;padding:30px}.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:18px;padding:30px}.login-card h2{font-size:32px;margin:25px 0 0}.login-card>p{color:var(--muted);margin-top:3px}.login-note{margin-top:20px;border-top:1px solid var(--line);padding-top:15px;font-size:10px;color:#9aa0a8}.install-page{min-height:100vh;display:grid;place-items:center;background:#f5f6f7;padding:20px}.install-card{width:min(520px,100%);background:#fff;border:1px solid var(--line);border-radius:18px;padding:30px}.install-card h1{font-size:30px;margin-bottom:4px}@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.dash-grid,.two-col{grid-template-columns:1fr}.sticky{position:static}.product-form{grid-template-columns:1fr}.product-settings{position:static}.image-manager{grid-template-columns:repeat(3,1fr)}}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{transform:translateX(-100%);transition:.25s}.sidebar.open{transform:none;box-shadow:20px 0 40px #0003}.main{grid-column:1}.menu-toggle{display:block}.topbar{padding:0 16px}.content{padding:20px 14px 50px}.top-actions .ghost-btn{display:none}.login-wrap{grid-template-columns:1fr}.login-visual{display:none}.filters-bar{grid-template-columns:1fr 1fr}.search-box{grid-column:1/-1}.form-grid.two{grid-template-columns:1fr}.form-grid .full{grid-column:auto}}@media(max-width:600px){.stats-grid{grid-template-columns:1fr 1fr}.stat-card{padding:14px}.welcome-card{padding:24px;display:block}.welcome-card h1{font-size:30px}.welcome-card .primary-btn{margin-top:18px}.topbar>div:nth-child(2) span{display:none}.top-actions .primary-btn{padding:0 11px;font-size:0}.top-actions .primary-btn i{font-size:15px}.filters-bar{grid-template-columns:1fr}.search-box{grid-column:auto}.image-manager{grid-template-columns:repeat(2,1fr)}.login-card{padding:24px}.price-row{grid-template-columns:1fr}.panel{padding:15px}}
.sidebar nav a.nav-child{padding:7px 13px 7px 43px;font-size:12px;background:transparent}.sidebar nav a.nav-child i{width:12px;font-size:9px;color:#6f7680}.sidebar nav a.nav-child.active,.sidebar nav a.nav-child:hover{color:#fff;background:transparent}.sidebar nav a.nav-child.active i{color:var(--red)}
/* IDEAS CMS Fase 1.1 */
.field-help{font-size:10px;color:var(--muted);line-height:1.4;font-weight:400}.new-image-preview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}.preview-card{position:relative;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;cursor:grab}.preview-card.dragging,.image-item.dragging{opacity:.45}.preview-card img{display:block;width:100%;height:145px;object-fit:contain;background:#fafafa}.preview-meta{padding:8px 34px 9px 9px;min-width:0}.preview-meta strong,.preview-meta span{display:block}.preview-meta strong{font-size:11px}.preview-meta span{font-size:9px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview-remove{position:absolute;right:7px;top:7px;width:28px;height:28px;border:1px solid var(--line);border-radius:50%;background:#fff;color:var(--red);cursor:pointer}.gallery-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}.gallery-toolbar strong,.gallery-toolbar small{display:block}.gallery-toolbar small{font-size:10px;color:var(--muted)}.ghost-btn.compact{min-height:34px;padding:7px 10px;font-size:11px}.sortable-images .image-item{position:relative;cursor:grab}.drag-handle{position:absolute;top:7px;left:7px;z-index:2;width:28px;height:28px;border-radius:8px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;color:#6f7680}.variants-list{display:grid;gap:9px}.variant-row{display:grid;grid-template-columns:1.1fr 76px 1fr .65fr .8fr 1fr 34px;gap:8px;align-items:end;padding:11px;border:1px solid var(--line);border-radius:12px;background:#fafbfb}.variant-row label{display:grid;gap:5px;font-size:10px;color:#626a74}.variant-row input,.variant-row select{width:100%;border:1px solid var(--line);border-radius:9px;background:#fff;padding:9px 10px;min-height:39px}.color-field input[type=color]{padding:4px;height:39px}.variant-remove{width:34px;height:39px;border:1px solid #ffd6d8;background:#fff3f3;color:var(--red);border-radius:9px;cursor:pointer}.variant-note{display:flex;gap:8px;align-items:flex-start;margin-top:12px;padding:10px 12px;background:#f7f8f9;border-radius:10px;font-size:10px;color:var(--muted)}@media(max-width:1200px){.new-image-preview{grid-template-columns:repeat(3,1fr)}.variant-row{grid-template-columns:1fr 72px 1fr 1fr}.variant-remove{align-self:end}}@media(max-width:700px){.new-image-preview{grid-template-columns:repeat(2,1fr)}.gallery-toolbar{align-items:flex-start;flex-direction:column}.variant-row{grid-template-columns:1fr 72px}.variant-row label:nth-of-type(n+3){grid-column:1/-1}.variant-remove{grid-column:2;grid-row:1}.preview-card img{height:120px}}

/* IDEAS CMS Fase 1.1.2 - UX de productos */
.upload-zone-compact{min-height:132px;padding:18px;text-align:center}.upload-zone-compact strong{font-size:18px}.upload-zone-compact span{font-size:11px}.new-image-preview-compact{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}.new-image-preview-compact .preview-card{border-radius:14px;box-shadow:0 8px 20px rgba(15,23,42,.04)}.new-image-preview-compact .preview-card img{height:110px;object-fit:cover;background:#f6f7f8}.new-image-preview-compact .preview-meta{padding:9px 36px 10px 10px}.new-image-preview-compact .preview-meta strong{font-size:12px}.new-image-preview-compact .preview-meta span{font-size:10px}
.gallery-toolbar-clean{margin-top:18px}.image-manager-compact{grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:14px}.image-item-compact{display:flex;flex-direction:column;border-radius:14px;box-shadow:0 10px 20px rgba(15,23,42,.04);overflow:hidden}.image-item-compact .image-thumb-wrap{padding:14px 14px 8px;background:#fff}.image-item-compact img{height:120px;width:100%;object-fit:contain;background:#f7f8f9;border-radius:12px}.image-card-meta{padding:0 14px 10px}.image-card-meta strong,.image-card-meta span{display:block}.image-card-meta strong{font-size:12px}.image-card-meta span{font-size:10px;color:var(--muted)}.image-actions-compact{padding:0 14px 14px;gap:7px}.image-actions-compact .tiny-btn,.image-actions-compact .primary-tag{font-size:10px;padding:6px 8px}
.variant-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}.variant-toolbar small{font-size:11px;color:var(--muted)}.variants-cards{display:grid;gap:14px}.variant-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:16px;box-shadow:0 8px 20px rgba(15,23,42,.04)}.variant-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid #edf0f2;margin-bottom:14px}.variant-card-title{display:block;font-size:16px;color:var(--ink)}.variant-card-head span{display:block;color:var(--muted);font-size:11px;margin-top:3px}.variant-fields-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}.variant-fields-grid label{display:grid;gap:6px;font-size:11px;color:#626a74}.variant-fields-grid input,.variant-fields-grid select{width:100%;border:1px solid var(--line);border-radius:10px;background:#fff;padding:10px 11px;min-height:42px}.variant-fields-grid .color-field input[type=color]{padding:5px}.variant-image-picker-block{display:grid;gap:10px}.variant-image-picker-head strong,.variant-image-picker-head span{display:block}.variant-image-picker-head strong{font-size:13px}.variant-image-picker-head span{font-size:11px;color:var(--muted);margin-top:2px}.variant-image-options{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}.variant-image-option{border:1px solid var(--line);background:#fff;border-radius:14px;padding:8px;display:grid;gap:7px;cursor:pointer;text-align:left;transition:.18s ease;box-shadow:0 0 0 0 rgba(237,28,36,0)}.variant-image-option:hover{transform:translateY(-1px);border-color:#f0a4a9}.variant-image-option.selected{border-color:var(--red);box-shadow:0 0 0 3px rgba(237,28,36,.08)}.variant-image-option img{width:100%;height:86px;object-fit:cover;border-radius:10px;background:#f7f8f9}.variant-image-option small{font-size:10px;color:#5f6670;line-height:1.35}.variant-image-empty{height:86px;border-radius:10px;display:grid;place-items:center;background:#f7f8f9;color:#9098a3;font-size:24px}.variant-empty-state{display:flex;align-items:flex-start;gap:10px;padding:12px;border-radius:12px;background:#f7f8f9;color:#68707a;font-size:12px}.variant-empty-state i{color:var(--red);margin-top:2px}.variant-remove{width:42px;height:42px;border:1px solid #ffd6d8;background:#fff4f4;color:var(--red);border-radius:12px;cursor:pointer;display:grid;place-items:center;font-size:14px;flex-shrink:0}.variant-note-strong{font-size:11px;line-height:1.5}
@media(max-width:1200px){.variant-fields-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:800px){.variant-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.variant-image-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.new-image-preview-compact,.image-manager-compact,.variant-image-options{grid-template-columns:1fr 1fr}.variant-fields-grid{grid-template-columns:1fr}.variant-card{padding:14px}.variant-toolbar{align-items:flex-start;flex-direction:column}.variant-card-head{align-items:flex-start}}

/* IDEAS CMS Fase 1.1.3 - Responsive & Layout Fix */
html,body{max-width:100%;overflow-x:hidden}.app-shell,.main,.content,.product-form,.form-main,.form-side,.panel{min-width:0}.main{width:100%}.content{width:100%;max-width:1600px}.form-side{width:100%;min-width:0}.product-form{grid-template-columns:minmax(0,1fr) minmax(300px,340px)}.product-settings,.product-settings>*{min-width:0;max-width:100%}.product-settings label,.product-settings input,.product-settings select,.product-settings textarea,.form-grid label,.form-grid input,.form-grid select,.form-grid textarea{min-width:0;max-width:100%}.product-settings input[type="datetime-local"]{width:100%;min-width:0}.price-row{grid-template-columns:minmax(0,.7fr) minmax(0,1.3fr);width:100%}.price-row>label{min-width:0}.switch-row{min-width:0;overflow:hidden}.switch-row span{min-width:0;overflow-wrap:anywhere}.switch-row input{flex:0 0 20px;max-width:20px!important}.save-stack .primary-btn,.save-stack .ghost-btn{width:100%;max-width:100%;white-space:normal;text-align:center}.topbar{min-width:0}.topbar>div:nth-child(2){min-width:0}.topbar>div:nth-child(2) strong,.topbar>div:nth-child(2) span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{flex:0 0 auto}.filters-bar>*{min-width:0}.gallery-toolbar,.variant-toolbar{min-width:0}.variant-card,.variant-fields-grid,.variant-image-options{min-width:0}.variant-fields-grid>*{min-width:0}.variant-image-option{min-width:0}.variant-image-option small{overflow-wrap:anywhere}.image-manager-compact,.new-image-preview-compact{min-width:0}.image-item-compact,.preview-card{min-width:0}.table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.sidebar-backdrop{display:none}

@media(max-width:1320px){
  .content{padding:24px 22px 52px}
  .product-form{grid-template-columns:minmax(0,1fr) minmax(280px,310px);gap:12px}
  .product-settings{padding:17px}
  .price-row{grid-template-columns:1fr}
  .variant-fields-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:1160px){
  .product-form{grid-template-columns:1fr}
  .form-side{order:2}
  .product-settings.sticky{position:static;top:auto}
  .product-settings{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
  .product-settings>.kicker,.product-settings>h2,.product-settings>.mode-explainer,.product-settings>.save-stack{grid-column:1/-1}
  .product-settings>.switch-row{align-self:end;min-height:42px}
  .product-settings .price-row{grid-template-columns:repeat(2,minmax(0,1fr));grid-column:1/-1}
}

@media(max-width:900px){
  body.sidebar-open{overflow:hidden}
  .sidebar{width:min(84vw,290px);padding:20px 16px;transform:translateX(-102%);box-shadow:none}
  .sidebar.open{transform:translateX(0);box-shadow:24px 0 50px rgba(0,0,0,.28)}
  .sidebar-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.42);z-index:25;opacity:0;pointer-events:none;transition:.2s;display:block}
  .sidebar-backdrop.show{opacity:1;pointer-events:auto}
  .topbar{min-height:70px;height:auto;padding:10px 14px;gap:10px}
  .menu-toggle{width:40px;height:40px;display:grid;place-items:center;border-radius:10px;background:#f4f5f6;flex:0 0 40px}
  .topbar>div:nth-child(2){flex:1}
  .top-actions{gap:6px}
  .top-actions .primary-btn{min-width:42px;min-height:42px;padding:0 12px}
  .content{padding:16px 12px 44px}
  .panel,.form-section{border-radius:12px}
  .form-section{padding:17px}
  .section-title{margin-bottom:15px;padding-bottom:15px}
  .form-grid.two{grid-template-columns:1fr}
  .form-grid .full{grid-column:auto}
  .product-settings{grid-template-columns:1fr 1fr;gap:10px}
  .product-settings .price-row{grid-template-columns:1fr 1fr}
  .new-image-preview-compact,.image-manager-compact{grid-template-columns:repeat(3,minmax(0,1fr))}
  .variant-fields-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .variant-image-options{grid-template-columns:repeat(3,minmax(0,1fr))}
  .filters-bar{grid-template-columns:1fr 1fr}
  .search-box{grid-column:1/-1}
}

@media(max-width:680px){
  .topbar>div:nth-child(2) span{display:none}
  .topbar>div:nth-child(2) strong{font-size:15px}
  .top-actions .ghost-btn{display:none}
  .top-actions .primary-btn{font-size:0;width:42px;padding:0}
  .top-actions .primary-btn i{font-size:15px}
  .content{padding:12px 10px 36px}
  .panel,.form-section{padding:14px}
  .section-title{gap:9px}
  .section-title>span{width:31px;height:31px;flex:0 0 31px}
  .section-title h2{font-size:18px}
  .section-title p{font-size:11px}
  .product-settings{grid-template-columns:1fr}
  .product-settings>*{grid-column:auto!important}
  .product-settings>.kicker,.product-settings>h2,.product-settings>.mode-explainer,.product-settings>.save-stack{grid-column:1!important}
  .product-settings .price-row{grid-template-columns:1fr;grid-column:1!important}
  .switch-row{min-height:44px}
  .upload-zone-compact{min-height:112px;padding:14px}
  .upload-zone-compact strong{font-size:16px}
  .new-image-preview-compact,.image-manager-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .new-image-preview-compact .preview-card img{height:95px}
  .image-item-compact img{height:105px}
  .gallery-toolbar-clean{align-items:flex-start;flex-direction:column}
  .gallery-toolbar-clean .ghost-btn{width:100%}
  .variant-toolbar{align-items:stretch;flex-direction:column}
  .variant-toolbar .ghost-btn{width:100%}
  .variant-fields-grid{grid-template-columns:1fr}
  .variant-image-options{grid-template-columns:repeat(2,minmax(0,1fr))}
  .variant-image-option img,.variant-image-empty{height:78px}
  .variant-card{padding:12px;border-radius:13px}
  .variant-card-head{gap:10px}
  .variant-card-title{font-size:15px}
  .variant-remove{width:38px;height:38px;flex:0 0 38px}
  .filters-bar{grid-template-columns:1fr}
  .search-box{grid-column:auto}
  .stats-grid{grid-template-columns:1fr 1fr}
  .stat-card{padding:12px;gap:10px}
  .stat-card strong{font-size:22px}
  .welcome-card{padding:20px}
  .welcome-card h1{font-size:28px}
  .panel-head{align-items:flex-start;flex-direction:column}
  table{min-width:640px}
}

@media(max-width:430px){
  .brand{padding-bottom:18px}.brand-mark{font-size:30px}
  .sidebar nav a{padding:10px 11px;font-size:13px}
  .topbar{padding:8px 10px}
  .content{padding:10px 8px 30px}
  .new-image-preview-compact,.image-manager-compact,.variant-image-options{grid-template-columns:1fr}
  .preview-card,.image-item-compact,.variant-image-option{max-width:100%}
  .new-image-preview-compact .preview-card img,.image-item-compact img{height:150px}
  .variant-image-option img,.variant-image-empty{height:130px}
  .stats-grid{grid-template-columns:1fr}
  .stat-card{min-height:76px}
  .welcome-card h1{font-size:25px}
  .welcome-card p{font-size:13px}
  .login-panel{padding:14px}.login-card{padding:20px}
}

/* IDEAS CMS Fase 1.1.4 - Dark Mode */
html{color-scheme:light}
html[data-theme="dark"]{color-scheme:dark}
.theme-toggle{position:relative;width:72px;height:38px;border:1px solid var(--line);border-radius:999px;background:#f1f3f5;display:flex;align-items:center;justify-content:space-between;padding:0 10px;cursor:pointer;overflow:hidden;transition:.22s ease;flex:0 0 auto}.theme-icon{position:relative;z-index:2;font-size:13px;display:grid;place-items:center;width:20px;height:20px}.theme-icon-sun{color:#e0a400}.theme-icon-moon{color:#667085}.theme-toggle-knob{position:absolute;z-index:1;width:28px;height:28px;left:4px;top:4px;border-radius:50%;background:#fff;box-shadow:0 4px 12px rgba(0,0,0,.12);transition:.22s cubic-bezier(.2,.8,.2,1)}
html[data-theme="dark"] .theme-toggle-knob{transform:translateX(34px);background:#222831}
html[data-theme="dark"] .theme-toggle{background:#161b22;border-color:#30363d}
html[data-theme="dark"] .theme-icon-sun{color:#727a84}
html[data-theme="dark"] .theme-icon-moon{color:#d7e6ff}

html[data-theme="dark"] body{background:#0d1117;color:#f2f5f8}
html[data-theme="dark"] body,
html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .main{--ink:#f2f5f8;--ink2:#dce2e8;--paper:#161b22;--soft:#0d1117;--soft2:#21262d;--line:#30363d;--muted:#98a2ad;--red:#ff2a32;--red2:#d91f27;--green:#2cc985}
html[data-theme="dark"] .topbar{background:rgba(13,17,23,.94);border-bottom-color:#30363d}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .install-card,
html[data-theme="dark"] .variant-card,
html[data-theme="dark"] .image-item,
html[data-theme="dark"] .preview-card{background:#161b22;border-color:#30363d}
html[data-theme="dark"] .welcome-card{background:linear-gradient(125deg,#13171d,#1c2128)}
html[data-theme="dark"] .stat-card i{background:#32171b;color:#ff565d}
html[data-theme="dark"] .mini-img,
html[data-theme="dark"] .products-table .thumb,
html[data-theme="dark"] .variant-image-empty,
html[data-theme="dark"] .variant-empty-state,
html[data-theme="dark"] .image-item-compact img,
html[data-theme="dark"] .new-image-preview-compact .preview-card img,
html[data-theme="dark"] .variant-image-option img{background:#0f141a}
html[data-theme="dark"] .mini-list>a,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .variant-card-head{border-color:#30363d}
html[data-theme="dark"] .roadmap li.done{color:#e8edf2}
html[data-theme="dark"] .primary-btn{background:#ed1c24;border-color:#ed1c24;color:#fff}
html[data-theme="dark"] .primary-btn:hover{background:#c8171d}
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .tiny-btn,
html[data-theme="dark"] .link-btn,
html[data-theme="dark"] .variant-image-option,
html[data-theme="dark"] .theme-toggle{color:#eef2f6}
html[data-theme="dark"] .ghost-btn,
html[data-theme="dark"] .tiny-btn,
html[data-theme="dark"] .variant-image-option{background:#161b22;border-color:#30363d}
html[data-theme="dark"] .ghost-btn:hover,
html[data-theme="dark"] .tiny-btn:hover,
html[data-theme="dark"] .variant-image-option:hover{border-color:#515a65;background:#1c222a}
html[data-theme="dark"] .variant-image-option.selected{border-color:#ff3038;box-shadow:0 0 0 3px rgba(255,48,56,.12);background:#1b1719}
html[data-theme="dark"] .primary-tag{background:#123326;color:#6ed7a6;border-color:#20513d}
html[data-theme="dark"] .tiny-btn.danger{color:#ff6b71}
html[data-theme="dark"] .variant-remove{background:#2a171a;border-color:#4e262a;color:#ff6168}
html[data-theme="dark"] .upload-zone{background:#11161c;border-color:#3a424c}
html[data-theme="dark"] .upload-zone:hover{background:#171417;border-color:#ff444b}
html[data-theme="dark"] .gallery-toolbar small,
html[data-theme="dark"] .variant-toolbar small,
html[data-theme="dark"] .image-card-meta span,
html[data-theme="dark"] .variant-image-picker-head span,
html[data-theme="dark"] .variant-card-head span{color:#98a2ad}
html[data-theme="dark"] .mode-explainer,
html[data-theme="dark"] .variant-note,
html[data-theme="dark"] .variant-empty-state{background:#11161c;color:#9fa8b3}
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select,
html[data-theme="dark"] .filters-bar input,
html[data-theme="dark"] .filters-bar select,
html[data-theme="dark"] .form-stack input,
html[data-theme="dark"] .form-stack textarea,
html[data-theme="dark"] .form-stack select,
html[data-theme="dark"] .form-grid input,
html[data-theme="dark"] .form-grid textarea,
html[data-theme="dark"] .form-grid select,
html[data-theme="dark"] .product-settings input,
html[data-theme="dark"] .product-settings select,
html[data-theme="dark"] .variant-fields-grid input,
html[data-theme="dark"] .variant-fields-grid select{background:#0f141a!important;border-color:#30363d!important;color:#f0f3f6!important}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#69727d}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus{border-color:#ff5960!important;box-shadow:0 0 0 3px rgba(237,28,36,.14)!important}
html[data-theme="dark"] select option{background:#11161c;color:#f2f5f8}
html[data-theme="dark"] .alert.success{background:#102d22;color:#79d9aa}
html[data-theme="dark"] .alert.error{background:#35171b;color:#ff8e93}
html[data-theme="dark"] .status{background:#252b33;color:#c2cad3}
html[data-theme="dark"] .status.published{background:#123326;color:#70d8a8}
html[data-theme="dark"] .status.draft{background:#382d13;color:#e4bd60}
html[data-theme="dark"] .status.archived{background:#262c34;color:#aab3bd}
html[data-theme="dark"] .mode-pill.quote{background:#35171b;color:#ff9397}
html[data-theme="dark"] .mode-pill.buy{background:#123326;color:#70d8a8}
html[data-theme="dark"] .mode-pill.both{background:#1e2540;color:#9fabff}
html[data-theme="dark"] .section-title>span{background:#35171b;color:#ff5a61}
html[data-theme="dark"] .preview-remove{background:#161b22;border-color:#30363d;color:#ff646a}
html[data-theme="dark"] .drag-handle{background:#161b22;border-color:#30363d;color:#9ba5af}
html[data-theme="dark"] .sidebar{background:#090c10}
html[data-theme="dark"] .sidebar nav a:hover,
html[data-theme="dark"] .sidebar nav a.active{background:#181d24}
html[data-theme="dark"] .sidebar-bottom{border-top-color:#232931}
html[data-theme="dark"] .sidebar-backdrop{background:rgba(0,0,0,.65)}
html[data-theme="dark"] .login-panel,
html[data-theme="dark"] .install-page{background:#0d1117}
html[data-theme="dark"] .login-note{border-top-color:#30363d;color:#7f8994}
html[data-theme="dark"] .table-wrap{scrollbar-color:#444b55 #11161c}
html[data-theme="dark"] ::selection{background:#7f1d22;color:#fff}

@media(max-width:900px){.theme-toggle{width:66px;height:36px}.theme-toggle-knob{width:26px;height:26px;top:4px}.top-actions{align-items:center}.topbar-title{min-width:0}.topbar-title strong,.topbar-title span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46vw}}
@media(max-width:600px){.theme-toggle{width:60px;height:34px;padding:0 8px}.theme-toggle-knob{width:24px;height:24px}.theme-icon{font-size:11px}.top-actions{gap:6px}}

/* Fase 1.1.4.1 - hotfix toggle */
.top-actions .theme-toggle{
  appearance:none!important;
  -webkit-appearance:none!important;
  box-sizing:border-box!important;
  width:72px!important;
  min-width:72px!important;
  max-width:72px!important;
  height:38px!important;
  min-height:38px!important;
  padding:0 9px!important;
  border-radius:999px!important;
  display:flex!important;
  flex-direction:row!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:0!important;
  overflow:hidden!important;
  line-height:1!important;
}
.top-actions .theme-toggle .theme-icon{display:grid!important;place-items:center!important;width:20px!important;height:20px!important;line-height:1!important}
.top-actions .theme-toggle .theme-toggle-knob{display:block!important}
@media(max-width:600px){.top-actions .theme-toggle{width:64px!important;min-width:64px!important;max-width:64px!important;height:34px!important;min-height:34px!important}}
