/* -------------------------------------------------------------
 * Sistema de Design e EstilizaÃ§Ã£o - Controle de ProduÃ§Ã£o
 * Tema Escuro Premium (Glassmorphism & Cyber Steel)
 * ------------------------------------------------------------- */

 :root {
    /* Paleta de Cores Escuras */
    --bg-base: #090d16;
    --bg-surface: #111726;
    --bg-card: rgba(26, 36, 59, 0.45);
    --bg-modal: #0f1524;
    
    /* Cores de Destaque */
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.2);
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.2);
    
    /* Status da ProduÃ§Ã£o */
    --color-espera: #94a3b8;      /* Cinza */
    --color-producao: #f59e0b;    /* Amarelo Laranja */
    --color-finalizado: #8b5cf6;  /* Roxo */
    --color-entregue: #10b981;    /* Verde */
    
    /* Cores de Texto */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    /* Efeitos e Bordas */
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-focus: rgba(6, 182, 212, 0.4);
    --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-card: 0 4px 12px 0 rgba(0, 0, 0, 0.25);
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Outros */
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
}

/* 1. Reset Geral & Layout Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Fundo DinÃ¢mico Sutil */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}
body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.04) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* 2. UtilitÃ¡rios de Rolagem */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24);
}

/* 3. Estilos de BotÃ£o e FormulÃ¡rios */
button {
    font-family: inherit;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}
.btn-primary:hover {
    transform: translateY(-1px);
    opacity: 0.95;
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
    padding: 10px 18px;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-icon {
    background: transparent;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 50%;
}
.btn-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-remove-row {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: var(--radius-sm);
}
.btn-remove-row:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Inputs e Seletores */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    background: rgba(15, 21, 36, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 14px;
    transition: all var(--transition-fast);
    outline: none;
    width: 100%;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.grid-form-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}
.col-span-2 {
    grid-column: span 2;
}

/* 4. Login Container */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    animation: fadeIn var(--transition-smooth);
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}
.login-header h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}
.login-btn {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
}
.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 12px;
    color: var(--text-muted);
}
.error-text {
    color: #ef4444;
    font-size: 13px;
    margin-top: 5px;
    background: rgba(239, 68, 68, 0.1);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border-left: 3px solid #ef4444;
}

/* 5. Painel da AplicaÃ§Ã£o e Header */
.main-header {
    background: rgba(17, 23, 38, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon-small {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-logo h1 {
    font-size: 20px;
    font-weight: 700;
}
.header-logo h1 span {
    color: var(--accent-cyan);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Perfil UsuÃ¡rio */
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 1px solid var(--border-glass);
    padding-left: 15px;
}
.user-avatar {
    width: 38px;
    height: 38px;
    background: var(--accent-purple-glow);
    border: 1px solid var(--accent-purple);
    color: #c084fc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-info span:first-child {
    font-size: 14px;
    font-weight: 500;
}
.badge {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 2px 6px;
    border-radius: 20px;
    align-self: flex-start;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}
#user-display-role.badge-admin {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.3);
}
#user-display-role.badge-company {
    background: rgba(6, 182, 212, 0.2);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Main Area */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}
.content-view {
    animation: fadeIn var(--transition-smooth);
}
.view-header {
    margin-bottom: 25px;
}
.view-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}
.view-header h2 {
    font-size: 24px;
    font-weight: 600;
}
.view-header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* 6. Layout Kanban */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    min-height: 70vh;
}

@media (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 640px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }
}
.mobile-only {
    display: none !important;
}

@media (max-width: 768px) {
    .mobile-only {
        display: inline-flex !important;
    }
    .main-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    
    .header-actions {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--border-glass);
        box-shadow: var(--shadow-main);
        
        /* Hidden by default on mobile */
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: all var(--transition-fast);
        z-index: 999;
    }
    
    .header-actions.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
    }
    
    .header-actions button {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 18px;
    }
    
    .user-profile {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--border-glass);
        padding-top: 15px;
        padding-left: 0;
        margin-top: 5px;
        justify-content: flex-start;
    }
    
    #btn-logout {
        width: 100%;
        justify-content: flex-start;
        border-radius: var(--radius-sm);
        padding: 12px 18px;
        background: rgba(239, 68, 68, 0.1);
        color: #ef4444;
    }
    #btn-logout:hover {
        background: rgba(239, 68, 68, 0.2);
    }
    #btn-logout::after {
        content: "Sair do Sistema";
        margin-left: 8px;
        font-size: 14px;
        font-weight: 500;
    }
    .main-content {
        padding: 20px 15px;
    }
    .view-header-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .view-header-flex button {
        width: 100%;
        justify-content: center;
    }
}

