@import url('CSS/variables_app.css');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; 
}

/* --- CONFIGURAÇÃO GLOBAL DO BODY --- */
body {
    background-color: var(--bege-claro);
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

/* TRUQUE DE CSS: 
   Aplica centralização (Flex Center) APENAS se NÃO for a tela do Dashboard.
   Isso conserta o bug da tela "espremida" no meio.
*/
body:not(.dashboard-body) {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* --- ESTILOS DE FORMULÁRIOS E TELAS MENORES --- */
.container {
    background-color: var(--branco-neutro);
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--rosa-suave);
    overflow: hidden; 
    position: relative;
    margin: auto; /* Garante centralização se necessário */
}

/* Botão Voltar */
.btn-voltar {
    display: inline-block;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    transition: color 0.3s;
    font-weight: 600;
}

.btn-voltar:hover {
    color: var(--primary-pink);
}

.header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.header h2 {
    color: var(--titulo-escuro); /* Cor ajustada (Antigo Marrom) */
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1rem;
    width: 100%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--titulo-escuro); /* Cor ajustada */
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"], input[type="password"], input[type="number"], input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--rosa-suave);
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--white);
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box; 
}

input:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 4px var(--shadow);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-pink);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
    margin-bottom: 2rem;
}

.btn-submit:hover {
    background-color: var(--rosa-escuro);
    transform: translateY(-2px);
}

/* --- Estilos da Lista (Tabela) --- */
.lista-categorias {
    border-top: 2px dashed var(--rosa-suave);
    padding-top: 1.5rem;
}

.lista-categorias h3 {
    color: var(--titulo-escuro);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--rosa-suave);
    color: var(--text-dark);
    font-size: 0.9rem;
}

