/* TC Componentes · Espaço de gestão. Paleta oficial da marca. */
:root{--green:#00361e;--olive:#5e7c22;--yellow:#ffde80;--black:#000;--gray:#c7cdd6;--paper:#071c14;--surface:#0d2b20;--surface-raised:#123729;--white:#fff;--ink:#e5ece6;--muted:#b6c5b9;--line:#2c4b39;--accent-text:#c5d69c;color-scheme:dark;--radius:14px;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit}button{cursor:pointer}a{color:inherit}button,a,input,textarea,select,summary{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--olive);outline-offset:3px}button:disabled,fieldset:disabled button{cursor:wait;opacity:.55}[hidden]{display:none!important}h1,h2,h3,p{margin-top:0}h1,h2,h3{font-weight:600;line-height:1.15;letter-spacing:-.035em}h1{font-size:clamp(30px,3vw,44px);margin-bottom:14px}h2{font-size:21px}h3{font-size:19px}button{transition:background-color .18s,color .18s,border-color .18s}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.app{display:grid;grid-template-columns:232px minmax(0,1fr);min-height:100svh}.sidebar{background:var(--green);color:var(--white);padding:36px 22px;display:flex;flex-direction:column;position:sticky;top:0;height:100svh}.brand{display:block;padding:0 8px 35px;border-bottom:1px solid #ffffff26}.brand img{display:block;width:145px;height:72px;object-fit:contain}.nav-label{font-size:9px;letter-spacing:.18em;color:var(--yellow);margin:30px 10px 14px}.nav{display:grid;gap:8px}.nav button{display:flex;align-items:center;gap:13px;background:none;color:#e0e8e0;border:0;border-radius:8px;padding:14px 12px;text-align:left;font-size:13px;min-height:48px}.nav svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;flex:none}.nav button:hover{background:#ffffff12}.nav button.active{color:var(--ink);background:var(--yellow);font-weight:650}.side-bottom{margin-top:auto;padding:30px 10px 0;font-size:9px;letter-spacing:.15em;line-height:1.9;color:#d5dfd1}.brand-line{display:block;width:30px;height:3px;background:var(--olive);margin-bottom:18px}.side-bottom a{display:flex;justify-content:space-between;margin-top:24px;font-size:12px;letter-spacing:0;text-decoration:none;color:var(--yellow)}
.main{min-width:0;width:100%;max-width:1600px;padding:0 clamp(20px,3.2vw,52px) 50px;margin:auto;align-self:start}.top{min-height:88px;display:flex;justify-content:space-between;align-items:center;gap:16px;border-bottom:1px solid var(--line)}.top p{margin:0;font-size:10px;letter-spacing:.09em;color:var(--muted)}.top p>span{margin:0 12px;color:var(--olive)}.top strong{font-weight:500}.logout{border:1px solid var(--line);background:transparent;color:var(--ink);border-radius:6px;padding:9px 13px;font-size:12px}.logout:hover{background:#1c4530}.view{display:none;min-width:0}.view.active{display:block}#global-status{font-size:11px;margin:10px 0;min-height:17px}.muted{font-size:13px;line-height:1.7;color:var(--muted)}.notice{font-size:12px;color:var(--muted);line-height:1.6}.notice-error{color:#9f3024}.eyebrow,.section-number{font-size:10px;font-weight:650;letter-spacing:.15em;line-height:1.5;color:var(--olive);margin-bottom:12px}.hero{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:26px 0}.hero p:last-child{margin-bottom:0}
.welcome{display:flex;justify-content:space-between;align-items:center;gap:30px;overflow:hidden;position:relative;padding:36px 40px;background:var(--green);color:var(--white);border-radius:var(--radius)}.welcome .eyebrow{color:var(--yellow)}.welcome h1{font-size:clamp(29px,3vw,46px);font-weight:500;max-width:620px;letter-spacing:-.045em}.welcome p:not(.eyebrow){color:#cbd9c8;font-size:13px;margin-bottom:22px}.welcome-action{display:inline-flex;align-items:center;gap:26px;border:0;border-bottom:1px solid #ffde8080;background:none;color:var(--yellow);padding:0 0 8px;font-size:13px}.welcome-mark{position:relative;flex:none;padding:15px 25px;border-left:1px solid #ffffff30;min-width:190px}.welcome-mark>span{display:block;font-size:96px;font-weight:750;line-height:.9;letter-spacing:-.09em;color:var(--yellow)}.welcome-mark small{font-size:8px;letter-spacing:.3em}.welcome-mark div{position:absolute;width:90px;height:90px;border:2px solid var(--olive);right:-35px;top:-10px;transform:rotate(14deg);pointer-events:none}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);margin:22px 0 30px}.card{padding:22px;border-right:1px solid var(--line)}.card:last-child{border-right:0}.card>span{display:block;font-size:8px;letter-spacing:.12em;color:var(--olive);font-weight:650}.card strong{display:block;font-size:40px;font-weight:500;line-height:1.1;margin:15px 0 8px;letter-spacing:-.06em}.card p{margin:0;font-size:12px;color:var(--muted)}.layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:22px;align-items:start}.panel{padding:26px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);min-width:0}.panel h2{margin-bottom:18px}.panel-header{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:20px}.panel-header h2{margin:0}.panel-header .section-number{font-size:9px;margin-bottom:8px}.quick{display:grid}.quick button{display:block;text-align:left;background:transparent;border:0;border-top:1px solid var(--line);padding:20px 0;color:var(--ink)}.quick button b{font-size:14px;font-weight:600}.quick button span{display:block;font-size:12px;color:var(--muted);margin-top:6px}.quick button:hover b{text-decoration:underline}
.primary,.secondary,.text-button,.icon-button{min-height:42px;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}.primary{border:1px solid var(--green);background:var(--green);color:var(--white);border-radius:7px;font-weight:600;padding:11px 18px;font-size:12px}.primary:hover:not(:disabled){background:#07562f}.secondary{border:1px solid #486448;background:var(--surface);color:var(--ink);border-radius:7px;padding:10px 14px;font-weight:600;font-size:12px}.secondary:hover:not(:disabled){background:#1c4530}.text-button{border:0;background:none;color:var(--ink);padding:8px 0;font-size:12px;font-weight:600;text-decoration:underline;text-underline-offset:3px}.danger{color:#983e32}.icon-button{width:44px;border:0;background:transparent;color:var(--ink);font-size:28px;flex:none}.row-actions{display:flex;gap:15px;align-items:center;flex-wrap:wrap}.badge{display:inline-flex;gap:5px;align-items:center;white-space:nowrap;border-radius:20px;background:#283c1d;color:#d0e2a2;font-size:10px;font-weight:650;padding:4px 9px}.badge:before{content:'';width:5px;height:5px;background:var(--olive);border-radius:50%}.badge.is-draft{background:#24352d;color:#c7cdd6}.badge.is-draft:before{background:#8a949e}
.catalog-tools{display:flex;align-items:end;gap:14px;flex-wrap:wrap;padding:20px;background:var(--surface);border:1px solid var(--line);border-radius:10px}.tc-search{display:flex;align-items:center;position:relative;margin:0;flex:1;min-width:210px}.tc-search:before{content:'';display:block;width:12px;height:12px;border:1.5px solid var(--olive);border-radius:50%;position:absolute;left:15px;top:14px}.tc-search:after{content:'';width:6px;height:1.5px;background:var(--olive);position:absolute;left:26px;top:27px;transform:rotate(45deg)}.tc-search input{width:100%;min-height:44px;border:1px solid var(--line);border-radius:6px;padding:11px 38px;background:#082318;color:var(--ink);font-size:12px}.tc-search button{position:absolute;right:5px;top:4px;height:36px;width:30px;border:0;background:transparent;font-size:21px;color:var(--muted)}.filter-label{display:grid;gap:5px;font-size:10px;color:var(--muted)}.filter-label select{min-height:44px;max-width:210px;padding:8px 28px 8px 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font-size:12px}.list-heading{display:flex;align-items:center;justify-content:space-between;margin:22px 0 12px;color:var(--muted);font-size:11px}.list-heading p{margin:0}.list-heading>span{font-size:8px;letter-spacing:.14em}.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,290px),1fr));gap:20px}.product-card{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.product-cover{position:relative;height:180px;background:#082318;display:grid;place-items:center;overflow:hidden}.product-cover img{width:100%;height:100%;object-fit:contain;display:block;padding:12px}.product-index{position:absolute;top:13px;left:13px;font-size:10px;letter-spacing:.1em;background:var(--green);color:var(--yellow);padding:4px 8px;border-radius:4px}.cover-empty{font-size:40px;letter-spacing:-4px;font-weight:750;color:#a5b497;text-align:center}.cover-empty small{display:block;font-size:10px;letter-spacing:0;font-weight:400;margin-top:8px}.product-info{padding:20px}.product-meta{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:13px}.product-meta>span:first-child{font-size:9px;letter-spacing:.1em;color:var(--olive);text-transform:uppercase;overflow-wrap:anywhere}.product-info h2{font-size:20px;margin:0 0 10px;overflow-wrap:anywhere}.product-info>p{font-size:12px;color:var(--muted);line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:41px}.product-info .row-actions{justify-content:space-between;gap:8px;border-top:1px solid var(--line);padding-top:16px;margin-top:18px}.product-info .primary{font-size:11px;padding:9px 12px}.empty-state{grid-column:1/-1;text-align:center;padding:50px 20px;background:var(--surface);border:1px dashed #486448;border-radius:12px}.empty-state>span{font-size:9px;letter-spacing:.2em;color:var(--olive)}.empty-state h2{margin:14px 0;font-size:24px}.empty-state p{color:var(--muted);font-size:13px}
.sheet{width:min(780px,96vw);max-width:96vw;max-height:94svh;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);padding:0;overflow:hidden;box-shadow:0 24px 100px #0003}.sheet[open]{display:flex;flex-direction:column}.sheet::backdrop{background:#001c14b8;backdrop-filter:blur(4px)}.category-sheet{width:min(580px,96vw)}.sheet-heading{display:flex;align-items:center;justify-content:space-between;flex:none;padding:22px 28px;border-bottom:1px solid var(--line);background:#123729;gap:15px}.sheet-heading h2{font-size:25px;margin:0}.sheet-heading .section-number{font-size:8px;margin:0 0 6px}.sheet-content{overflow-y:auto;min-height:0;padding:26px 28px;overscroll-behavior:contain}.editor label{display:block;font-size:12px;font-weight:600;margin:0 0 18px;color:var(--ink)}.editor label small{display:block;font-weight:400;color:var(--muted);font-size:11px;margin-top:4px;line-height:1.6}.editor input:not([type=checkbox]):not([type=hidden]),.editor textarea,.editor select{display:block;width:100%;max-width:100%;padding:12px;margin-top:8px;background:#082318;border:1px solid #486448;border-radius:6px;color:var(--ink);font-size:15px;line-height:1.5}.editor input[type=hidden]{display:none}.editor input:focus,.editor textarea:focus,.editor select:focus{border-color:var(--olive);outline:none;box-shadow:0 0 0 2px #5e7c221c}.editor textarea{min-height:130px;resize:vertical}.editor .check{display:flex;align-items:center;gap:10px;margin-bottom:0;line-height:1.7}.check input{accent-color:var(--ink);width:18px;height:18px;flex:none}.form-row{display:grid;grid-template-columns:1.3fr 1fr;gap:18px}.publication{border:1px solid #3e5c35;border-radius:8px;padding:16px;background:#153922}.publication>small{display:block;margin:6px 0 0 28px;color:var(--muted);font-size:11px}.advanced{margin:18px 0;border-bottom:1px solid var(--line);padding-bottom:14px}.advanced summary{cursor:pointer;color:var(--muted);font-size:12px;font-weight:500}.advanced[open] summary{margin-bottom:16px}.save-row{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:20px 0 8px}.save-row>span{font-size:12px;color:var(--olive);line-height:1.6}.save-row button{flex:none}hr{border:0;border-top:1px solid var(--line);margin:30px 0}fieldset{padding:0;border:0;margin:0;min-width:0}fieldset:disabled{opacity:.65}#product-photos h3{font-size:24px;margin-bottom:10px}.file-drop{padding:20px;border:1px dashed #5e7c22;border-radius:8px;background:#0a2419}.editor .file-drop input{background:var(--surface);padding:8px;font-size:12px}#upload-preview{display:block;width:100%;max-height:220px;object-fit:contain;margin:12px 0;border-radius:8px;background:#082318}.photo-list{display:grid;gap:12px;margin-top:18px}#search-photos-form{margin-top:24px}.photo-item{display:flex;gap:16px;padding:12px;border:1px solid var(--line);border-radius:8px;align-items:center;min-width:0}.photo-item img{width:90px;height:90px;object-fit:contain;background:#082318;border-radius:4px;flex:none}.photo-item p{font-size:12px;margin:0 0 4px;overflow-wrap:anywhere}.photo-item small{display:block;color:var(--muted);font-size:10px}.photo-item .text-button{min-height:30px}.service-list{display:grid;gap:12px;margin-bottom:24px}.item{border:1px solid var(--line);border-radius:8px;padding:16px;background:var(--surface);min-width:0}.item h3{font-size:16px;margin:0 0 8px}.item p{overflow-wrap:anywhere}.client-list{display:grid;gap:10px}.client-row{display:grid;grid-template-columns:1.1fr 1.3fr 1fr 1fr auto;gap:14px;padding:16px 0;border-top:1px solid var(--line);align-items:center}.client-field{min-width:0}.client-field>span:first-child{display:block;text-transform:uppercase;color:var(--olive);font-size:8px;letter-spacing:.08em;margin-bottom:7px}.client-field p,.client-field strong{font-size:12px;overflow-wrap:anywhere;margin:0}.client-whatsapp{font-size:11px}.feedback{position:fixed;bottom:22px;right:22px;max-width:min(380px,calc(100vw - 44px));padding:16px 20px;border:1px solid #5e7c22;background:var(--green);color:white;border-radius:9px;font-size:13px;box-shadow:0 10px 40px #0002;z-index:20}.feedback.is-error{background:#7d3027;border-color:#7d3027}
#auth{display:grid;place-items:center;min-height:100svh;padding:32px 20px;background:linear-gradient(105deg,#00361eeb,#00361e88),url('../assets/login-marcenaria.webp') center/cover;color:#fff}.auth-wrap{width:100%;max-width:420px}.auth-back{display:inline-flex;gap:10px;align-items:center;color:#e6e9dc;text-decoration:none;font-size:12px;margin-bottom:18px}.auth-card{background:#00361ef5;border:1px solid #5e7c22;border-radius:16px;padding:32px}.auth-logo{display:block;width:150px;height:72px;object-fit:contain;margin:0 auto 22px}.auth-card .eyebrow{text-align:center;color:var(--yellow);font-size:9px}.auth-card h1{font-size:28px;text-align:center}.auth-intro{font-size:13px;line-height:1.8;color:#d1ddce;text-align:center;margin-bottom:28px}#auth label{display:block;font-size:12px;color:#e0e9d8;margin-bottom:8px}.auth-field{position:relative;margin-bottom:20px}#auth input{width:100%;height:52px;border:1px solid #657d57;background:#002b18;color:white;padding:12px 15px;border-radius:6px;font-size:16px}#auth input[name=password]{padding-right:50px}.auth-eye{position:absolute;right:4px;top:4px;display:grid;place-items:center;width:44px;height:44px;background:transparent;border:0;color:var(--gray)}.auth-eye svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.5}.auth-submit{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:0;border-radius:6px;padding:15px 18px;background:var(--yellow);color:var(--ink);font-weight:650}.auth-submit svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.5}.auth-foot{display:flex;align-items:center;justify-content:center;gap:8px;border-top:1px solid #ffffff26;padding-top:20px;margin:24px 0 0;font-size:10px;color:#d4dcc9}.auth-foot svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.5}#auth-status{font-size:12px;color:var(--yellow);line-height:1.6}#auth-status:empty{display:none}
@media(min-width:1450px){.product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1150px){.layout{grid-template-columns:1fr}.client-row{grid-template-columns:1fr 1.2fr 1fr 1fr auto}.catalog-tools .tc-search{flex-basis:100%}.welcome-mark{min-width:130px}.welcome-mark>span{font-size:76px}.cards .card{padding:18px}}
@media(max-width:850px){.app{grid-template-columns:minmax(0,1fr)}.sidebar{position:relative;height:auto;padding:18px 22px;gap:0}.brand{border:0;padding:0}.brand img{width:106px;height:50px}.nav-label,.side-bottom{display:none}.nav{display:flex;gap:6px;overflow-x:auto;margin-top:15px}.nav button{white-space:nowrap;flex:none;padding:10px 12px;font-size:12px;min-height:44px}.main{padding:0 22px 35px}.top{min-height:70px}.welcome{padding:26px}.welcome-mark{display:none}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.card:nth-child(2){border-right:0}.card:nth-child(-n+2){border-bottom:1px solid var(--line)}.hero h1{font-size:32px}.list-heading>span{display:none}.product-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr))}.client-row{grid-template-columns:1fr 1fr;gap:16px}.sheet-content{padding:22px}.sheet-heading{padding:18px 22px}}
@media(max-width:540px){.main{padding:0 16px 30px}.sidebar{padding:14px 16px}.nav svg{width:16px}.nav button{padding:9px;font-size:11px;gap:7px}.top p{font-size:8px}.top p>span{margin:0 6px}.logout{font-size:10px;padding:7px 9px}.welcome{padding:25px 22px}.welcome h1{font-size:29px}.cards .card{padding:16px}.card>span{font-size:7px}.card strong{font-size:32px}.card p{font-size:11px}.panel{padding:20px}.hero{align-items:start;flex-direction:column}.hero h1{font-size:30px}.catalog-tools{padding:14px;gap:12px}.tc-search{min-width:0;flex-basis:100%}.filter-label{flex:1;min-width:0}.filter-label select{width:100%;max-width:none;font-size:11px}.catalog-tools>.secondary{width:100%}.product-grid{grid-template-columns:minmax(0,1fr)}.product-cover{height:200px}.product-info{padding:18px}.form-row{grid-template-columns:minmax(0,1fr);gap:0}.sheet{max-width:calc(100vw - 12px);max-height:96svh;width:calc(100vw - 12px)}.sheet-content{padding:18px}.sheet-heading{padding:16px 18px}.sheet-heading h2{font-size:22px}.save-row{flex-direction:column;align-items:stretch}.save-row button{width:100%}.client-row{grid-template-columns:1fr}.client-field>span:first-child{font-size:9px}.panel-header{align-items:start}.auth-card{padding:26px}.sheet .editor input,.sheet .editor select,.sheet .editor textarea{font-size:16px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}
.arrow-icon{display:inline-block;width:16px;height:16px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}.client-whatsapp{gap:7px}.welcome-action .arrow-icon{width:18px;height:18px}

/* Continuidade da identidade TC em superfícies escuras. */
.primary,.auth-submit,.nav button.active{color:var(--green);background:var(--yellow);border-color:var(--yellow)}
.primary:hover:not(:disabled){background:#ffe7a6;border-color:#ffe7a6}
.secondary{background:#153c2b;color:var(--ink)}
.eyebrow,.section-number,.card>span,.product-meta>span:first-child,.empty-state>span,.client-field>span:first-child,.save-row>span{color:var(--accent-text)}
.danger,.notice-error{color:#f0b3a1}
.editor .file-drop input{background:#082318}
.site-image-form label{display:block;font-size:12px;margin:12px 0;color:var(--muted)}.site-image-form input{display:block;width:100%;margin-top:8px;font-size:12px}.site-image-preview{height:180px;width:100%;object-fit:contain;background:var(--paper)}.site-image-state{font-size:11px;color:var(--muted);min-height:20px}.site-image-form .row-actions{gap:10px}.site-image-form .row-actions button{font-size:11px}
.welcome-mark>img{display:block;width:220px;max-width:100%;height:auto;object-fit:contain}.cover-empty img{display:block;width:130px;height:70px;object-fit:contain;padding:0;margin:auto}.cover-empty{letter-spacing:0}

.origin-filters{display:flex;flex-wrap:wrap;gap:14px;align-items:end;margin:24px 0}.origin-filters label{display:grid;gap:8px;flex:1;min-width:150px}.origin-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}.origin-card{padding:20px;border:1px solid #5e7c22;background:#00361e;border-radius:12px;color:#c7cdd6}.origin-card strong{display:block;font-size:32px;color:#ffde80}.origin-charts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:28px 0}.origin-bar{margin:12px 0}.origin-bar span{display:flex;justify-content:space-between;gap:8px;overflow-wrap:anywhere}.origin-bar meter{width:100%;height:16px;accent-color:#5e7c22}.origin-table-wrap{overflow:auto}.origin-table{width:100%;border-collapse:collapse;min-width:740px}.origin-table th,.origin-table td{text-align:left;padding:14px;border-bottom:1px solid #5e7c22;vertical-align:top;max-width:270px;overflow-wrap:anywhere}.origin-table a{display:inline-block}@media(max-width:850px){.origin-charts{grid-template-columns:1fr}.origin-summary{grid-template-columns:1fr}.origin-filters{display:grid;grid-template-columns:1fr}.origin-table-wrap{max-width:100%}}
.origin-filters input,.origin-filters select{width:100%;min-height:44px;padding:10px 12px;border:1px solid #5e7c22;border-radius:8px;background:#00361e;color:#c7cdd6;font:inherit;color-scheme:dark}.origin-filters input:focus,.origin-filters select:focus{outline:2px solid #ffde80;outline-offset:2px}.origin-bar meter::-webkit-meter-bar{background:#00361e;border:1px solid #5e7c22}.origin-bar meter::-webkit-meter-optimum-value{background:#ffde80}.origin-bar meter::-moz-meter-bar{background:#ffde80}
/* PRD v2: preserve panel layout and official logo, align soft green surfaces. */
:root{--green:#173327;--olive:#2f8f54;--yellow:#8ed4a2;--gray:#a7c2b2;--paper:#10241b;--surface:#173327;--surface-raised:#1d3f30;--ink:#edf5f0;--muted:#a7c2b2;--line:#365e48;--accent-text:#8ed4a2}

.auth-tools,
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-tools {
  justify-content: space-between;
  margin-bottom: 18px;
}
.auth-tools .auth-back { margin-bottom: 0; }
.auth-tools .theme-switcher {
  --header-text: #fff;
  --header-button: #ffde80;
  --header-button-text: #00361e;
  --field-border: #b6c5b9;
  background: #00361e;
}
.top-actions {
  flex: none;
}
.top-actions .theme-switcher {
  --header-text: var(--ink);
  --header-button: var(--yellow);
  --header-button-text: var(--green);
}
@media (max-width: 480px) {
  .top { gap: 8px; }
  .top-actions { gap: 6px; }
}

:root[data-theme="light"] {
  color-scheme: light;
  --olive: #506d1c;
  --paper: var(--bg-base);
  --surface: var(--bg-surface);
  --surface-raised: var(--bg-alt);
  --ink: var(--text-main);
  --muted: var(--text-muted);
  --line: var(--border);
  --accent-text: var(--accent-soft);
}
[data-theme="light"] .logout:hover,
[data-theme="light"] .secondary:hover:not(:disabled),
[data-theme="light"] .sheet-heading,
[data-theme="light"] .publication,
[data-theme="light"] .file-drop,
[data-theme="light"] .product-cover,
[data-theme="light"] #upload-preview,
[data-theme="light"] .photo-item img {
  background: var(--surface-raised);
}
[data-theme="light"] .secondary,
[data-theme="light"] .tc-search input,
[data-theme="light"] .editor input:not([type=checkbox]):not([type=hidden]),
[data-theme="light"] .editor textarea,
[data-theme="light"] .editor select,
[data-theme="light"] .origin-filters :is(input, select),
[data-theme="light"] #auth input {
  background: var(--surface);
  border-color: var(--field-border);
  color: var(--ink);
  color-scheme: light;
}
[data-theme="light"] .publication {
  border-color: var(--line);
}
[data-theme="light"] .badge {
  background: #e3efce;
  color: #345019;
}
[data-theme="light"] .badge.is-draft {
  background: var(--surface-raised);
  color: var(--ink);
}
[data-theme="light"] .danger,
[data-theme="light"] .notice-error,
[data-theme="light"] #auth-status {
  color: var(--error-text);
}
[data-theme="light"] .origin-card {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}
[data-theme="light"] .origin-card strong {
  color: var(--green);
}
[data-theme="light"] #auth {
  color: var(--ink);
}
[data-theme="light"] .auth-card {
  background: var(--surface);
  border-color: var(--line);
}
[data-theme="light"] .auth-card .eyebrow,
[data-theme="light"] .auth-eye,
[data-theme="light"] #auth label {
  color: var(--ink);
}
[data-theme="light"] .auth-intro,
[data-theme="light"] .auth-foot {
  color: var(--muted);
}
[data-theme="light"] .auth-foot {
  border-color: var(--line);
}
[data-theme="light"] .auth-logo {
  filter: brightness(0) saturate(100%) invert(19%) sepia(23%) saturate(817%) hue-rotate(82deg) brightness(92%);
}

#gallery-manager > * + *, #gallery-photo-manager > * + * {
  margin-top: 1rem;
}

.gallery-photo-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--surface);
}

.gallery-photo-card summary {
  display: grid;
  padding: .75rem;
  list-style: none;
  cursor: pointer;
  touch-action: manipulation;
}

.gallery-photo-card summary::-webkit-details-marker {
  display: none;
}

.gallery-photo-thumbnail {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: min(100%, 192px);
  justify-self: center;
  touch-action: manipulation;
}

#gallery-photo-list .gallery-photo-thumbnail img,
#gallery-photo-list .gallery-extra-list img {
  touch-action: manipulation;
  width: 192px;
  max-width: 100%;
  height: 128px;
  min-height: 0;
  margin: 0;
  justify-self: center;
  object-fit: contain;
}

.gallery-photo-label {
  overflow-wrap: anywhere;
  font-weight: 700;
}

#gallery-photo-list details[open] .gallery-photo-thumbnail {
  width: min(100%, 224px);
}
#gallery-photo-list details[open] .gallery-photo-thumbnail img {
  width: 224px;
  height: 148px;
}

