[hidden] { display: none !important; }
.auth-panel.is-loading { max-width: 480px; margin: clamp(24px, 10vh, 100px) auto; padding: 32px 24px; text-align: center; border: 0; background: transparent; box-shadow: none; }
.auth-panel.is-loading h2 { max-width: 310px; margin: 20px auto 10px; font-size: clamp(22px, 5vw, 28px); line-height: 1.2; letter-spacing: -.7px; text-wrap: balance; }
.is-loading .auth-message { margin: 0; font-size: 14px; }
.loader-eyebrow { display: block; color: var(--m); font: 600 10px system-ui, sans-serif; letter-spacing: 1.8px; }
.loader-room { display: block; width: min(100%, 360px); height: auto; margin: 24px auto 6px; overflow: visible; }
.room-arch { fill: #efe7dd; }
.room-rug { fill: #e0d2c1; }
.room-wood { fill: #a57a53; }
.room-paper { fill: #fff8ed; }
.room-sun { fill: #dfae63; }
.room-leaf { fill: #657e64; }
.room-stem { stroke: #657e64; stroke-width: 2; }
.room-outline { stroke: #624d40; stroke-width: 5; stroke-linecap: round; }
.room-upholstery { fill: var(--a); }
.room-cushion { fill: #df354a; }
.room-arm { fill: #a9132d; }
.room-shade { fill: #f2c990; }
.room-glow { fill: #f8d58c; opacity: .16; animation: room-light 1.8s ease-in-out infinite alternate; }
.room-piece { animation: room-assemble 3s ease-in-out infinite both; transform-box: fill-box; transform-origin: center bottom; }
.room-art { --enter-x: 0px; --enter-y: -18px; animation-delay: 0s; }
.room-sofa { --enter-x: -28px; --enter-y: 6px; animation-delay: .18s; }
.room-lamp { --enter-x: 22px; --enter-y: 0px; animation-delay: .36s; }
.room-table { --enter-x: 0px; --enter-y: 20px; animation-delay: .54s; }
.room-sparkle { stroke: var(--a); stroke-width: 2; animation: room-shine 3s ease-in-out infinite; }
.loader-dots { display: flex; justify-content: center; gap: 7px; }
.loader-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--a); animation: room-dot 1.4s ease-in-out infinite; }
.loader-dots i:nth-child(2) { animation-delay: .16s; }
.loader-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes room-assemble { 0% { opacity: 0; transform: translate(var(--enter-x), var(--enter-y)) scale(.9); } 25% { opacity: 1; transform: translate(0, 0) scale(1); } 45% { opacity: 1; transform: translateY(-6px) rotate(-1deg); } 65% { opacity: 1; transform: translateY(0) rotate(1deg); } 80% { opacity: 1; transform: translateY(-3px); } 100% { opacity: 0; transform: translate(var(--enter-x), var(--enter-y)) scale(.94); } }
@keyframes room-light { from { opacity: .1; } to { opacity: .35; } }
@keyframes room-shine { 0%, 30%, 85%, 100% { opacity: 0; } 45%, 65% { opacity: .7; } }
@keyframes room-dot { 0%, 70%, 100% { opacity: .3; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-4px); } }
:root[data-theme="dark"] .room-arch { fill: #302b2b; }
:root[data-theme="dark"] .room-rug { fill: #443735; }
:root[data-theme="dark"] .room-outline { stroke: #bd9975; }
@keyframes room-soft-pulse { from { opacity: .45; } to { opacity: 1; } }
/* @media (prefers-reduced-motion: reduce) {
  .room-piece, .room-sparkle { animation: none; opacity: 1; transform: none; }
  .room-glow { animation: none; opacity: .16; }
  .loader-dots i { animation: room-soft-pulse 1.8s ease-in-out infinite alternate; transform: none; }
} */
.account-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.account-label { color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; }
.auth-panel { max-width: 440px; margin: 48px auto; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }
.auth-panel h2 { margin: 0 0 12px; font-size: 24px; }
.auth-panel p { color: var(--ink-soft); line-height: 1.6; }
.auth-panel .edit-input { width: 100%; }
.auth-panel .btn-primary { width: 100%; margin-top: 16px; }
.auth-message { white-space: pre-line; }
.auth-message.error { color: var(--danger); }
.auth-panel .btn-secondary { margin-top: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.idx-btn { flex-shrink: 0; }
#productFields { border: 0; margin: 0; padding: 0; min-width: 0; }
#userFields { border: 0; margin: 16px 0; padding: 0; min-width: 0; }
#userForm .edit-input { width: 100%; }
#userRoleHint { line-height: 1.6; }
.users-list { display: grid; gap: 12px; margin: 18px 0; }
.user-row { padding: 14px; border: 1px solid var(--line); border-radius: 10px; }
.user-row strong { display: block; overflow-wrap: anywhere; }
.user-row p { color: var(--ink-soft); font-size: 12px; line-height: 1.5; margin: 8px 0; }
.user-row .modal-actions, .users-pagination { display: flex; flex-wrap: wrap; gap: 8px; }
.users-pagination { align-items: center; justify-content: space-between; font-size: 12px; }
.product-inactive { color: var(--ink-soft); font-size: 12px; font-weight: 700; }
#activitySelect { height: 34px; max-width: 100%; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink-soft); font: 600 12px var(--display); }
#productForm .edit-input { width: 100%; }
.mutation-error, .catalog-status.error { color: var(--danger); }
.mutation-error, .catalog-status { line-height: 1.5; overflow-wrap: anywhere; }
.catalog-status { color: var(--ink-soft); padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.modal-close { font-size: 26px; }
.product-photo { position: relative; display: grid; place-items: center; width: 100%; height: 170px; overflow: hidden; border-radius: 12px; background: var(--surface-soft, var(--surface)); border: 1px solid var(--line); color: var(--ink-faint); font-size: 12px; text-align: center; }
.product-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; object-position: center; }
.product-photo span { padding: 12px; }
.card > .product-photo { margin-bottom: 14px; flex-shrink: 0; }
.no-photo { background: linear-gradient(135deg, var(--surface), var(--line)); }
.product-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 18px 0; }
.product-gallery .product-photo { height: 230px; }
#imageEditor { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.photo-slot { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.photo-slot strong { display: block; margin-top: 8px; }
.photo-slot input { width: 100%; font-size: 12px; margin-top: 8px; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.photo-actions .btn-secondary { padding: 7px 9px; font-size: 12px; }
.add-photo { align-content: center; min-height: 100px; }
#imageProgress { color: var(--ink-soft); line-height: 1.5; font-size: 13px; }
#retryCleanupBtn { margin: 8px 0 14px; }
@media (max-width: 700px) { .account-actions { gap: 8px; } .auth-panel { margin: 24px auto; padding: 22px; } }

/* Design de novocatologo/catalogo.html com os controles do catálogo autenticado. */
:root { --surface: var(--c); --surface-soft: var(--b); --ink: var(--t); --ink-soft: var(--m); --ink-faint: var(--m); --line: var(--b); --primary: var(--a); --danger: var(--a); --display: system-ui, sans-serif; --radius-xl: 18px; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
button, summary, input, select, textarea, .card { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; }
.btn-secondary, .theme-toggle { background: var(--b); color: var(--t); }
.btn-danger { background: transparent; border: 1px solid var(--a); color: var(--a); }
.search-row { flex: 1; min-width: 0; position: relative; }
#searchInput { padding-right: 38px; }
#searchInput::-webkit-search-cancel-button { display: none; }
.clear-btn { position: absolute; right: 4px; top: 4px; height: 33px; padding: 4px 10px; background: transparent; color: var(--m); }
#optionsMenu { flex: none; }
#optionsMenu summary { list-style: none; cursor: pointer; font: 600 14px system-ui; padding: 11px 14px; border-radius: 10px; background: var(--b); color: var(--t); }
#optionsMenu summary::-webkit-details-marker { display: none; }
.options-panel { position: absolute; top: calc(100% - 2px); right: 12px; width: min(340px, calc(100vw - 24px)); max-height: 75dvh; overflow: auto; padding: 16px; border: 1px solid var(--b); border-radius: 12px; background: var(--c); box-shadow: 0 4px 14px #0003; }
.options-panel .account-actions { display: flex; flex-direction: column; align-items: stretch; }
.options-panel h2 { margin: 0 0 14px; }
.options-panel button { width: 100%; }
.options-panel #exportBtn { margin-top: 12px; }
.options-panel label:has(+ select[hidden]) { display: none; }
#activitySelect { height: auto; padding: 11px 12px; font: 16px system-ui; border-radius: 10px; background: var(--c); color: var(--t); }
.theme-toggle svg { width: 19px; height: 19px; stroke: currentColor; vertical-align: middle; }
.theme-toggle .icon-moon, :root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { min-width: 0; }
.card > .product-photo { padding: 0; height: auto; aspect-ratio: 1; border: 0; border-radius: 0; margin: 0; background: var(--b); }
.card .product-photo img { aspect-ratio: auto; object-fit: contain; }
.card .card-info { padding: 8px 10px 10px; }
.card .product-photo span { padding: 12px; }
.product-inactive { margin: 4px 0 0; font-size: 12px; }
.empty { text-align: center; padding: 32px 12px; color: var(--m); }
.load-more { margin: 16px auto; }
.catalog-status { margin: 12px; }
.modal-overlay { position: fixed; inset: 0; background: #0008; display: flex; align-items: flex-end; z-index: 20; }
.modal-panel { position: relative; background: var(--c); width: 100%; max-height: 92dvh; overflow: auto; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); }
.modal-close { float: right; padding: 3px 10px; background: var(--b); color: var(--t); font-size: 26px; }
.modal-name { padding-right: 30px; overflow-wrap: anywhere; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.modal-actions > button { flex: 1; }
.modal-desc { white-space: pre-line; line-height: 1.55; overflow-wrap: anywhere; }
.edit-hint { font-size: 12px; color: var(--m); line-height: 1.5; }
.modal-overlay:has(.product-detail) { align-items: stretch; justify-content: stretch; background: var(--c); }
.modal-panel:has(.product-detail) { max-width: none; max-height: none; height: 100%; border-radius: 0; padding: 0; display: flex; flex-direction: column; }
.product-detail ~ .product-gallery { display: flex; flex: none; gap: 0; margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--b); }
.product-detail ~ .product-gallery .product-photo { flex: 0 0 100%; height: 55vh; border: 0; border-radius: 0; background: var(--b); scroll-snap-align: start; }
.product-detail ~ .inf { flex: 1 0 auto; }
.product-detail ~ .inf h2 { padding: 0; }
.product-detail ~ .acts { margin-top: 0; flex: none; }
.auth-panel { width: calc(100% - 24px); border-radius: 18px; }
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .modal-overlay { align-items: center; justify-content: center; }
  .modal-panel { max-width: 520px; border-radius: 18px; }
}
.variant-count { font-size: .85rem; font-weight: 600; margin: .5rem 0; }
.card-variation-label { display: block; font-size: .8rem; margin: .5rem 0 .25rem; }
.card-variation { width: 100%; min-width: 0; max-width: 100%; min-height: 44px; cursor: pointer; margin-bottom: .5rem; }

.whatsapp-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 16px; padding: 12px 18px; border: 0; border-radius: 999px; background: #25d366; color: #fff; box-shadow: 0 4px 12px #128c7e33; font-size: 15px; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; white-space: normal; transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.whatsapp-button:hover { background: #1ebe5d; box-shadow: 0 6px 16px #128c7e44; transform: translateY(-1px); }
.whatsapp-button:active { background: #1da851; box-shadow: 0 2px 6px #128c7e33; transform: translateY(0); }
.whatsapp-icon { width: 23px; height: 23px; flex: none; }
.whatsapp-icon path:first-child { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.whatsapp-icon path:last-child { fill: currentColor; }
