/* ==========================================================================
   ClaudeCode Admin - estilos base do template administrativo
   Cores personalizaveis via variaveis CSS (--cor-primaria / --cor-secundaria)
   ========================================================================== */

:root {
    --cor-primaria: #4f46e5;
    --cor-secundaria: #1e293b;
    --cor-destaque: #4f46e5;
    --cor-fundo: #f4f6fb;
    --cor-texto: #1f2937;
    --cor-icones: rgba(255, 255, 255, .75);
    --cor-borda: #e5e7eb;
    --cor-sucesso: #16a34a;
    --cor-erro: #dc2626;
    --cor-aviso: #d97706;
    --cor-botao-adicionar: #16a34a;
    --cor-botao-editar: #d97706;
    --cor-botao-excluir: #dc2626;
    --sidebar-width: 260px;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--cor-fundo);
    color: var(--cor-texto);
}

a { color: var(--cor-primaria); text-decoration: none; }

/* ---------- Layout geral ---------- */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-width);
    background: var(--cor-secundaria);
    color: #fff;
    flex-shrink: 0;
    overflow: hidden;
    transition: width .2s ease;
}
@media (min-width: 901px) {
    .app-shell.sidebar-collapsed .app-sidebar { width: 0; }
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 18px;
    font-weight: 700;
    font-size: 17px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo { height: 32px; width: auto; border-radius: 6px; }

.sidebar-nav { display: flex; flex-direction: column; padding: 10px 0; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--cor-icones);
    font-size: 14px;
}
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: var(--cor-primaria); color: #fff; }
.nav-link .icon { font-size: 16px; width: 18px; text-align: center; }
.sidebar-return-form { margin: 0; }
.sidebar-return-button {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.07);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; transition: margin-left .2s ease; }

.app-topbar {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    background: #fff;
    border-bottom: 1px solid var(--cor-borda);
    position: sticky;
    top: 0;
    z-index: 20;
}
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--cor-texto);
}
.topbar-spacer { flex: 1; }

.topbar-user { position: relative; }
.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--cor-texto);
}
.user-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--cor-primaria);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600;
}
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border: 1px solid var(--cor-borda);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 180px;
    overflow: hidden;
    z-index: 30;
}
.dropdown-menu.show { display: block; }
.dropdown-item { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--cor-texto); font-size: 14px; }
.dropdown-item:hover { background: var(--cor-fundo); }

.app-content { padding: 24px; }