.gallery-photo-state, .gallery-photo-edit {
  color: var(--muted);
  font-size: .85rem;
}

.gallery-photo-edit {
  text-decoration: underline;
}

.gallery-photo-fields {
  display: grid;
  gap: .75rem;
  padding: .75rem;
  border-top: 1px solid var(--line);
}

.gallery-photo-fields form {
  min-width: 0;
}

#legacy-products {
  margin-top: 1.5rem;
}

.gallery-upload-preview {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.gallery-upload-preview img {
  width: 5.5rem;
  height: 4rem;
  object-fit: contain;
  background: var(--bg-base);
  border: 1px solid var(--border);
}

.gallery-extra-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,8rem),1fr)); gap: .55rem; margin-block: .6rem; }
.gallery-extra-list figure { margin: 0; position: relative; display: grid; align-content: start; gap: .3rem; }
.gallery-extra-list [data-extra-remove] { position: absolute; top: .15rem; right: .15rem; }

.nav-sub:not([hidden]) { display: block; padding-inline-start: .75rem; }
.nav-products > button, .nav-sub button { width: 100%; }
#produtos-cadastrados > * + * { margin-block-start: 1.2rem; }
.registered-category + .registered-category { margin-block-start: 1.6rem; }
.registered-category h2 { margin-block: 0 .6rem; }
#gallery-photo-list .gallery-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .8rem; align-items: start; }
@media (max-width: 850px) {
  .gallery-photo-fields :is(input, select, textarea) { font-size: 16px; }
}
.gallery-photo-fields :is(input:not([type=checkbox]), select, textarea) { max-width: 100%; }
.gallery-extra-nav { display: flex; gap: .75rem; align-items: center; justify-content: center; }
.gallery-extra-list figure[hidden] { display: none; }