.kanban-column {
    background: rgba(17, 23, 41, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.column-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-glass);
}
.column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.dot-espera { background-color: var(--color-espera); }
.dot-producao { background-color: var(--color-producao); }
.dot-finalizado { background-color: var(--color-finalizado); }
.dot-entregue { background-color: var(--color-entregue); }

.column-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
}
.column-count {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: auto;
}

/* Container de Cards e Dropzone */
.column-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
    overflow-y: auto;
    padding-right: 4px;
}
.column-cards-container.drag-over {
    background: rgba(255, 255, 255, 0.02);
    border: 1.5px dashed var(--accent-cyan);
    border-radius: var(--radius-md);
}

/* Cards de Pedido */
.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
    user-select: none;
    position: relative;
}
.order-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
.order-card.dragging {
    opacity: 0.4;
    transform: scale(0.96);
    border: 1px dashed var(--accent-cyan);
}

/* ConteÃºdo do Card */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.card-id {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-cyan);
    background: var(--accent-cyan-glow);
    padding: 2px 6px;
    border-radius: 4px;
}
.card-date {
    font-size: 11px;
    color: var(--text-muted);
}
.card-client {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* Lista de Itens no Card */
.card-items-list {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.card-item-line {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.item-qty {
    background: rgba(255, 255, 255, 0.08);
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 11px;
    margin-right: 4px;
    color: var(--text-primary);
}
.item-specs {
    font-weight: 500;
    color: var(--text-secondary);
}
.item-dims {
    color: var(--accent-cyan);
    font-weight: 500;
    font-family: monospace;
}
.btn-edit-item {
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
    background: transparent;
    padding: 1px 4px;
}
.btn-edit-item:hover {
    color: var(--accent-cyan);
    background: rgba(255, 255, 255, 0.05);
}

.card-notes {
    background: rgba(255, 255, 255, 0.03);
    border-left: 2px solid var(--accent-purple);
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 0 4px 4px 0;
    color: var(--text-muted);
    margin-top: 8px;
    font-style: italic;
}

/* Status Badges no Card (Mobile / Sem Drag) */
.card-actions-select {
    margin-top: 10px;
    border-top: 1px dashed var(--border-glass);
    padding-top: 8px;
}
.card-actions-select select {
    padding: 4px 8px;
    font-size: 11px;
}

/* 7. RelatÃ³rios & Tabelas */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
}

.filter-panel {
    padding: 20px;
    margin-bottom: 25px;
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}
.filter-form .form-group {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}
.filter-form .form-actions-inline {
    display: flex;
    gap: 10px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.kpi-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.kpi-title {
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}
.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-top: 5px;
}

.report-results {
    padding: 24px;
}
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.results-header h3 {
    font-size: 18px;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}
.report-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}
.report-table th,
.report-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-glass);
}
.report-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.report-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}
.empty-table-msg {
    text-align: center;
    color: var(--text-muted);
    padding: 40px !important;
}

/* AÃ§Ãµes de RelatÃ³rio */
.action-buttons-cell {
    display: flex;
    gap: 8px;
}

