* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: #f8fafc;
    color: #334155;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
}

.logo {
    padding: 0 24px 24px 24px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo span {
    color: #2563eb;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-item:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

.nav-item.active {
    background-color: #0066ff;
    color: #ffffff;
}

.nav-item.active i {
    color: #ffffff;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-info h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.header-info p {
    color: #64748b;
}

.btn-primary {
    background-color: #0066ff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #0052cc;
}

/* Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-header i {
    font-size: 18px;
    color: #3b82f6;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

/* Wide Card */
.wide-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wide-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.wide-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #3b82f6;
}

/* List Card */
.list-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    min-height: 200px;
}

.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.list-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.list-card-link {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.list-card-link:hover {
    text-decoration: underline;
}

.list-card-empty {
    text-align: center;
    color: #64748b;
    font-size: 14px;
    padding: 40px 0;
}

/* Mobile Header */
.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.mobile-header .logo {
    padding: 0;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    gap: 12px;
}

.search-container i {
    color: #64748b;
    font-size: 20px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #0f172a;
    background: transparent;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #0f172a;
}

.modal-body {
    padding: 24px;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
    resize: vertical;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn-secondary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

/* Settings Card */
.settings-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    max-width: 700px;
}

.logo-upload-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-preview {
    width: 80px;
    height: 80px;
    background-color: #f1f5f9;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #64748b;
    font-size: 32px;
    border: 1px dashed #cbd5e1;
}

.logo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.help-text {
    font-size: 12px;
    color: #64748b;
}

.mt-8 { margin-top: 8px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }

/* View Toggle */
.view-section { display: none; }
.view-section.active { display: block; }

/* Orçamento Layout */
.orcamento-grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.orcamento-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.orcamento-sidebar { width: 320px; }

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 16px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    color: #0f172a;
    background-color: #ffffff;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
    appearance: auto;
}

.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.add-item-row {
    display: flex;
    gap: 12px;
}

.add-item-row .type-select { width: 140px; }
.add-item-row .item-select { flex: 1; }
.add-item-row .qty-input { width: 70px; text-align: center; }

.resumo-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    color: #334155;
}

.resumo-total {
    font-size: 24px;
    font-weight: 700;
    color: #3b82f6;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.mb-0 { margin-bottom: 0 !important; }

/* Tabela de Itens */
.itens-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.itens-table thead th {
    padding: 10px 12px;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.itens-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.itens-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-produto {
    background-color: #eff6ff;
    color: #2563eb;
}

.badge-servico {
    background-color: #fdf4ff;
    color: #9333ea;
}

.badge-pendente {
    background-color: #fffbeb;
    color: #d97706;
}

.badge-aprovado {
    background-color: #f0fdf4;
    color: #16a34a;
}

.badge-recusado {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Botão ícone deletar */
.btn-icon-delete {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-icon-delete:hover {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Select de Status inline */
.status-select {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    font-family: inherit;
}

.status-pendente {
    background-color: #fffbeb;
    color: #d97706;
}

.status-aprovado {
    background-color: #f0fdf4;
    color: #16a34a;
}

.status-recusado {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Toast de Notificação */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    color: #ffffff;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
}

.toast-show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast-success {
    background-color: #16a34a;
}

.toast-error {
    background-color: #dc2626;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -250px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }

    .sidebar.show {
        left: 0;
    }

    .main-content {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .wide-card-value {
        font-size: 28px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .orcamento-grid {
        flex-direction: column;
    }
    
    .orcamento-sidebar {
        width: 100%;
    }
    
    .add-item-row {
        flex-direction: column;
    }
    
    .add-item-row .type-select,
    .add-item-row .qty-input {
        width: 100%;
    }
}

/* ══════════════════════════════════════════════
   NOVOS ESTILOS: CARDS E TELA DE DETALHES
   ══════════════════════════════════════════════ */

/* Card de Orçamento (Lista) */
.orcamento-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.orcamento-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.orcamento-card-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orcamento-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.orcamento-card-number {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.orcamento-card-client {
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
}

.orcamento-card-meta {
    font-size: 13px;
    color: #94a3b8;
}

.orcamento-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.orcamento-card-price {
    font-size: 20px;
    font-weight: 700;
    color: #0066ff;
}

.orcamento-card-actions {
    display: flex;
    gap: 12px;
}

.btn-icon-export {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-icon-export:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

/* Action button items in Details page */
.btn-action-item {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    text-align: left;
}

.btn-action-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-action-delete {
    color: #ef4444;
}

.btn-action-delete:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

/* Badges for status */
.badge-aberto {
    background-color: #eff6ff;
    color: #2563eb;
}

.badge-aprovado {
    background-color: #f0fdf4;
    color: #16a34a;
}

.badge-recusado {
    background-color: #fef2f2;
    color: #dc2626;
}

/* Details screen styles */
.detalhes-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    background: #ffffff;
    transition: background-color 0.2s ease;
}

.detalhes-item-row:hover {
    background: #f8fafc;
}

.detalhes-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detalhes-item-name {
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
}

.detalhes-item-meta {
    font-size: 13px;
    color: #64748b;
}

.detalhes-item-price {
    font-weight: 600;
    font-size: 15px;
    color: #0f172a;
}