th {
    color: var(--titulo-escuro);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* Botões de Ação na Tabela */
.acoes {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-acao {
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-editar {
    background-color: var(--pastel-pink);
    color: var(--titulo-escuro);
}

.btn-editar:hover {
    background-color: var(--primary-pink);
    color: white;
}

.btn-excluir {
    background-color: #ffebee;
    color: #c62828;
}

.btn-excluir:hover {
    background-color: #ffcdd2;
}

/* Mensagens */
.mensagem {
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    width: 100%;
}

.sucesso { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.erro { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }


/* =========================================
   ESTILOS DO DASHBOARD (INDEX / PAINEL)
   ========================================= */

.dashboard-body {
    display: flex; /* Garante layout lado a lado */
    flex-direction: row;
    height: 100vh; /* Altura total da tela */
    width: 100vw;  /* Largura total */
    overflow: hidden; /* Evita scroll na tela principal */
    background-color: var(--bege-claro);
    justify-content: flex-start; /* FIX: Alinha itens no começo (Esquerda) */
    align-items: stretch; /* FIX: Estica altura total */
}

/* Menu Lateral (Sidebar) */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg); /* Nova cor rosa */
    color: var(--titulo-escuro); /* Texto escuro para contraste */
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
    flex-shrink: 0;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.logo-area {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff; /* Logo em branco para destaque no rosa */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.menu-items {
    flex: 1;
    overflow-y: auto;
    padding-top: 20px;
}

/* Botões do Menu */
.menu-btn {
    width: 100%;
    background: none;
    border: none;
    color: #fff; /* Texto branco no menu rosa */
    padding: 15px 20px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.menu-btn:hover {
    background-color: rgba(255,255,255,0.2);
    color: var(--white);
}

.menu-btn.active {
    background-color: var(--bege-claro); /* Fundo claro quando ativo */
    border-left-color: var(--titulo-escuro);
    color: var(--titulo-escuro); /* Texto escuro quando ativo */
}

/* Submenus (Cascata) */
.submenu {
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0,0,0,0.05); /* Levemente mais escuro que o rosa */
    transition: max-height 0.3s ease-out;
}

.submenu.open {
    max-height: 500px;
}

.submenu a {
    display: block;
    padding: 12px 20px 12px 40px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    cursor: pointer;
}

.submenu a:hover {
    color: var(--titulo-escuro);
    background-color: rgba(255,255,255,0.3);
    font-weight: 600;
}

/* Área Principal */
.main-content {
    flex: 1; /* Ocupa todo o espaço restante */
    display: flex;
    flex-direction: column;
    background-color: #f4f4f4;
    height: 100%; /* Garante altura total */
    min-width: 0; /* Evita quebra de layout flex */
}

/* Topo (Header) */
.top-bar {
    height: 60px;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-dark);
}

.btn-logout {
    color: var(--titulo-escuro);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--titulo-escuro);
    padding: 5px 15px;
    border-radius: 20px;
    transition: all 0.3s;
}

.btn-logout:hover {
    background-color: var(--titulo-escuro);
    color: white;
}

/* Sistema de Abas */
.tabs-container {
    background-color: #e0e0e0;
    display: flex;
    gap: 2px;
    padding: 10px 10px 0 10px;
    overflow-x: auto;
    border-bottom: 1px solid #ccc;
    flex-shrink: 0;
}

.tab {
    padding: 8px 15px;
    background-color: #d1d1d1;
    color: #666;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    transition: background 0.2s;
    min-width: 120px;
    justify-content: space-between;
}

.tab:hover {
    background-color: #ddd;
}

.tab.active {
    background-color: var(--white);
    color: var(--titulo-escuro);
    font-weight: 600;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.tab-close {
    font-size: 1.1rem;
    line-height: 10px;
    color: #999;
}

.tab-close:hover {
    color: #d32f2f;
}

/* Área onde as páginas carregam */
.tab-content-area {
    flex: 1; /* Cresce para ocupar o resto da tela */
    position: relative;
    background-color: var(--white);
    overflow: hidden; /* Iframe controla o scroll interno */
    display: flex; /* Necessário para o iframe esticar */
}

.tab-pane {
    display: none;
    width: 100%;
    height: 100%; /* Estica o iframe */
    border: none;
}

.tab-pane.active {
    display: block;
}

.arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
}
.menu-btn[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}
/* --- ESTILOS DE LISTAGEM, BUSCA E PAGINAÇÃO --- */

/* Barra Superior (Botão Novo + Busca) */
.barra-topo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-novo {
    background-color: #28a745; /* Verde para ação de criar */
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.3s;
    border: none;
    font-size: 0.9rem;
}

.btn-novo:hover {
    background-color: #218838;
}

.filtro-busca {
    display: flex;
    gap: 5px;
    flex: 1;
    max-width: 400px;
}

.filtro-busca input {
    padding: 10px;
    border: 1px solid var(--rosa-suave);
    border-radius: 8px;
    flex: 1;
}

.filtro-busca button {
    background-color: var(--titulo-escuro);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 8px;
    cursor: pointer;
}

/* Tabela Ajustada */
.tabela-container {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--rosa-suave);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background-color: var(--rosa-suave); /* Cabeçalho levemente rosa */
    color: var(--titulo-escuro);
    padding: 12px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

tr:hover {
    background-color: #fff0f5; /* Efeito hover rosa bem clarinho */
}

/* Paginação (Rodapé) */
.paginacao {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.paginacao a {
    padding: 8px 12px;
    border: 1px solid var(--rosa-suave);
    text-decoration: none;
    color: var(--titulo-escuro);
    border-radius: 5px;
    background: white;
    transition: all 0.2s;
}

.paginacao a:hover {
    background-color: var(--primary-pink);
    color: white;
    border-color: var(--primary-pink);
}

.paginacao a.ativo {
    background-color: var(--titulo-escuro);
    color: white;
    border-color: var(--titulo-escuro);
}

/* Abas Internas do Formulário */
.form-tabs {
    display: flex;
    border-bottom: 2px solid var(--rosa-suave);
    margin-bottom: 20px;
    gap: 5px;
}

.form-tab-btn {
    padding: 10px 20px;
    background: #f8f8f8;
    border: 1px solid var(--rosa-suave);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    color: var(--text-light);
    font-weight: 600;
    transition: all 0.3s;
}

.form-tab-btn.active {
    background: var(--primary-pink);
    color: white;
    border-color: var(--primary-pink);
}

.form-tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.form-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tabela de Preços Interna */
.tabela-precos-produto {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}

.tabela-precos-produto th {
    background-color: var(--marrom-chocolate);
    color: white;
    padding: 8px;
    text-align: left;
}

.tabela-precos-produto td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.btn-add-linha {
    background-color: #28a745;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-add-linha:hover {
    transform: scale(1.1);
    background-color: #218838;
}

.btn-remove-linha {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}
/* --- ANIMAÇÃO DE SUCESSO (MODAL) --- */
.overlay-sucesso {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Fundo escuro transparente */
    z-index: 10000; /* Fica acima de tudo */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-sucesso {
    background: white;
    padding: 30px 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: scale(0);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; /* Efeito de pulo */
    max-width: 90%;
}

.modal-sucesso h3 {
    color: var(--titulo-escuro);
    margin-top: 15px;
    font-size: 1.5rem;
}

.modal-sucesso p {
    color: var(--text-light);
    margin-top: 5px;
}

/* Ícone de Check Animado */
.checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
    background-color: #ffffff;
    border: 3px solid #4CAF50; /* Verde Sucesso */
    position: relative;
    animation: scaleCircle 0.3s ease-in-out 0.2s backwards;
}

.checkmark {
    width: 40px;
    height: 20px;
    border-bottom: 4px solid #4CAF50;
    border-right: 4px solid #4CAF50;
    display: block;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -60%) rotate(45deg) scale(0);
    animation: drawCheck 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

/* Keyframes (As regras da animação) */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes scaleCircle { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes drawCheck { 
    0% { width: 0; height: 0; transform: translate(-50%, -60%) rotate(45deg) scale(0); }
    50% { width: 0; height: 20px; transform: translate(-50%, -60%) rotate(45deg) scale(1); }
    100% { width: 40px; height: 20px; transform: translate(-50%, -60%) rotate(45deg) scale(1); }
}

/* ==========================================================================
   ESTILOS ESPECÍFICOS E UTILITÁRIOS (Migrados das telas PHP)
   ========================================================================== */

/* --- Ajustes Globais de Formulário --- */
select, 
input[type="text"], 
input[type="password"], 
input[type="number"], 
input[type="email"], 
input[type="date"],
textarea {
    width: 100%;
    box-sizing: border-box; /* Garante que padding não estoure a largura */
}

/* --- Layout de Colunas (Usado em Cliente e Preços) --- */
.form-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.col-half {
    flex: 1;
    min-width: 200px;
}

.col-third {
    flex: 1;
    min-width: 150px;
}

.section-title {
    color: var(--titulo-escuro);
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--rosa-suave);
    padding-bottom: 5px;
}

/* --- Tabela Responsiva --- */
.tabela-container {
    overflow-x: auto; /* Cria barra de rolagem horizontal em telas pequenas */
    background: white;
    border-radius: 10px;
    border: 1px solid var(--rosa-suave);
}

/* --- Cadastro de Produtos: Upload e Imagens --- */
.thumb-produto {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--rosa-suave);
}

.preview-area {
    width: 100%;
    height: 200px; /* Altura padrão, pode ser sobrescrita inline se precisar */
    background-color: #f9f9f9;
    border: 2px dashed var(--rosa-suave);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
    position: relative;
    text-align: center;
}

.preview-area img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-placeholder {
    color: var(--text-light);
    text-align: center;
}

.toggle-img {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.toggle-option {
    cursor: pointer;
    padding: 8px 15px;
    border: 1px solid var(--rosa-suave);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    background: white;
    transition: all 0.3s;
}

.toggle-option.active {
    background-color: var(--primary-pink);
    color: white;
    border-color: var(--primary-pink);
}

/* --- Tabela de Preços e Tags --- */
.preco-destaque {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

.tag-cat {
    background-color: var(--marrom-chocolate); /* Ou var(--titulo-escuro) se preferir */
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    white-space: nowrap;
}

/* --- Animações --- */
.linha-preco {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ESTILOS DO NOVO LAYOUT DE PRODUTO (Reference Style)
   ========================================================================== */

/* Barra de Ferramentas Superior */
.toolbar {
    background-color: var(--white);
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid var(--rosa-suave);
}

.toolbar-group {
    display: flex;
    gap: 10px;
}

.btn-tool {
    background-color: var(--branco-neutro);
    border: 1px solid var(--rosa-suave);
    color: var(--text-dark);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.btn-tool:hover {
    background-color: var(--bege-claro);
    border-color: var(--primary-pink);
    color: var(--primary-pink);
}

.btn-tool.primary {
    background-color: var(--primary-pink);
    color: white;
    border-color: var(--primary-pink);
}

.btn-tool.primary:hover {
    background-color: var(--rosa-escuro);
}

/* Painel Principal (Identificação) */
.panel {
    background-color: var(--white);
    border-radius: 5px;
    border-top: 3px solid var(--primary-pink); /* Detalhe visual */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

.panel-header {
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
    padding-bottom: 10px;
    font-weight: 600;
    color: var(--titulo-escuro);
    font-size: 1rem;
    display: flex;
    gap: 5px;
}

.panel-tab {
    padding: 5px 15px;
    background: var(--bege-claro);
    border-radius: 4px 4px 0 0;
    color: var(--text-light);
    cursor: default;
}
.panel-tab.active {
    background: var(--white);
    color: var(--primary-pink);
    border: 1px solid #eee;
    border-bottom: 2px solid var(--white); /* Conecta com o fundo */
    margin-bottom: -11px;
    font-weight: bold;
    z-index: 2;
}

/* Inputs minimalistas para o Header */
.input-clean {
    border: none;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    padding: 8px 0;
    background: transparent;
    transition: border 0.3s;
}
.input-clean:focus {
    border-bottom: 2px solid var(--primary-pink);
    box-shadow: none;
}

/* GRID DE PREÇOS (Estilo Tabela Excel) */
.grid-wrapper {
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.grid-table {
    width: 100%;
    border-collapse: collapse;
}

.grid-table th {
    background-color: #f0f0f0; /* Cinza bem claro para cabeçalho neutro */
    color: var(--text-dark);
    font-size: 0.85rem;
    padding: 8px 10px;
    border-bottom: 1px solid #ccc;
    border-right: 1px solid #e0e0e0;
    text-align: left;
    font-weight: 600;
}

.grid-table td {
    border-bottom: 1px solid #eee;
    border-right: 1px solid #f5f5f5;
    padding: 0; /* Padding zero para o input preencher tudo */
}

/* Input dentro da Grid para parecer planilha */
.grid-input {
    width: 100%;
    border: none;
    padding: 10px;
    background: transparent;
    font-size: 0.9rem;
    outline: none;
}

.grid-input:focus {
    background-color: #fff0f5; /* Leve rosa ao focar */
    box-shadow: inset 0 0 0 2px var(--rosa-suave);
}

/* Linha de Rodapé (Adicionar Novo) */
.grid-footer {
    background-color: #f9f9f9;
    border-top: 2px solid var(--rosa-suave);
}

/* Botões da Grid */
.btn-grid-action {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    transition: transform 0.2s;
}
.btn-grid-add { color: #28a745; }
.btn-grid-check { color: var(--primary-pink); cursor: default; } /* Visto estático */
.btn-grid-del { color: var(--text-light); }
.btn-grid-del:hover { color: #dc3545; }
.btn-grid-cancel { color: #dc3545; display: none; } /* X de cancelar */

/* Efeito de edição */
tr.editing .btn-grid-check { display: none; }
tr.editing .btn-grid-cancel { display: inline-block; }
tr.editing { background-color: #fff8e1; } /* Amarelo claro editando */

/* --- Badges de Status do Pedido --- */
.badge {
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.status-aberto { background-color: #e0e0e0; color: #555; border: 1px solid #ccc; }
.status-andamento { background-color: #fff3cd; color: #856404; border: 1px solid #ffeeba; }
.status-transito { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.status-entregue { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }

/* Ajuste para o valor total ficar destacado */
.valor-total {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-pink);
}
/* --- ESTILOS ARREDONDADOS E MODERNOS --- */

/* Arredondamento Geral de Inputs e Selects */
.input-rounded {
    border-radius: 25px !important; /* Arredondado forte */
    padding-left: 15px !important;
    border: 1px solid #ccc;
    height: 40px; /* Altura fixa para alinhar */
    transition: border-color 0.3s, box-shadow 0.3s;
}

.input-rounded:focus {
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
    outline: none;
}

/* Componente de Pesquisa (Autocomplete) */
.search-container {
    position: relative; /* Ponto de referência para o absolute */
    width: 100%;
    overflow: visible !important; /* CORREÇÃO: Permite que o filho saia da caixa */
}

.search-results {
    position: relative;
    top: 100%; /* Cola logo abaixo do input */
    left: 0;
    /* width: 100%; */ /* Opcional: força a largura igual ao input */
    min-width: 300px; /* CORREÇÃO: Garante uma largura mínima boa para ler o nome do produto */
    background: white;
    border: 1px solid #ddd;
    border-top: none; /* Remove borda dupla com o input */
    border-radius: 0 0 15px 15px;
    max-height: 200px;
    overflow-y: auto;
    
    /* CORREÇÃO DO BUG VISUAL: Z-Index alto e Shadow forte */
    z-index: 99999 !important; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    
    display: none; /* Escondido por padrão */
}

.search-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: background 0.2s;
    background-color: white; /* Garante fundo branco contra transparências */
}

.search-item:hover {
    background-color: #fff0f5; /* Rosa claro no hover */
    color: var(--primary-pink);
}

.search-item strong {
    color: var(--titulo-escuro);
    display: block; /* Nome do produto em linha própria */
}

.search-item small {
    color: #888;
    font-size: 0.8rem;
}

/* Botão Flutuante de Adicionar na Tabela */
.btn-add-floating {
    background-color: #28a745;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.btn-add-floating:hover {
    transform: scale(1.1);
    background-color: #218838;
}