﻿/* COMPONENTES GERAIS DA MAIN CONTENT */
.tab-pane { display: none; animation: slideIn 0.3s ease-out; }
.tab-pane.active { display: block; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-header-info h2 { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; color: var(--primary); margin-bottom: 4px; }
.page-header-info p { color: var(--text-secondary); font-size: 0.88rem; }

.filter-bar { display: flex; gap: 12px; margin-bottom: 24px; background: var(--bg-white); padding: 14px; border-radius: 14px; border: 1px solid var(--border-light); flex-wrap: wrap; box-shadow: var(--shadow-sm); }
.form-card { background: var(--bg-white); border-radius: var(--radius-lg); padding: 20px; border: 1px solid var(--border-light); margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.85rem; color: var(--text-secondary); }
.form-check.option-check { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-gray); color: var(--text-secondary); font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.form-check.option-check input { width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }
.form-check.option-check span { line-height: 1.35; }

.form-control { width: 100%; padding: 11px 14px; background: var(--bg-white); border: 1px solid var(--border-light); border-radius: 10px; font-size: 0.95rem; color: var(--text-primary); transition: all 0.2s; box-shadow: var(--shadow-sm); }
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--border-focus); }
.form-control[type="color"] { height: 44px; min-height: 44px; padding: 4px; cursor: pointer; }
.form-control[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.form-control[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.form-control[type="color"]::-moz-color-swatch { border: 0; border-radius: 7px; }

/* BOTÃ•ES */
.btn { min-height: 40px; padding: 10px 18px; border: 1px solid transparent; border-radius: 12px; font-weight: 800; font-size: 0.95rem; cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, filter 0.18s ease; display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; box-shadow: 0 10px 22px -20px rgba(15, 23, 42, .55), inset 0 1px 0 rgba(255, 255, 255, .58); }
.btn i { font-size: 1.15rem; line-height: 1; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); filter: saturate(1.06); }
.btn:disabled, .btn[disabled] { cursor: not-allowed; opacity: .62; transform: none; box-shadow: none; filter: grayscale(.08); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #0ea5e9); color: white; border-color: rgba(37, 99, 235, .28); box-shadow: 0 16px 30px -22px rgba(37, 99, 235, .92), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-hover), #0284c7); box-shadow: 0 20px 34px -22px rgba(37, 99, 235, .95), inset 0 1px 0 rgba(255, 255, 255, .24); }
.btn-secondary { background: linear-gradient(180deg, #ffffff, #f8fafc); color: var(--text-secondary); border-color: #dbe3ee; }
.btn-secondary:hover { background: linear-gradient(180deg, #ffffff, #eef6ff); color: var(--accent); border-color: var(--border-focus); box-shadow: 0 16px 28px -24px rgba(15, 23, 42, .62), inset 0 1px 0 rgba(255, 255, 255, .9); }
.btn-danger { background: linear-gradient(180deg, #fff, #fef2f2); color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; border-color: rgba(239, 68, 68, .34); box-shadow: 0 18px 32px -22px rgba(239, 68, 68, .9); }
.btn-success { background: linear-gradient(135deg, var(--success), #22c55e); color: white; border-color: rgba(22, 163, 74, .34); box-shadow: 0 16px 30px -22px rgba(22, 163, 74, .9), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-success:hover { background: linear-gradient(135deg, #15803d, #16a34a); box-shadow: 0 20px 34px -22px rgba(22, 163, 74, .95), inset 0 1px 0 rgba(255, 255, 255, .24); }
.detail-budget-icon {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
}

.users-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.users-kpi {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-gray);
}

.users-kpi > span {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 1.2rem;
}

.users-kpi strong {
    display: block;
    color: var(--primary);
    font-size: 1rem;
}

.users-kpi small,
.permissions-header small,
.user-card-meta {
    color: var(--text-secondary);
    font-size: 0.78rem;
}

.users-list {
    display: grid;
    gap: 10px;
}

.user-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-white);
}

.user-card-main {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}

.user-card-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    background: var(--bg-gray);
    color: var(--accent);
    font-size: 1.2rem;
}

.user-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.user-card-title strong {
    color: var(--primary);
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.user-role-badge.common {
    background: var(--bg-gray-dark);
    color: var(--text-secondary);
}

.user-card-actions {
    display: flex;
    gap: 8px;
}

.permissions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 14px;
}

.permissions-header strong,
.permission-group-title {
    display: block;
    color: var(--primary);
    font-weight: 800;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.permission-option {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 9px;
    background: var(--bg-white);
    color: var(--text-secondary);
    font-weight: 700;
}

.permission-option input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.users-modal {
    max-width: 760px;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 46px;
}

.password-visibility-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.15rem;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-visibility-toggle:hover,
.password-visibility-toggle:focus-visible {
    background: var(--bg-gray);
    color: var(--primary);
    outline: none;
}

@media (max-width: 720px) {
    .user-card {
        grid-template-columns: 1fr;
    }

    .user-card-actions,
    .permissions-header {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* MODAIS */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 2000; opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 16px; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: var(--bg-white); width: 100%; max-width: 650px; border-radius: var(--radius-xl); box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25); transform: scale(0.95) translateY(20px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); max-height: 90vh; display: flex; flex-direction: column; }
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-light); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.modal-close { background: linear-gradient(180deg, #ffffff, #f8fafc); border: 1px solid #dbe3ee; width: 32px; min-width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; color: var(--text-secondary); transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease; box-shadow: 0 10px 20px -20px rgba(15, 23, 42, .5), inset 0 1px 0 rgba(255, 255, 255, .82); }
.modal-close:hover { color: var(--danger); border-color: #fecaca; background: linear-gradient(180deg, #ffffff, #fef2f2); transform: translateY(-1px); box-shadow: 0 14px 24px -22px rgba(239, 68, 68, .58), inset 0 1px 0 rgba(255, 255, 255, .9); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-footer { padding: 20px 24px; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 12px; background: var(--bg-gray); border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
.info-box { background: var(--bg-gray-dark); padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 0.9rem; color: var(--text-secondary); display: flex; gap: 8px; align-items: flex-start; }
.info-box i { font-size: 1.2rem; color: var(--accent); flex-shrink: 0; }
.section-title { margin-bottom: 16px; color: var(--text-secondary); font-size: 0.9rem; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }

.model-actions {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.selected-model-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: var(--bg-gray);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 700;
}

.selected-model-summary i {
    color: var(--accent);
    font-size: 1rem;
}

.budget-model-modal {
    max-width: 980px;
}

.budget-model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

.budget-model-card {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    background: var(--bg-white);
    color: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.budget-model-card:hover,
.budget-model-card.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.budget-model-card.active {
    background: linear-gradient(180deg, #fff, var(--accent-soft));
}

.budget-model-info {
    display: grid;
    gap: 4px;
}

.budget-model-info strong {
    color: var(--primary);
    font-size: 0.94rem;
}

.budget-model-info small {
    color: var(--text-secondary);
    font-size: 0.78rem;
    line-height: 1.35;
}

.budget-model-check {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.budget-model-card.active .budget-model-check {
    opacity: 1;
    transform: scale(1);
}

.budget-model-thumb {
    position: relative;
    height: 136px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.budget-model-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(7,90,215,.08), transparent 48%);
}

.thumb-header,
.thumb-lines,
.thumb-grid,
.thumb-footer,
.thumb-hero {
    position: absolute;
}

.thumb-header {
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.thumb-header span {
    width: 44px;
    height: 14px;
    border-radius: 3px;
    background: var(--accent);
}

.thumb-header b {
    width: 34px;
    height: 10px;
    border-radius: 999px;
    background: #111827;
    opacity: .18;
}

.thumb-hero {
    top: 34px;
    right: 12px;
    width: 78px;
    height: 44px;
    border-radius: 5px;
    background: linear-gradient(135deg, #e5e7eb, #fff);
    border: 1px solid #d1d5db;
}

.thumb-lines {
    top: 38px;
    left: 12px;
    display: grid;
    gap: 6px;
    width: 84px;
}

.thumb-lines span {
    height: 7px;
    border-radius: 999px;
    background: #cbd5e1;
}

.thumb-lines span:first-child {
    width: 72px;
    height: 11px;
    background: #111827;
}

.thumb-lines span:nth-child(2) {
    width: 84px;
}

.thumb-lines span:nth-child(3) {
    width: 58px;
}

.thumb-grid {
    left: 12px;
    right: 12px;
    bottom: 22px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.thumb-grid span {
    height: 22px;
    border-radius: 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.thumb-footer {
    left: 12px;
    right: 12px;
    bottom: 10px;
    height: 5px;
    border-radius: 999px;
    background: var(--accent);
    opacity: .72;
}

.budget-model-thumb.minimal .thumb-hero,
.budget-model-thumb.executive .thumb-hero {
    display: none;
}

.budget-model-thumb.minimal .thumb-lines {
    left: 28px;
    right: 28px;
    width: auto;
    justify-items: center;
}

.budget-model-thumb.minimal .thumb-lines span:first-child {
    width: 92px;
}

.budget-model-thumb.catalog .thumb-grid {
    grid-template-columns: repeat(2, 1fr);
    top: 48px;
    bottom: auto;
}

.budget-model-thumb.catalog .thumb-grid span {
    height: 30px;
}

.budget-model-thumb.proposal .thumb-hero {
    top: 26px;
    right: 0;
    width: 112px;
    height: 58px;
    border-right: 0;
    border-radius: 6px 0 0 6px;
}

.budget-model-thumb.proposal .thumb-lines {
    width: 72px;
}

.budget-model-thumb.executive-premium::before,
.budget-model-thumb.executive::before {
    background: linear-gradient(135deg, #111827 0 36%, transparent 36%);
}

.budget-model-thumb.visual .thumb-hero {
    top: 24px;
    left: 18px;
    right: 18px;
    width: auto;
    height: 52px;
}

.budget-model-thumb.visual .thumb-lines {
    top: 88px;
    left: 22px;
    width: 120px;
}

.app-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.app-confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.app-confirm {
    width: min(460px, 100%);
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 14px;
    padding: 22px;
    border-radius: 14px;
    background: var(--bg-white);
    box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.45);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.18s ease;
}

.app-confirm-overlay.active .app-confirm {
    transform: translateY(0) scale(1);
}

.app-confirm-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #fff7ed;
    color: var(--warning);
    font-size: 1.45rem;
}

.app-confirm-danger .app-confirm-icon {
    background: #fef2f2;
    color: var(--danger);
}

.app-confirm-content h3 {
    margin: 0 0 6px;
    color: var(--primary);
    font-size: 1.05rem;
}

.app-confirm-content p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.45;
}

.app-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.app-number-dialog {
    grid-template-columns: 48px 1fr;
}

.app-number-icon {
    background: var(--accent-soft);
    color: var(--accent);
}

.app-number-field {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.app-number-field span {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
}

.app-number-field input {
    height: 46px;
    font-size: 1rem;
    font-weight: 750;
}

/* LISTAS E CARDS */
.items-grid { display: grid; gap: 12px; }
.item-card { background: var(--bg-white); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 20px; display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); transition: all 0.2s; gap: 16px; flex-wrap: wrap;}
.item-card:hover { border-color: var(--border-focus); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.item-details { flex: 1; min-width: 200px; }
.item-details h4 { font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; color: var(--primary); flex-wrap: wrap;}
.item-details h4 i { color: var(--text-tertiary); }
.item-meta { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap;}
.item-price-info { text-align: right; min-width: 120px; }
.item-total { font-weight: 800; font-size: 1.15rem; color: var(--primary); }
.item-discount { font-size: 0.8rem; color: var(--success); font-weight: 600; }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge { background: var(--bg-gray-dark); padding: 4px 10px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-light); white-space: nowrap;}
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-tertiary); background: var(--bg-gray); border-radius: var(--radius-lg); border: 1px dashed var(--border-light); }
.empty-state-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
/* ==========================================
   MODAIS (Caixas de Sobreposição)
   ========================================== */

/* O fundo escuro que cobre o ecrã todo */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6); /* Cor escura com 60% de opacidade */
    backdrop-filter: blur(4px); /* Efeito moderno de desfoque no fundo */
    display: none; /* Escondido por defeito. O JavaScript muda para 'flex' */
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Garante que fica por cima de tudo */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Classe adicionada pelo JavaScript para mostrar o modal */
.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* A caixa branca do modal em si */
.modal-content {
    background: var(--bg-white);
    width: 90%;
    max-width: 650px; /* Largura ideal para caber as grelhas duplas (span-2) */
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); /* Sombra 3D suave */
    display: flex;
    flex-direction: column;
    max-height: 90vh; /* Se o conteúdo for muito grande, não passa da altura do ecrã */
    transform: translateY(20px); /* Começa um pouco abaixo para o efeito de entrada */
    transition: transform 0.3s ease;
}

/* Efeito do modal a subir suavemente quando abre */
.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Cabeçalho do modal (Título e botão de fechar) */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

/* Corpo do modal onde ficam os campos (com scroll se necessário) */
.modal-body {
    padding: 24px;
    overflow-y: auto; /* Adiciona scrollbar automaticamente se os campos ultrapassarem a altura */
}

/* Rodapé do modal (Botões de Salvar/Cancelar) */
.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-gray);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
/* ==========================================
   ELEMENTOS AVANÇADOS DO MODAL (ABAS E TOGGLES)
   ========================================== */

/* Tamanho maior para o modal avançado */
.modal-large {
    max-width: 800px;
}

/* Navegação das Abas */
.modal-tabs {
    display: flex;
    gap: 8px;
    width: 100%;
    border-bottom: 2px solid var(--border-light);
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Conteúdo das Abas */
.aba-conteudo {
    display: none;
    animation: fadeInAba 0.3s ease;
}

.aba-conteudo.active {
    display: block;
}

@keyframes fadeInAba {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Toggle Switch (Ativo/Inativo) */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--border-light);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Área de Upload de Imagem */
.upload-area {
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    background: var(--bg-gray);
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.upload-area:hover {
    border-color: var(--accent);
    background: #f0f7ff;
}

.upload-area h4 {
    color: var(--primary);
    margin-bottom: 4px;
}

.upload-area p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
/* Correção para botões de ação na listagem de produtos */
.item-actions .btn {
    min-width: unset !important; /* Remove a largura mínima que estica o botão */
    padding: 0 16px !important;  /* Padding controlado */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

/* Botões quadrados de Editar/Excluir */
.btn-icon-only {
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    min-width: 38px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
}