/* 8. Modais (Fundo e Estrutura) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 13, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 500;
    padding: 20px;
    animation: fadeIn var(--transition-fast);
}
.modal-card {
    background: var(--bg-modal);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: scaleUp var(--transition-smooth);
}
.modal-card-small {
    max-width: 450px;
}
.modal-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}
.btn-close {
    font-size: 28px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}
.btn-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

/* 9. VisualizaÃ§Ã£o de ProduÃ§Ã£o (Checklist) */
.production-view-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.production-item-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: background var(--transition-fast);
}
.production-item-row:hover {
    background: rgba(255, 255, 255, 0.06);
}
.production-item-row.is-completed {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
    opacity: 0.6;
}
.production-item-row.is-completed .prod-item-title {
    text-decoration: line-through;
    color: var(--text-muted);
}
.prod-checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}
.prod-checkbox {
    width: 32px;
    height: 32px;
    cursor: pointer;
    accent-color: var(--success);
}
.prod-item-details {
    flex: 1;
}
.prod-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.prod-item-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.prod-item-qty {
    background: var(--accent-purple-glow);
    color: #c084fc;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}
.prod-item-dims {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}
.dim-badge {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    color: var(--accent-cyan);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 15px;
    font-family: monospace;
    font-weight: 600;
}
.dim-badge span {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-right: 4px;
    font-family: 'Outfit', sans-serif;
}
.prod-item-attrs {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.prod-item-obs {
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid var(--color-producao);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    font-style: italic;
    color: #fcd34d;
}


.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Produto dinÃ¢mico no modal */
.products-list-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.products-list-wrapper h3 {
    font-size: 14px;
    color: var(--accent-cyan);
}
.product-item-row {
    border-bottom: 1px dashed var(--border-glass);
    padding-bottom: 16px;
    margin-bottom: 10px;
}
.product-item-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.row-header h4 {
    font-size: 13px;
    color: var(--text-muted);
}

/* 9. NotificaÃ§Ãµes Toast */
.toast-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}
.toast {
    background: #1e293b;
    color: var(--text-primary);
    border-left: 4px solid var(--accent-cyan);
    border-radius: 4px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 380px;
    animation: slideIn var(--transition-fast) forwards;
}
.toast.success { border-left-color: var(--color-entregue); }
.toast.error { border-left-color: #ef4444; }

/* 10. Estilos de ImpressÃ£o */
.print-only {
    display: none;
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 12px !important;
    }
    #app-container, 
    .modal-overlay,
    .toast-wrapper,
    ::-webkit-scrollbar {
        display: none !important;
    }
    .print-only {
        display: block !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 20px;
        width: 100%;
        height: auto;
    }
    
    /* Nota Fiscal / OrÃ§amento Formato Limpo */
    .print-header {
        border-bottom: 2px solid #000000;
        padding-bottom: 15px;
        margin-bottom: 25px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .print-title {
        font-size: 20px;
        font-weight: bold;
    }
    .print-meta {
        text-align: right;
        font-size: 11px;
    }
    .print-summary {
        margin: 20px 0;
        background: #f1f5f9;
        padding: 12px;
        border-radius: 4px;
        display: flex;
        justify-content: space-around;
        font-weight: bold;
    }
    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 15px;
    }
    .print-table th,
    .print-table td {
        border: 1px solid #cbd5e1;
        padding: 8px 10px;
        text-align: left;
    }
    .print-table th {
        background-color: #f1f5f9;
        font-weight: bold;
    }
}

/* 11. AnimaÃ§Ãµes Keyframe */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleUp {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Badge de NotificaÃ§Ã£o no Menu */
.header-actions button {
    position: relative;
}

.nav-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444; /* Vermelho vibrante */
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* --- 11. ESTILOS DE DESENHO E ANEXOS (ESBOÇOS) --- */
.product-attachment-area {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
}

.btn-attach-sketch {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.btn-attach-sketch:hover {
    background: rgba(139, 92, 246, 0.2);
}

.attachment-preview {
    margin-top: 10px;
    position: relative;
    display: inline-block;
    background: rgba(0,0,0,0.2);
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
}
.attachment-preview img {
    max-height: 150px;
    border-radius: var(--radius-sm);
    display: block;
}
.btn-remove-attachment {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.canvas-container {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid var(--border-glass);
}
#sketch-canvas {
    display: block;
    cursor: crosshair;
    width: 100%;
    max-width: 100%;
    touch-action: none; /* Prevents scrolling while drawing on mobile */
}

.drawing-tools {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px;
    border-radius: var(--radius-md);
}

.drawing-tools .form-group {
    margin-bottom: 0;
}
.drawing-tools label {
    margin-bottom: 4px;
    font-size: 11px;
}
.drawing-tools input[type="color"] {
    height: 36px;
    padding: 0;
    cursor: pointer;
}

/* -------------------------------------------------------------
 * 12. Estilos do Módulo Financeiro & Controle de Gastos
 * ------------------------------------------------------------- */
.border-success {
    border-left: 4px solid var(--color-entregue) !important;
}
.border-danger {
    border-left: 4px solid #ef4444 !important;
}
.border-primary {
    border-left: 4px solid var(--accent-cyan) !important;
}

.text-success {
    color: var(--color-entregue) !important;
}
.text-danger {
    color: #ef4444 !important;
}
.text-primary {
    color: var(--accent-cyan) !important;
}

.btn-price-tag {
    transition: all 0.2s ease;
}
.btn-price-tag:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    transform: scale(1.05);
}

.btn-delete-item:hover, .btn-remove-row:hover {
    color: #ef4444 !important;
}

@media (min-width: 1024px) {
    .finance-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}