.page-header { margin-bottom: 20px; }
.page-header h1 { margin: 0 0 4px; font-size: 22px; }
.page-header p { margin: 0; color: #6b7280; }

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.page-toolbar .search-box { max-width: 320px; flex: 1; }

/* ---------- Minha empresa ---------- */
.company-tabs {
    margin-bottom: 18px;
    padding: 5px;
    display: inline-flex;
    max-width: 100%;
    gap: 4px;
    overflow-x: auto;
    border: 1px solid var(--cor-borda);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(15,23,42,.04);
}
.company-tabs button {
    min-height: 42px;
    padding: 9px 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.company-tabs button:hover { background: #f8fafc; color: var(--cor-texto); }
.company-tabs button.active {
    background: var(--cor-primaria);
    color: #fff;
    box-shadow: 0 4px 10px color-mix(in srgb, var(--cor-primaria) 25%, transparent);
}
.company-tabs button i { font-size: 15px; }
.company-tab-panel[hidden] { display: none !important; }
.company-tab-panel { animation: company-panel-in .18s ease; }
@keyframes company-panel-in {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.company-panel {
    margin-bottom: 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--cor-borda);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}
.company-panel-header,
.company-panel-toolbar {
    padding: 18px 20px;
    border-bottom: 1px solid var(--cor-borda);
}
.company-panel-header h2,
.company-panel-toolbar h2 { margin: 0; font-size: 18px; }
.company-panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.company-panel-toolbar small { display: block; margin-top: 4px; color: #6b7280; }
.company-panel-body { padding: 20px; }
.company-panel .form-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 4px;
    flex-wrap: wrap;
}
.company-panel .form-actions .btn { margin-left: auto; }
.company-panel table.table tbody tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
    .company-tabs { width: 100%; }
    .company-tabs button { padding-inline: 12px; }
}

/* ---------- Integrações ---------- */
.integration-card {
    margin-bottom: 24px;
    padding: 20px;
    overflow: visible;
    border: 1px solid var(--cor-borda);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05);
}
.integration-card .card-header {
    margin: -20px -20px 18px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--cor-borda);
}
.integration-card .card-header h2 { margin: 0; font-size: 18px; }
.integration-card > label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-weight: 600;
}
.integration-card .form-row { gap: 18px; }
.integration-card .text-muted { color: #6b7280; line-height: 1.55; }
.integration-card input[readonly] { background: #f8fafc; color: #475569; cursor: not-allowed; }
.integration-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: -8px;
    padding: 18px 0 4px;
}
.money-input { display:flex;align-items:center;overflow:hidden;border:1px solid var(--cor-borda);border-radius:6px;background:#fff }
.money-input:focus-within { border-color:var(--cor-primaria);box-shadow:0 0 0 2px color-mix(in srgb,var(--cor-primaria) 18%,transparent) }
.money-input>span { align-self:stretch;display:flex;align-items:center;padding:0 10px;border-right:1px solid var(--cor-borda);background:#f8fafc;color:#475569;font-size:13px;font-weight:700 }
.money-input>.form-control { border:0;border-radius:0;box-shadow:none!important }
.product-gallery-editor { display:flex;gap:10px;margin-top:12px;padding-bottom:4px;overflow-x:auto }
.product-gallery-editor-item { position:relative;flex:0 0 86px;height:86px;overflow:hidden;border:1px solid var(--cor-borda);border-radius:9px;background:#f8fafc;cursor:pointer }
.product-gallery-editor-item img { width:100%;height:100%;object-fit:cover }
.product-gallery-editor-item>span { position:absolute;left:5px;bottom:5px;padding:3px 6px;border-radius:5px;background:rgba(15,23,42,.82);color:#fff;font-size:9px;font-weight:700 }
.product-gallery-editor-item input { position:absolute;top:6px;right:6px;width:16px;height:16px }
.product-gallery-editor-item>small { position:absolute;left:5px;bottom:5px;padding:3px 6px;border-radius:5px;background:rgba(220,38,38,.88);color:#fff;font-size:9px;font-weight:700 }
.product-gallery-editor:empty { display:none }.product-gallery-editor-item.is-new { border-color:color-mix(in srgb,var(--cor-primaria) 45%,var(--cor-borda)) }.product-gallery-editor-item.is-new>span { background:var(--cor-primaria) }

/* ---------- Cards / stats ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--cor-destaque) 15%, white);
    color: var(--cor-destaque);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.stat-value { font-size: 24px; font-weight: 700; }
.stat-label { color: #6b7280; font-size: 13px; }
.store-dashboard-status {
    margin-top: 20px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--cor-borda);
}
.store-dashboard-status small { color: #6b7280; }
.store-dashboard-status h2 { margin: 5px 0; font-size: 18px; }
.store-dashboard-status p { margin: 0; color: #6b7280; }
.cards-grid:empty { display:none }
.dashboard-onboarding { display:grid;grid-template-columns:minmax(0,.9fr) minmax(420px,1.1fr);gap:56px;margin-top:18px;padding:42px;overflow:visible }
.dashboard-onboarding-copy { align-self:center;max-width:470px }.dashboard-eyebrow { color:var(--cor-primaria);font-size:11px;font-weight:800;letter-spacing:.14em }
.dashboard-onboarding-copy h2 { margin:10px 0 12px;font-size:28px;line-height:1.15 }.dashboard-onboarding-copy p { margin:0 0 24px;color:#64748b;line-height:1.6 }
.dashboard-checklist { margin:0;padding:0;list-style:none }.dashboard-checklist li { min-height:70px;display:flex;align-items:center;gap:13px;border-bottom:1px solid var(--cor-borda) }.dashboard-checklist li:last-child { border-bottom:0 }
.dashboard-checklist li>span { width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:color-mix(in srgb,var(--cor-primaria) 10%,white);color:var(--cor-primaria);font-size:17px }
.dashboard-checklist li.done>span { background:#dcfce7;color:#15803d }.dashboard-checklist li>div { min-width:0;flex:1 }.dashboard-checklist strong { display:block;font-size:14px }.dashboard-checklist small { display:block;margin-top:2px;color:#64748b }
.dashboard-checklist a { color:var(--cor-primaria);font-size:12px;font-weight:700 }
.dashboard-kpis { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px }
.dashboard-kpi { display:flex;align-items:center;gap:14px;padding:18px;border:1px solid var(--cor-borda);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow) }
.dashboard-kpi>i { width:42px;height:42px;display:grid;place-items:center;border-radius:11px;background:color-mix(in srgb,var(--cor-destaque) 14%,white);color:var(--cor-destaque);font-size:19px }
.dashboard-kpi small { display:block;margin-bottom:3px;color:#6b7280 }.dashboard-kpi strong { font-size:20px }.dashboard-kpi.is-alert>i { background:#fef3c7;color:#d97706 }.dashboard-kpi:hover { border-color:color-mix(in srgb,var(--cor-primaria) 32%,var(--cor-borda));transform:translateY(-1px) }
.dashboard-admin-kpis { margin-top:0 }.dashboard-admin-grid { display:grid;grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr);gap:18px;margin-top:18px;align-items:start }
.dashboard-admin-stores { margin:0;padding:7px 20px 13px;list-style:none }.dashboard-admin-stores li { border-bottom:1px solid var(--cor-borda) }.dashboard-admin-stores li:last-child { border-bottom:0 }.dashboard-admin-stores li>a { min-height:64px;display:flex;align-items:center;gap:12px;margin:0 -10px;padding:0 10px;border-radius:8px;transition:background .18s }.dashboard-admin-stores li>a:hover { background:#f8fafc }
.dashboard-store-avatar { width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:9px;background:color-mix(in srgb,var(--cor-primaria) 11%,white);color:var(--cor-primaria);font-weight:800 }
.dashboard-admin-stores li>a>div { min-width:0;flex:1 }.dashboard-admin-stores strong,.dashboard-admin-stores small { display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis }.dashboard-admin-stores strong { font-size:13px }.dashboard-admin-stores small { margin-top:2px;color:#64748b;font-size:11px }.dashboard-store-open { color:#94a3b8;font-size:12px }
.dashboard-admin-actions { padding:7px 18px 13px }.dashboard-admin-actions>a { min-height:62px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--cor-borda) }.dashboard-admin-actions>a:last-child { border-bottom:0 }
.dashboard-admin-actions>a>i:first-child { width:35px;height:35px;display:grid;place-items:center;border-radius:9px;background:#f1f5f9;color:var(--cor-primaria) }.dashboard-admin-actions>a>span { min-width:0;flex:1 }.dashboard-admin-actions strong,.dashboard-admin-actions small { display:block }.dashboard-admin-actions strong { font-size:13px }.dashboard-admin-actions small { margin-top:2px;color:#64748b;font-size:11px }.dashboard-admin-actions>a>i:last-child { color:#94a3b8;font-size:11px }
.dashboard-store-grid { grid-template-columns:minmax(0,1.35fr) minmax(340px,.65fr) }.dashboard-store-grid>.dashboard-panel:first-child { grid-column:auto }.dashboard-store-secondary { display:none }.dashboard-store-grid .dashboard-empty { min-height:220px }.dashboard-store-actions { align-self:start }
.dashboard-operational-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px;align-items:start }
.dashboard-panel-wide { grid-column:1/-1 }.dashboard-panel { padding:0 }
.dashboard-panel-header { display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;border-bottom:1px solid var(--cor-borda) }
.dashboard-panel-header h2 { margin:0;font-size:17px }.dashboard-panel-header p { margin:3px 0 0;color:#6b7280;font-size:13px }
.dashboard-empty { min-height:170px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;padding:28px;text-align:center;color:#6b7280 }
.dashboard-empty i { margin-bottom:6px;font-size:27px;color:var(--cor-destaque) }.dashboard-empty strong { color:#1f2937 }.dashboard-empty span { font-size:13px }.dashboard-empty.compact { min-height:210px }.dashboard-empty.is-ok i { color:#16a34a }
.dashboard-ranking,.dashboard-stock-list { margin:0;padding:8px 20px 14px;list-style:none }
.dashboard-ranking li,.dashboard-stock-list li { min-height:58px;display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--cor-borda) }
.dashboard-ranking li:last-child,.dashboard-stock-list li:last-child { border:0 }.dashboard-ranking li>b { width:27px;height:27px;display:grid;place-items:center;border-radius:50%;background:#f1f5f9;font-size:12px }
.dashboard-ranking li>div,.dashboard-stock-list li>div { min-width:0;flex:1 }.dashboard-ranking strong,.dashboard-stock-list strong { display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px }
.dashboard-ranking small,.dashboard-stock-list small { display:block;color:#6b7280;font-size:11px }.dashboard-ranking li>span { color:#6b7280;font-size:12px;white-space:nowrap }
@media(max-width:1000px){.dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.dashboard-kpis,.dashboard-operational-grid{grid-template-columns:1fr}.dashboard-panel-wide{grid-column:auto}.dashboard-panel-header{align-items:flex-start}.dashboard-table{min-width:760px}}
@media(max-width:900px){.dashboard-onboarding{grid-template-columns:1fr;gap:28px;padding:28px}}
@media(max-width:1000px){.dashboard-admin-grid{grid-template-columns:1fr}}
@media(max-width:1000px){.dashboard-store-grid{grid-template-columns:1fr}}

/* ---------- Tabela / card de listagem ---------- */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.table-responsive { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.table th, table.table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--cor-borda); }
table.table th { background: #fafbfc; font-weight: 600; color: #4b5563; white-space: nowrap; }
table.table tbody tr:hover { background: #fafbfc; }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-success { background: #dcfce7; color: var(--cor-sucesso); }
.badge-danger { background: #fee2e2; color: var(--cor-erro); }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-muted { background: #f1f5f9; color: #64748b; }

.empty-state { text-align: center; padding: 48px 16px; color: #9ca3af; }

.pagination { display: flex; gap: 6px; justify-content: flex-end; padding: 14px 16px; }
.pagination button {
    border: 1px solid var(--cor-borda);
    background: #fff;
    border-radius: 6px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
}
.pagination button.active { background: var(--cor-primaria); color: #fff; border-color: var(--cor-primaria); }
.pagination button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Formularios / botoes ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--cor-borda);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color .15s;
}
.form-control:focus { outline: none; border-color: var(--cor-primaria); }
.form-error { color: var(--cor-erro); font-size: 12px; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s;
}
.btn:hover { filter: brightness(0.94); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--cor-botao-adicionar); color: #fff; }
.btn-secondary { background: #f1f5f9; color: #334155; }
.btn-edit { background: var(--cor-botao-editar); color: #fff; }
.btn-danger { background: var(--cor-botao-excluir); color: #fff; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-icon { padding: 6px 9px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Alertas / toasts ---------- */
.alert { padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 14px; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-success { background: #dcfce7; color: #166534; }

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    min-width: 260px;
    max-width: 360px;
    padding: 14px 16px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: toast-in .2s ease;
}
.toast-success { background: var(--cor-sucesso); }
.toast-error { background: var(--cor-erro); }
.toast-info { background: #334155; }
@keyframes toast-in { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Modal ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    z-index: 1000;
    overflow-y: auto;
}
.modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 20px 40px rgba(0,0,0,.2);
    animation: modal-in .15s ease;
}
.modal-box.modal-sm { max-width: 420px; }
.modal-box.modal-lg { max-width: 760px; }
@keyframes modal-in { from { transform: translateY(-10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--cor-borda); }
.modal-header h3 { margin: 0; font-size: 17px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #6b7280; }
.modal-body { padding: 22px; max-height: 70vh; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--cor-borda); }
.modal-loading { padding: 40px; text-align: center; color: #9ca3af; }

/* ---------- Cadastro de produto em etapas ---------- */
.product-wizard { min-height: 470px; }
.modal-box:has(.product-wizard) { max-width: 900px; }
.product-wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: -22px -22px 24px; padding: 18px 22px; border-bottom: 1px solid var(--cor-borda); background: #f8fafc; }
.product-wizard-step { position: relative; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 0 10px; border: 0; background: transparent; color: #94a3b8; text-align: left; cursor: pointer; }
.product-wizard-step:not(:last-child)::after { content: ''; position: absolute; z-index: 0; top: 18px; left: calc(100% - 9px); width: 18px; height: 2px; background: #dbe3ec; }
.product-wizard-step > span { grid-row: 1 / 3; position: relative; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid #dbe3ec; border-radius: 50%; background: #fff; font-size: 15px; }
.product-wizard-step small { align-self: end; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.product-wizard-step strong { align-self: start; color: #64748b; font-size: 12px; }
.product-wizard-step.is-active > span { border-color: var(--cor-primaria); background: var(--cor-primaria); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cor-primaria) 13%, transparent); }
.product-wizard-step.is-active small, .product-wizard-step.is-active strong { color: var(--cor-primaria); }
.product-wizard-step.is-complete > span { border-color: #16a34a; background: #ecfdf3; color: #15803d; }
.product-wizard-step.is-complete:not(:last-child)::after { background: #86efac; }
.product-wizard-panel[hidden] { display: none !important; }
.product-step-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.product-step-heading h3 { margin: 0 0 4px; color: #172033; font-size: 19px; }
.product-step-heading p { margin: 0; color: #64748b; font-size: 13px; line-height: 1.45; }
.product-step-icon { display: grid; flex: 0 0 40px; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: color-mix(in srgb, var(--cor-primaria) 12%, #fff); color: var(--cor-primaria); font-size: 18px; }
.required-mark { color: #dc2626; }
.product-friendly-address { padding-top: 4px; }
.product-image-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; }
.product-upload-card, .product-form-block { padding: 18px; border: 1px solid var(--cor-borda); border-radius: 11px; background: #fff; }
.product-upload-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 13px; }
.product-upload-title strong { font-size: 14px; color: #1e293b; }
.product-upload-title span { color: #64748b; font-size: 11px; }
.product-main-preview, .product-gallery-drop { display: flex; min-height: 185px; align-items: center; justify-content: center; flex-direction: column; gap: 6px; overflow: hidden; border: 2px dashed #cbd5e1; border-radius: 10px; background: #f8fafc; color: #64748b; cursor: pointer; text-align: center; }
.product-main-preview:hover, .product-gallery-drop:hover { border-color: var(--cor-primaria); background: color-mix(in srgb, var(--cor-primaria) 4%, #fff); }
.product-main-preview img { width: 100%; height: 220px; object-fit: contain; background: #f1f5f9; }
.product-main-preview i, .product-gallery-drop i { color: var(--cor-primaria); font-size: 30px; }
.product-main-preview strong, .product-gallery-drop strong { color: #334155; font-size: 13px; }
.product-main-preview small, .product-gallery-drop small { font-size: 11px; }
.product-gallery-drop { min-height: 120px; }
.product-file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.product-upload-button { display: flex; width: 100%; justify-content: center; margin: 12px 0 8px; }
.product-form-block { margin-bottom: 16px; background: #fbfdff; }
.product-form-block > h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: #334155; font-size: 14px; }
.product-form-block > h4 span { padding: 3px 7px; border-radius: 999px; background: #e2e8f0; color: #64748b; font-size: 9px; text-transform: uppercase; }
.product-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.product-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.product-choice > input { position: absolute; top: 13px; right: 13px; width: 17px; height: 17px; accent-color: var(--cor-primaria); }
.product-choice > span { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto auto; min-height: 78px; padding: 14px 40px 14px 13px; border: 1px solid var(--cor-borda); border-radius: 9px; background: #fff; }
.product-choice > span > i { grid-row: 1 / 3; color: var(--cor-primaria); font-size: 19px; }
.product-choice strong { color: #334155; font-size: 12px; }
.product-choice small { margin-top: 3px; color: #64748b; font-size: 10px; line-height: 1.35; }
.product-choice > input:checked + span { border-color: color-mix(in srgb, var(--cor-primaria) 55%, #cbd5e1); background: color-mix(in srgb, var(--cor-primaria) 5%, #fff); }
.product-ready-message { display: flex; align-items: flex-start; gap: 12px; padding: 15px 17px; border: 1px solid #bbf7d0; border-radius: 10px; background: #f0fdf4; color: #166534; }
.product-ready-message > i { margin-top: 2px; font-size: 20px; }
.product-ready-message strong { font-size: 13px; }
.product-ready-message p { margin: 3px 0 0; font-size: 11px; }
.product-wizard-footer-info { display: flex; flex-direction: column; margin-right: auto; }
.product-wizard-footer-info strong { color: #334155; font-size: 12px; }
.product-wizard-footer-info span { color: #94a3b8; font-size: 10px; }
.product-wizard-footer-actions { display: flex; gap: 9px; }

@media (max-width: 700px) {
    .product-wizard-steps { padding-inline: 10px; }
    .product-wizard-step { display: flex; justify-content: center; padding: 0 4px; }
    .product-wizard-step small, .product-wizard-step strong { display: none; }
    .product-wizard-step:not(:last-child)::after { left: calc(100% - 7px); width: 14px; }
    .product-image-grid, .product-choice-grid { grid-template-columns: 1fr; }
    .product-wizard-footer-info { display: none; }
    .product-wizard-footer-actions { width: 100%; justify-content: flex-end; }
    .modal-footer { padding-inline: 14px; }
}

.view-field { margin-bottom: 12px; }
.view-field label { display: block; font-size: 12px; color: #6b7280; font-weight: 600; text-transform: uppercase; margin-bottom: 2px; }
.view-field div { font-size: 14px; }

/* ---------- Perfil / avatar upload ---------- */
.avatar-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.avatar-preview { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #e5e7eb; }

/* ---------- Auth (login) ---------- */
.auth-body {
    --auth-ink: var(--login-cor-texto, #13233a);
    --auth-muted: var(--login-cor-muted, #64748b);
    --auth-surface: var(--login-cor-cartao, #fff);
    --auth-input: var(--login-cor-campo, #f5f8fc);
    --auth-line: #d9e2ec;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 72px 24px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 18%, color-mix(in srgb, var(--cor-primaria) 9%, transparent) 0, transparent 28%),
        radial-gradient(circle at 88% 83%, color-mix(in srgb, var(--cor-primaria) 10%, transparent) 0, transparent 25%),
        var(--login-cor-fundo, #eef5fb);
    transition: background-color .2s ease, color .2s ease;
}
.auth-body::before,
.auth-body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
}
.auth-body::before { width: 340px; height: 340px; left: -190px; bottom: -150px; background: color-mix(in srgb, var(--cor-primaria) 8%, transparent); }
.auth-body::after { width: 270px; height: 270px; right: -130px; top: -100px; background: color-mix(in srgb, var(--cor-primaria) 7%, transparent); }
.auth-wrapper {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(440px, 570px);
    width: 100%;
    max-width: 950px;
    min-height: 475px;
    filter: drop-shadow(0 24px 38px rgba(37, 63, 91, .18));
}
.auth-card {
    position: relative;
    z-index: 2;
    align-self: stretch;
    min-height: 100%;
    margin-right: -1px;
    padding: 42px 38px;
    background: var(--auth-surface);
    border: 1px solid rgba(148, 163, 184, .23);
    border-radius: 18px 0 0 18px;
}
.auth-brand { margin-bottom: 26px; }
.auth-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--auth-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}
.auth-brand h1 { margin: 0 0 7px; color: var(--auth-ink); font-size: 23px; line-height: 1.15; }
.auth-brand p { margin: 0; color: var(--auth-muted); font-size: 13px; }
.auth-card .form-group { margin-bottom: 17px; }
.auth-card .form-group label { margin-bottom: 7px; color: var(--auth-ink); font-size: 12px; }
.auth-input-wrap { position: relative; }
.auth-input-wrap > i {
    position: absolute;
    left: 13px;
    top: 50%;
    z-index: 1;
    color: #8a9bae;
    font-size: 14px;
    transform: translateY(-50%);
}
.auth-card .form-control {
    height: 43px;
    padding: 10px 13px 10px 38px;
    color: var(--auth-ink);
    background: var(--auth-input);
    border-color: var(--auth-line);
    border-radius: 9px;
}
.auth-card .form-control::placeholder { color: #9aa8b7; }
.auth-card .form-control:focus { background: var(--auth-surface); border-color: var(--cor-primaria); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cor-primaria) 13%, transparent); }
.auth-field-help { display: block; margin-top: 6px; color: var(--auth-muted); font-size: 10px; }
.auth-password-toggle {
    position: absolute;
    right: 5px;
    top: 50%;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 8px;
    color: var(--cor-primaria);
    background: transparent;
    border: 0;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    transform: translateY(-50%);
}
.auth-password-toggle + * { pointer-events: none; }
.auth-input-wrap:has(.auth-password-toggle) .form-control { padding-right: 76px; }
.auth-remember { display: inline-flex; align-items: center; gap: 7px; margin: -1px 0 18px; color: var(--auth-muted); font-size: 11px; cursor: pointer; }
.auth-remember input { width: 14px; height: 14px; margin: 0; accent-color: var(--cor-primaria); }
.auth-card .btn-primary {
    height: 43px;
    gap: 9px;
    background: var(--login-cor-botao, var(--cor-primaria));
    border-radius: 9px;
    font-size: 12px;
}
.auth-card .btn-primary i { transition: transform .15s ease; }
.auth-card .btn-primary:hover i { transform: translateX(3px); }
.auth-wrapper-registration { grid-template-columns: minmax(460px, 620px) minmax(340px, 430px); max-width: 1050px; }
.auth-wrapper-registration .auth-card { padding-top: 30px; padding-bottom: 30px; }
.auth-wrapper-registration .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.auth-wrapper-registration .form-group { margin-bottom: 12px; }
.registration-login-link { margin: 16px 0 0; text-align: center; color: var(--auth-muted); font-size: 12px; }
.registration-login-link a { color: var(--cor-primaria); font-weight: 700; }
.registration-honeypot { position: absolute !important; left: -9999px !important; opacity: 0 !important; }
.auth-alert { padding: 9px 11px; font-size: 11px; }
.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 48px 54px 28px;
    color: #fff;
    background: linear-gradient(145deg, var(--login-cor-painel, var(--cor-primaria)), color-mix(in srgb, var(--login-cor-painel, var(--cor-primaria)) 68%, #072e4b));
    border-radius: 0 18px 18px 0;
}
.auth-showcase-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    right: -150px;
    top: -160px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}
.auth-showcase-content { position: relative; z-index: 1; max-width: 450px; }
.auth-showcase-brand { display: flex; align-items: center; gap: 12px; min-height: 58px; margin-bottom: 28px; font-size: 18px; }
.auth-logo { display: block; width: auto; max-width: 210px; height: 54px; object-fit: contain; }
.auth-logo-placeholder {
    width: 50px; height: 50px; border-radius: 12px;
    background: rgba(255,255,255,.18); color: #fff;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.2);
    font-size: 22px; font-weight: 700;
}
.auth-showcase h2 { margin: 0 0 13px; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.04; letter-spacing: -.025em; }
.auth-showcase p { max-width: 410px; margin: 0 0 24px; color: rgba(255,255,255,.83); font-size: 13px; line-height: 1.55; }
.auth-benefits { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 12px; }
.auth-benefits li { display: flex; align-items: center; gap: 9px; }
.auth-benefits i { color: rgba(255,255,255,.95); font-size: 12px; }
.auth-showcase-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 30px;
    color: rgba(255,255,255,.62);
    font-size: 10px;
}
.auth-theme-toggle {
    position: fixed;
    z-index: 5;
    right: 22px;
    top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    color: #475569;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(148,163,184,.25);
    border-radius: 8px;
    box-shadow: 0 7px 22px rgba(15,23,42,.08);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.auth-dark {
    --auth-ink: #e7edf5;
    --auth-muted: #9dadbf;
    --auth-surface: #152235;
    --auth-input: #1b2b40;
    --auth-line: #31445c;
    background: #0c1725;
}
.auth-dark .auth-theme-toggle { color: #e7edf5; background: #152235; border-color: #31445c; }

.error-page { text-align: center; padding: 80px 20px; }
.error-page h1 { font-size: 64px; margin: 0; color: var(--cor-primaria); }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .app-sidebar { position: fixed; height: 100vh; z-index: 40; margin-left: calc(var(--sidebar-width) * -1); }
    .app-shell.sidebar-collapsed .app-sidebar { margin-left: 0; }
    .app-main { margin-left: 0 !important; }
    .auth-wrapper { grid-template-columns: minmax(280px, 360px) minmax(340px, 430px); max-width: 790px; }
    .auth-card { padding: 36px 30px; }
    .auth-showcase { padding: 42px 38px 26px; }
}
@media (max-width: 720px) {
    .auth-wrapper-registration .form-row { grid-template-columns: 1fr; }
    .auth-body { align-items: flex-start; padding: 82px 18px 28px; }
    .auth-wrapper { display: flex; flex-direction: column; max-width: 430px; filter: drop-shadow(0 18px 30px rgba(37,63,91,.16)); }
    .auth-card { order: 2; width: 100%; min-height: 0; margin: -1px 0 0; padding: 30px 26px; border-radius: 0 0 16px 16px; }
    .auth-showcase { order: 1; min-height: 255px; padding: 28px 26px; border-radius: 16px 16px 0 0; }
    .auth-showcase-brand { min-height: 40px; margin-bottom: 17px; }
    .auth-logo { max-width: 165px; height: 42px; }
    .auth-logo-placeholder { width: 40px; height: 40px; }
    .auth-showcase h2 { font-size: 25px; }
    .auth-showcase p { margin-bottom: 0; }
    .auth-benefits, .auth-showcase-footer { display: none; }
    .auth-theme-toggle { right: 16px; top: 15px; }
}
@media (max-width: 380px) {
    .auth-card, .auth-showcase { padding-left: 20px; padding-right: 20px; }
}
