.admin-main{max-width:900px;margin:auto;padding:22px 14px 115px}.admin-main h1{margin:6px 0;font-size:26px;font-weight:950}.admin-main h2{margin:0 0 11px;font-size:20px;color:var(--gold)}.panel{border:1px solid #776340;border-radius:14px;background:#141518;padding:17px;margin:15px 0}.panel label{display:block;font-size:12px;font-weight:700;color:#e1ce9e}.panel label input{display:block;margin-top:9px;width:100%;background:#202124;color:white;border:1px solid #7c6a4a;border-radius:10px;padding:13px;font-size:16px}.goldbtn{background:linear-gradient(#ffe499,#daa139);color:#1b1509!important;border:1px solid #f3c76e!important;border-radius:10px;padding:13px 15px;min-height:45px;font-size:12px;font-weight:900}.panel .goldbtn{width:100%;margin-top:13px}.back{color:var(--gold);border:1px solid #7d6843;border-radius:8px;padding:10px;font-size:11px;font-weight:900;text-decoration:none;white-space:nowrap}.brandcopy span{white-space:normal}.admin-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:17px 0}.admin-stats>div{border:1px solid #55442e;border-radius:10px;background:#1c1b1b;padding:12px 9px}.admin-stats span{display:block;color:#baa888;font-size:10px}.admin-stats strong{display:block;font-size:16px;margin-top:4px;color:#f9ce7a;overflow-wrap:anywhere}.admin-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.admin-buttons>button{flex:1 1 125px;border:1px solid #706149;border-radius:9px;background:#222126;color:#e9d4a3;min-height:44px;padding:10px;font-size:11px;font-weight:800}.editor-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.editor-card{border:1px solid #665638;border-radius:12px;padding:12px;background:#151518}.editor-card h3{color:var(--gold);font-size:12px;margin:0 0 12px}.editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.editor-grid label{display:block;color:#afaa9c;font-size:10px;font-weight:700}.editor-grid label.wide{grid-column:1/-1}.editor-grid input,.editor-grid select{display:block;width:100%;margin-top:4px;background:#232427;color:white;border:1px solid #5e543f;border-radius:7px;padding:10px 8px;font-size:16px;min-width:0;min-height:44px}.editor-grid input[type=checkbox]{width:19px;height:19px;min-height:0;margin-top:7px;accent-color:var(--gold)}.delete-row{margin-top:12px;width:100%;padding:10px;background:#2d1d1d;color:#f4a2a2;border:1px solid #865151;border-radius:8px;min-height:42px}.publish-bar{position:sticky;bottom:0;background:linear-gradient(#181716,#090909);border:1px solid #85652d;border-radius:12px;padding:11px;display:flex;align-items:center;gap:10px;justify-content:space-between;margin:18px 0;z-index:10}.publish-bar span{color:#d2bf99;font-size:11px}.publish-bar .goldbtn{min-width:160px}.publish-bar .goldbtn:disabled{opacity:.55;cursor:not-allowed}#loginView[hidden],#editorView[hidden],.admin-message[hidden]{display:none}.admin-message{position:fixed;bottom:calc(17px + env(safe-area-inset-bottom,0px));left:50%;transform:translateX(-50%);background:#332a1d;border:1px solid #c79c51;padding:13px 17px;width:min(450px,95vw);z-index:50;color:white;border-radius:8px;font-size:13px;text-align:center}
@media(max-width:650px){.editor-list{grid-template-columns:1fr}.publish-bar{bottom:calc(4px + env(safe-area-inset-bottom,0px))}.publish-bar .goldbtn{min-width:150px}.back{padding:8px 9px}.brandcopy strong{font-size:25px}.admin-stats strong{font-size:13px}.admin-stats span{font-size:9px}}

#artworkPanel[hidden]{display:none}.image-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:10px}.artwork-sample{display:flex;flex-direction:column;align-items:center;text-align:center;gap:5px;padding:8px;border:1px solid #615134;border-radius:10px;background:#101116}.artwork-sample img{width:100%;height:108px;object-fit:contain}.artwork-sample b{font-size:11px;color:#e7d3a4}.artwork-sample code{font-size:11px;color:#b5a07e}.category-guide{display:flex;flex-wrap:wrap;gap:7px}.category-guide span{font-size:10px;letter-spacing:.4px;border:1px solid #725c3d;padding:8px;border-radius:7px;color:#e0ca98}.editor-art{display:flex;align-items:center;gap:10px;margin:0 0 10px;padding:7px;background:#1d1c1a;border:1px solid #51422a;border-radius:9px}.editor-art img{height:75px;width:75px;object-fit:contain;border-radius:7px}.editor-art span{font-size:10px;line-height:1.4;color:#e0c99a;font-weight:700}.panel h3{font-size:13px;color:#ddbd7b;margin:17px 0 10px}

/* WYSIWYG labels: the editor uses the same per-item art as the storefront. */
.editor-art .editor-art-image{
  flex:0 0 78px;
  display:grid;
  place-items:center;
  height:78px;
  width:78px;
  overflow:hidden;
  border-radius:8px;
  background:#07080b;
}
.editor-art .editor-art-image svg.product-illustration{
  display:block;width:100%;height:100%;max-width:100%;max-height:100%;
}
.artwork-sample-preview{
  height:108px;
  width:100%;
  display:grid;
  place-items:center;
  overflow:hidden;
}
.artwork-sample-preview svg.product-illustration{
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
}


/* Cleaner two-stat header after removing the Live Version tile. */
.admin-stats{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Override the generic gray .admin-buttons > button styling with active gold CTAs. */
#addItem,#openBulk,#parseBulk{
  background:linear-gradient(180deg,#ffe7a8 0%,#e8b84f 51%,#cf9430 100%);
  color:#211607!important;
  border:1px solid #ffe29b;
  box-shadow:0 2px 12px #c08f2940,inset 0 1px #fff3c2;
  opacity:1;
  font-weight:950;
  cursor:pointer;
}
#addItem:hover,#openBulk:hover,#parseBulk:hover{filter:brightness(1.08)}
#addItem:focus-visible,#openBulk:focus-visible,#parseBulk:focus-visible{
  outline:2px solid #ffe9a5;outline-offset:3px;
}

/* Make a newly added Item 1 immediately obvious after scrolling into view. */
.editor-card-new{
  border:2px solid #f6c65b;
  box-shadow:0 0 0 2px #f6c65b40,0 0 20px #d6a04440;
  background:linear-gradient(160deg,#2b2418,#151518 65%);
  scroll-margin-top:calc(90px + env(safe-area-inset-top,0px));
}

/* Managed image/category library: touch-friendly photo drops, thumbnails and removal. */
.new-category-form{margin:18px 0 14px;padding:13px;border:1px solid #725932;border-radius:12px;background:#171613}
.new-category-form>label{display:block;margin-bottom:8px;color:#f5d69c;font-weight:900;font-size:11px;letter-spacing:.5px}
.category-create-row{display:flex;gap:9px;align-items:stretch}
.category-create-row input{min-width:0;flex:1;background:#202124;color:white;border:1px solid #857145;border-radius:9px;font-size:15px;padding:12px}
.category-create-row .goldbtn{min-width:137px;width:auto;flex:0 0 auto;margin-top:0;padding:10px 12px}
.artwork-status{min-height:20px;color:#e6c47d;font-size:12px;font-weight:750;line-height:1.45}
.image-library{display:grid;gap:15px}
.photo-category{border:1px solid #645238;border-radius:12px;background:#101114;padding:12px;min-width:0}
.photo-category-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px}
.photo-category-heading h3{margin:0!important;font-size:14px;color:#f6d28a}
.photo-category-heading small{font-size:10px;color:#a89e8d}
.remove-category{font-size:10px;font-weight:850;padding:9px 10px;border:1px solid #915c55;border-radius:8px;color:#ffc6bb;background:#271a1a}
.photo-drop-zone{position:relative;min-height:115px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:7px;border:2px dashed #ad894d;border-radius:12px;background:radial-gradient(ellipse at center,#48351844,#151312);color:#f9dbaa;cursor:pointer;padding:14px;outline-offset:3px}
.photo-drop-zone.drag-over{border-color:#ffe6a4;background:#5e452e66;box-shadow:0 0 0 3px #caa05555}
.photo-drop-zone .upload-icon{font-size:26px;font-weight:900;line-height:1}
.photo-drop-zone strong{letter-spacing:.9px;font-size:12px}
.photo-drop-zone small{color:#c2b49b;font-size:11px}
.image-thumb-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(112px,1fr));gap:9px;padding-top:12px}
.image-thumb{min-width:0;background:#191919;border:1px solid #655133;border-radius:9px;padding:7px;display:flex;flex-direction:column;align-items:stretch;gap:6px}
.image-thumb img{width:100%;height:100px;object-fit:contain;background:#090909;border-radius:6px}
.image-thumb span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:10px;color:#e3d3b4}
.image-thumb button{min-height:32px;border:1px solid #704742;color:#ffd5cf;background:#2a1a19;border-radius:6px;font-size:9px;font-weight:900}
#viewArtwork{background:linear-gradient(180deg,#ffe7a8 0%,#e8b84f 51%,#cf9430 100%);color:#211607!important;border:1px solid #ffe29b;font-weight:950}
@media(max-width:480px){.category-create-row{flex-direction:column}.category-create-row .goldbtn{width:100%}.photo-category{padding:10px}.image-thumb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Image Type photo library is independent of product category management. */
.type-image-row{display:grid;grid-template-columns:150px minmax(0,1fr);gap:15px;align-items:center}
.type-preview{aspect-ratio:1/1;width:100%;max-height:185px;background:#08090b;border:1px solid #655130;border-radius:12px;display:grid;place-items:center;padding:7px;overflow:hidden}
.type-preview img,.type-preview svg.product-illustration{display:block;max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}
.type-photo-controls{min-width:0;display:flex;flex-direction:column;gap:10px}
.type-photo-controls .photo-drop-zone{min-height:115px}
.type-clear-photo{align-self:stretch;min-height:39px;border:1px solid #9d624f;border-radius:8px;background:#2b1917;color:#ffd7c8;font-weight:900;font-size:11px}
.type-fallback-note{color:#c7ac7c;font-size:11px;line-height:1.45;margin:0}
.manage-category-heading{margin:26px 0 7px!important;padding-top:17px;border-top:1px solid #6d5937;color:#f2cf8b}
.category-library{display:grid;gap:8px}
.category-row{display:flex;align-items:center;justify-content:space-between;gap:11px;flex-wrap:wrap;padding:11px 12px;border:1px solid #685338;border-radius:10px;background:#151416}
.category-row>strong{font-size:12px;color:#ead5a4;overflow-wrap:anywhere}
.category-row>.remove-category{flex:0 0 auto}
.legacy-photos{width:100%;padding:10px;border-top:1px solid #65513b;display:grid;gap:8px}
.legacy-photos>small{color:#ae9a7c}
.legacy-photo{display:flex;align-items:center;gap:8px;min-width:0}
.legacy-photo img{height:47px;width:45px;object-fit:contain;border-radius:5px;background:#09090c}
.legacy-photo span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}
.legacy-photo button{border:1px solid #a86f51;color:#ffe1d3;background:#271b19;border-radius:6px;padding:7px;font-size:9px;font-weight:850}
@media(max-width:550px){.type-image-row{grid-template-columns:95px minmax(0,1fr);gap:8px}.type-preview{padding:3px}.type-photo-controls .photo-drop-zone{min-height:110px;padding:8px}.photo-category-heading h3{font-size:12px}.remove-category{font-size:9px}}


/* In-place category rename controls, usable on phones and desktop. */
.category-row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-left:auto}
.category-row-actions>button{min-height:37px;border-radius:8px;padding:8px 10px;font-size:10px;font-weight:850;white-space:nowrap}
.category-row-actions .edit-category{border:1px solid #c4a05c;background:#372a17;color:#ffe2a6}
.category-rename-form{width:100%;display:grid;gap:10px;padding:12px;background:#221d16;border:1px solid #8c7347;border-radius:10px}
.category-rename-form[hidden]{display:none}
.category-rename-form label{font-size:11px;color:#ddc797}
.category-rename-form input{display:block;width:100%;margin-top:6px;background:#101012;color:#fff;border:1px solid #8c7347;border-radius:8px;padding:10px;font-size:16px}
.category-rename-actions{display:flex;gap:8px;align-items:center}
.panel .category-rename-actions .goldbtn{width:auto;flex:1;margin:0;min-height:42px}
.category-rename-actions [data-cancel-category-rename]{flex:1;min-height:42px;border-radius:8px;border:1px solid #776856;background:#2a2a2c;color:#e6d8c2;font-size:11px;font-weight:850}
@media(max-width:470px){.category-row-actions{width:100%;margin-left:0}.category-row-actions>button{flex:1 1 125px}}
