body{background:#f4f6fb;color:#1f2937}.admin-shell{min-height:100vh}.admin-sidebar{position:fixed;inset:0 auto 0 0;width:255px;background:#111827;color:#cbd5e1;padding:1.2rem;overflow:auto}.admin-brand{display:flex;gap:.7rem;align-items:center;color:#fff;text-decoration:none;font-size:1.25rem;font-weight:800;padding:.5rem}.admin-brand span{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:linear-gradient(135deg,#7c3aed,#f97316)}.admin-nav{display:grid;gap:.3rem;margin-top:1.4rem}.admin-nav a{color:#cbd5e1;text-decoration:none;padding:.72rem .8rem;border-radius:12px;font-weight:600}.admin-nav a:hover,.admin-nav a.active{background:#7c3aed;color:#fff}.admin-content{margin-left:255px;padding:1.5rem}.admin-topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:1.3rem}.card-stat,.admin-card{background:#fff;border:1px solid #e9edf4;border-radius:18px;box-shadow:0 8px 25px rgba(15,23,42,.04)}.card-stat{padding:1.2rem}.card-stat i{font-size:1.8rem;color:#7c3aed}.admin-card{padding:1.2rem}.table img{width:52px;height:52px;object-fit:cover;border-radius:10px}.form-section{background:#f8fafc;border-radius:15px;padding:1rem;margin-bottom:1rem}.btn{border-radius:11px;font-weight:650}.color-input{height:45px}.thumb-admin{position:relative;display:inline-block}.thumb-admin img{width:90px;height:90px;object-fit:cover;border-radius:12px}.badge-status{padding:.35rem .6rem;border-radius:999px;font-size:.75rem}.login-page{min-height:100vh;background:radial-gradient(circle at top left,#7c3aed,#111827 55%);display:grid;place-items:center;padding:1rem}.login-card{width:min(440px,100%);background:#fff;border-radius:24px;padding:2rem;box-shadow:0 30px 80px rgba(0,0,0,.3)}@media(max-width:900px){.admin-sidebar{position:static;width:100%;height:auto}.admin-content{margin-left:0}.admin-nav{grid-template-columns:repeat(2,1fr)}.admin-topbar{align-items:flex-start;gap:1rem}.admin-shell{display:block}}

/* Product photo manager — v0.1.1 */
.product-gallery-section{background:#fff;border:1px solid #e7ebf2;padding:1.25rem}.gallery-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.gallery-kicker{display:inline-flex;align-items:center;gap:.45rem;color:#1f5eff;font-size:.82rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;margin-bottom:.35rem}.product-photo-dropzone{display:flex;min-height:270px;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:2rem;border:2px dashed #75a1ff;border-radius:20px;background:radial-gradient(circle at 12% 85%,rgba(255,214,10,.22),transparent 25%),radial-gradient(circle at 90% 15%,rgba(59,130,246,.15),transparent 25%),linear-gradient(135deg,#f8fbff,#fffef5);cursor:pointer;transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease}.product-photo-dropzone:hover,.product-photo-dropzone.is-dragover{border-color:#1f5eff;box-shadow:0 15px 35px rgba(31,94,255,.14);transform:translateY(-2px)}.product-photo-dropzone strong{font-size:1.45rem;color:#172033;margin-top:.85rem}.product-photo-dropzone>span:not(.photo-plus):not(.photo-counter){color:#475569;margin-top:.25rem}.product-photo-dropzone small{color:#7c8799;margin-top:.3rem}.photo-plus{display:grid;place-items:center;width:76px;height:76px;border-radius:50%;background:linear-gradient(135deg,#1f5eff,#7047eb);color:#fff;font-size:2.2rem;box-shadow:0 14px 30px rgba(31,94,255,.3)}.photo-counter{display:inline-flex;align-items:center;margin-top:1rem;padding:.55rem .9rem;border:1px solid #b7ccff;border-radius:999px;background:#fff;color:#1f5eff;font-size:.9rem;font-weight:700}.photo-manager-grid{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:1rem}.photo-list-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:.8rem}.product-photo-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem}.product-photo-card{position:relative;background:#fff;border:2px solid #e5eaf2;border-radius:16px;overflow:hidden;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}.product-photo-card:hover{border-color:#a8c1ff;box-shadow:0 10px 24px rgba(15,23,42,.08)}.product-photo-card.is-primary{border-color:#1f5eff;box-shadow:0 0 0 3px rgba(31,94,255,.10)}.product-photo-card.is-dragging{opacity:.45;transform:scale(.98)}.product-photo-card.drag-target{border-color:#ffcc00;box-shadow:0 0 0 4px rgba(255,204,0,.18)}.photo-card-image{position:relative;aspect-ratio:1/1;background:#f1f4f8}.photo-card-image img{display:block;width:100%;height:100%;object-fit:cover}.photo-primary-badge{display:none;position:absolute;top:.55rem;left:.55rem;align-items:center;padding:.35rem .55rem;border-radius:999px;background:#1f5eff;color:#fff;font-size:.72rem;font-weight:800;box-shadow:0 5px 14px rgba(31,94,255,.28)}.product-photo-card.is-primary .photo-primary-badge{display:inline-flex}.photo-drag-handle{position:absolute;top:.5rem;right:.5rem;display:grid;place-items:center;width:32px;height:32px;border:0;border-radius:10px;background:rgba(255,255,255,.93);color:#334155;cursor:grab;box-shadow:0 4px 12px rgba(15,23,42,.16)}.photo-drag-handle:active{cursor:grabbing}.photo-card-actions{display:grid;grid-template-columns:1fr auto;gap:.4rem;padding:.55rem}.photo-card-actions .btn{font-size:.76rem;padding:.4rem .5rem}.photo-empty-state{min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1px dashed #cad4e3;border-radius:16px;background:#f8fafc;color:#64748b;padding:1rem}.photo-empty-state i{font-size:2rem;color:#94a3b8;margin-bottom:.35rem}.photo-empty-state strong{color:#334155}.photo-limit-message{display:flex;align-items:center;gap:.55rem;padding:.7rem .85rem;border-radius:12px;background:#edf4ff;color:#2454c6;font-size:.88rem}.photo-preview-panel{align-self:start;border:1px solid #e4e9f1;border-radius:16px;background:#fff;padding:.85rem;position:sticky;top:1rem}.photo-preview-frame{aspect-ratio:1/1;border-radius:13px;overflow:hidden;background:#f3f5f9}.photo-preview-frame img{display:block;width:100%;height:100%;object-fit:cover}.photo-preview-placeholder{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#94a3b8;gap:.4rem}.photo-preview-placeholder i{font-size:2rem}.photo-tip-popover{margin-top:.8rem;padding:.8rem 1rem;border-radius:14px;background:#fff8db;border:1px solid #ffe188;color:#5c4b00}.photo-tip-popover ul{margin:.35rem 0 0;padding-left:1.1rem}.photo-tip-popover li+li{margin-top:.2rem}
@media(max-width:1200px){.product-photo-list{grid-template-columns:repeat(2,minmax(0,1fr))}.photo-manager-grid{grid-template-columns:1fr}.photo-preview-panel{position:static;display:grid;grid-template-columns:180px 1fr;gap:1rem;align-items:center}.photo-preview-panel>div:first-child{grid-column:1/-1}}
@media(max-width:700px){.gallery-heading,.photo-list-header{align-items:stretch;flex-direction:column}.product-photo-dropzone{min-height:230px;padding:1.2rem}.product-photo-list{grid-template-columns:1fr 1fr}.photo-preview-panel{display:block}.photo-card-actions{grid-template-columns:1fr}.photo-card-actions .btn{width:100%}}
@media(max-width:430px){.product-photo-list{grid-template-columns:1fr}.product-photo-dropzone strong{font-size:1.2rem}.photo-plus{width:64px;height:64px}}

/* Correções de contenção e cache — v0.1.2 */
.product-gallery-section{overflow:hidden}
.product-gallery-section img{max-width:100%}
.product-photo-list,.product-photo-card,.photo-card-image,.photo-preview-frame{min-width:0;max-width:100%}
.photo-card-image,.photo-preview-frame{overflow:hidden}
.photo-card-image img,.photo-preview-frame img{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;object-fit:cover!important}
@media(max-width:900px){.admin-content{overflow-x:hidden}}

/* Editor visual da descrição — v0.1.3 */
.rich-text-editor{overflow:hidden;border:1px solid #dce3ec;border-radius:16px;background:#fff;box-shadow:0 4px 16px rgba(15,23,42,.04)}
.rich-editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.38rem;padding:.65rem;border-bottom:1px solid #e8edf3;background:#f8fafc;position:sticky;top:0;z-index:2}
.rich-editor-toolbar .form-select{width:auto;min-width:118px}
.rich-editor-toolbar .btn{min-width:36px;display:inline-flex;align-items:center;justify-content:center}
.rich-color-control{display:inline-flex;align-items:center;gap:.35rem;height:32px;padding:0 .45rem;border:1px solid #dee2e6;border-radius:9px;background:#fff;cursor:pointer;color:#475569}
.rich-color-control input{width:24px;height:22px;border:0;padding:0;background:transparent;cursor:pointer}
.rich-editor-surface,.rich-editor-source{width:100%;min-height:320px;padding:1rem 1.1rem;border:0;outline:0;background:#fff;color:#1f2937;line-height:1.65;overflow-wrap:anywhere}
.rich-editor-surface:empty:before{content:attr(data-placeholder);color:#94a3b8;pointer-events:none}
.rich-editor-surface h2{font-size:2rem;font-weight:800;margin:1.1rem 0 .65rem}.rich-editor-surface h3{font-size:1.55rem;font-weight:750;margin:1rem 0 .55rem}.rich-editor-surface h4{font-size:1.25rem;font-weight:700;margin:.9rem 0 .45rem}
.rich-editor-surface p{margin:0 0 .8rem}.rich-editor-surface blockquote{border-left:4px solid #7c3aed;background:#f5f3ff;padding:.8rem 1rem;margin:1rem 0;border-radius:0 10px 10px 0}.rich-editor-surface a{color:#0d6efd;text-decoration:underline}.rich-editor-surface img{max-width:100%;height:auto;border-radius:12px}.rich-editor-surface table{width:100%;border-collapse:collapse}.rich-editor-surface th,.rich-editor-surface td{padding:.65rem;border:1px solid #dbe2ea}
.rich-editor-source{display:block;resize:vertical;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;font-size:.9rem;white-space:pre-wrap}
.rich-editor-footer{display:flex;justify-content:space-between;gap:1rem;padding:.55rem .8rem;border-top:1px solid #e8edf3;background:#fbfcfe;color:#64748b;font-size:.78rem}
@media(max-width:700px){.rich-editor-toolbar .form-select{flex:1;min-width:130px}.rich-editor-toolbar .ms-auto{margin-left:0!important}.rich-editor-surface,.rich-editor-source{min-height:260px}.rich-editor-footer{flex-direction:column;gap:.2rem}}
