/* ==========================================================================
   FSInmoCRM2 - SUITE CRM INMOBILIARIO 360
   Diseño de Alta Fidelidad para Localiza Tu Negocio
   ========================================================================== */

/* Variables Inmobiliarias */
:root {
    --inmo-primary: #6c804b;
    --inmo-primary-dark: #58693c;
    --inmo-primary-light: #f4f6f1;
    --inmo-primary-border: #d4decb;
    --inmo-dark: #09090b;
    --inmo-black: #18181b;
    --inmo-secondary: #0f766e;
    --inmo-accent: #f59e0b;
    --inmo-success: #10b981;
    --inmo-danger: #ef4444;
    --inmo-card-border: #e2e8f0;
}

/* KPI Cards */
.inmo-kpi-card {
    background: #ffffff;
    border: 1px solid var(--inmo-card-border);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    height: 100%;
}
.inmo-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}
.inmo-kpi-icon {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}
.inmo-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 2px;
}
.inmo-kpi-num {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
.inmo-kpi-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Pipeline / Funnel Horizontal */
.inmo-pipeline-container {
    background: #ffffff;
    border: 1px solid var(--inmo-card-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.inmo-pipeline-steps {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
}
.inmo-pipeline-step {
    flex: 1;
    min-width: 140px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    transition: all 0.15s ease;
    text-align: center;
    position: relative;
}
.inmo-pipeline-step:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}
.inmo-pipeline-step.active {
    background: #f4f6f1;
    border-color: #d4decb;
}
.inmo-pipeline-step-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 4px;
}
.inmo-pipeline-step-count {
    font-size: 1.25rem;
    font-weight: 800;
    color: #6c804b;
}
.inmo-pipeline-step-val {
    font-size: 0.7rem;
    color: #059669;
    font-weight: 600;
}

/* Inmueble Grid Cards */
.inmo-card {
    background: #ffffff;
    border: 1px solid var(--inmo-card-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.inmo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}
.inmo-card-media {
    position: relative;
    height: 190px;
    background-color: #f1f5f9;
    overflow: hidden;
}
.inmo-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.inmo-card:hover .inmo-card-img {
    transform: scale(1.03);
}
.inmo-card-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 2;
}
.inmo-card-price-tag {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.05rem;
    z-index: 2;
}
.inmo-card-ratio {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.85;
    margin-left: 4px;
}
.inmo-card-wp-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #0073aa;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
    z-index: 2;
}
.inmo-card-body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.inmo-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.inmo-card-location {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.inmo-card-features {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 12px;
    font-size: 0.75rem;
    color: #475569;
}
.inmo-card-feat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.inmo-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

/* Matching Demand Bar */
.match-score-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 6px;
}
.match-score-high {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}
.match-score-mid {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}
.match-score-low {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #e2e8f0;
}

/* Print Styles for Cartel Escaparate */
@media print {
    body {
        background: #ffffff !important;
        font-size: 12pt;
    }
    .localiza-navbar, .no-print, header, footer {
        display: none !important;
    }
    .escaparate-page {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        page-break-after: always;
    }
}

/* ==========================================================================
   FICHA CLIENTE 360 STYLING (SAAS MODERN DENSITY)
   ========================================================================== */
.tcc-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
}
.tcc-avatar-blue {
    background: linear-gradient(135deg, #09090b 0%, #18181b 40%, #58693c 100%);
}
.tcc-avatar-purple {
    background: linear-gradient(135deg, #18181b 0%, #581c87 100%);
}
.tcc-avatar-green {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}
.tcc-avatar-amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.c360-header-card {
    background: #ffffff;
    border: 1px solid var(--inmo-card-border);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.c360-kpi-card {
    background: #ffffff;
    border: 1px solid var(--inmo-card-border);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    height: 100%;
}
.c360-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-color: #cbd5e1;
}

/* 5 KPI Cards Holded Pastel Styles (matching Clientes360 screenshot) */
.c360-kpi-card.c360-kpi-green {
    background: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
}
.c360-kpi-card.c360-kpi-green .c360-kpi-label {
    color: #15803d !important;
}
.c360-kpi-card.c360-kpi-green .c360-kpi-value {
    color: #14532d !important;
}
.c360-kpi-card.c360-kpi-green .c360-kpi-subtext {
    color: #16a34a !important;
}

.c360-kpi-card.c360-kpi-amber {
    background: #fffbeb !important;
    border-color: #fef08a !important;
}
.c360-kpi-card.c360-kpi-amber .c360-kpi-label {
    color: #b45309 !important;
}
.c360-kpi-card.c360-kpi-amber .c360-kpi-value {
    color: #78350f !important;
}
.c360-kpi-card.c360-kpi-amber .c360-kpi-subtext {
    color: #b45309 !important;
}

.c360-kpi-card.c360-kpi-magenta,
.c360-kpi-card.c360-kpi-blue {
    background: #f4f6f1 !important;
    border-color: #d4decb !important;
}
.c360-kpi-card.c360-kpi-magenta .c360-kpi-label,
.c360-kpi-card.c360-kpi-blue .c360-kpi-label {
    color: #6c804b !important;
}
.c360-kpi-card.c360-kpi-magenta .c360-kpi-value,
.c360-kpi-card.c360-kpi-blue .c360-kpi-value {
    color: #09090b !important;
}
.c360-kpi-card.c360-kpi-magenta .c360-kpi-subtext,
.c360-kpi-card.c360-kpi-blue .c360-kpi-subtext {
    color: #58693c !important;
}

.c360-kpi-card.c360-kpi-purple {
    background: #faf5ff !important;
    border-color: #e9d5ff !important;
}
.c360-kpi-card.c360-kpi-purple .c360-kpi-label {
    color: #6d28d9 !important;
}
.c360-kpi-card.c360-kpi-purple .c360-kpi-value {
    color: #4c1d95 !important;
}
.c360-kpi-card.c360-kpi-purple .c360-kpi-subtext {
    color: #7c3aed !important;
}

.c360-kpi-card.c360-kpi-teal {
    background: #f0fdfa !important;
    border-color: #99f6e4 !important;
}
.c360-kpi-card.c360-kpi-teal .c360-kpi-label {
    color: #0f766e !important;
}
.c360-kpi-card.c360-kpi-teal .c360-kpi-value {
    color: #134e4a !important;
}
.c360-kpi-card.c360-kpi-teal .c360-kpi-subtext {
    color: #0d9488 !important;
}

.c360-kpi-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.c360-kpi-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 1px;
}

.c360-kpi-value {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.c360-kpi-subtext {
    font-size: 0.68rem;
    color: #94a3b8;
    margin-top: 1px;
}

/* Tabs and Pills for Cliente 360 & InmoFicha */
#c360Tabs, #inmuebleTabs {
    border-bottom: 1px solid #e2e8f0;
    gap: 4px;
}
#c360Tabs .nav-item, #inmuebleTabs .nav-item {
    margin-bottom: -1px;
}
#c360Tabs .nav-link, #inmuebleTabs .nav-link {
    border: 1px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    background: transparent;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#c360Tabs .nav-link i, #inmuebleTabs .nav-link i {
    color: #58693c;
}
#c360Tabs .nav-link:hover, #inmuebleTabs .nav-link:hover {
    color: #09090b;
    background: #f8fafc;
}
#c360Tabs .nav-link.active, #inmuebleTabs .nav-link.active {
    color: #09090b !important;
    background: #ffffff !important;
    border-color: #e2e8f0 #e2e8f0 #ffffff !important;
    border-bottom: 2px solid #ffffff !important;
    font-weight: 700;
}
#c360Tabs .nav-link.active i, #inmuebleTabs .nav-link.active i {
    color: #58693c;
}

#pills-doc-tab {
    gap: 8px;
    margin-bottom: 1.25rem;
}
#pills-doc-tab .nav-link {
    background-color: #f8fafc;
    color: #58693c;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
#pills-doc-tab .nav-link:hover {
    background-color: #f4f6f1;
    border-color: #d4decb;
    color: #58693c;
}
#pills-doc-tab .nav-link.active {
    background-color: #58693c !important;
    color: #ffffff !important;
    border-color: #58693c !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(131,24,67,0.25);
}

.table-c360 {
    font-size: 0.84rem;
    margin-bottom: 0;
}
.table-c360 thead th {
    background-color: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    padding: 11px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.table-c360 tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.table-c360 tbody tr:hover {
    background-color: #f8fafc;
}

.c360-subtabs-bar {
    background: #f8fafc;
    padding: 5px;
    border-radius: 12px;
    margin-bottom: 1.25rem;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    border: 1px solid #e2e8f0;
}
.c360-subtab-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 7px 16px;
    font-size: 0.80rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 8px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}
.c360-subtab-btn:hover {
    color: #58693c;
    background: #f4f6f1;
    border-color: #d4decb;
}
.c360-subtab-btn.active {
    background: #58693c !important;
    color: #ffffff !important;
    border-color: #58693c !important;
    box-shadow: 0 2px 6px rgba(108, 128, 75, 0.25);
    font-weight: 700;
}
.c360-subtab-btn.active i {
    color: #ffffff !important;
}

.input-highlight-yellow {
    background-color: #fefce8 !important;
    border-color: #fef08a !important;
    color: #1e293b !important;
    font-weight: 500;
}
.input-highlight-yellow:focus {
    background-color: #ffffff !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 0.15rem rgba(245, 158, 11, 0.12) !important;
}

.btn-wa-pill {
    background-color: #ecfdf5 !important;
    border: 1px solid #10b981 !important;
    color: #047857 !important;
    font-weight: 600;
    border-radius: 9999px !important;
    padding: 2px 10px;
    font-size: 0.74rem;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}
.btn-wa-pill:hover {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    transform: translateY(-1px);
}

.tr-legal-rep {
    background-color: #fffbeb !important;
}
.tr-legal-rep td {
    background-color: #fffbeb !important;
    border-top: 1px solid #fef08a;
    border-bottom: 1px solid #fef08a;
}

.c360-note-textarea {
    background-color: #fefce8 !important;
    border: 1px solid #fef08a !important;
    border-radius: 6px !important;
    font-size: 0.78rem;
    color: #374151;
    resize: vertical;
}
.c360-note-textarea:focus {
    background-color: #ffffff !important;
    border-color: #f59e0b !important;
}

.btn-direct-wa {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 600;
    padding: 7px 12px;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none !important;
}
.btn-direct-wa:hover {
    background-color: #059669 !important;
    color: #ffffff !important;
}

.c360-sidebar-card {
    background-color: #ffffff;
    border: 1px solid var(--inmo-card-border);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.c360-contact-row {
    padding: 5px 8px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.c360-contact-row:hover {
    background: #f1f5f9;
    border-color: #e2e8f0;
}

/* ==========================================================================
   HOLDED UI THEME FOR FACTURASCRIPTS & FSINMOCRM2
   Clean executive aesthetic: Inter, #f8fafc / #ffffff / #2563eb,
   soft borders #e2e8f0, rounded 12px cards, pill badges & minimalist navbar.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --fs-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fs-bg-main: #f8fafc;
    --fs-card-bg: #ffffff;
    --fs-card-border: #e2e8f0;
    --fs-primary: #6c804b;
    --fs-primary-hover: #58693c;
    --fs-primary-light: #f4f6f1;
    --fs-primary-border: #d4decb;
    --fs-dark: #09090b;
    --fs-black: #18181b;
    --fs-success: #10b981;
    --fs-success-bg: #ecfdf5;
    --fs-warning: #f59e0b;
    --fs-warning-bg: #fffbeb;
    --fs-danger: #ef4444;
    --fs-danger-bg: #fef2f2;
    --fs-text-main: #09090b;
    --fs-text-muted: #64748b;
    --fs-radius-sm: 6px;
    --fs-radius-md: 8px;
    --fs-radius-lg: 12px;
}

body {
    font-family: var(--fs-font-sans) !important;
    background-color: var(--fs-bg-main) !important;
    color: var(--fs-text-main) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 0.88rem;
}

/* ==========================================================================
   HOLDED TOP NAVBAR & MULTI-LEVEL DROPDOWN MENU
   ========================================================================== */
nav.navbar.bg-primary {
    background-color: #ffffff !important;
    background-image: none !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
    padding: 0.45rem 1.25rem !important;
}

.navbar-brand {
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    color: #09090b !important;
    display: flex;
    align-items: center;
    gap: 10px;
}
.navbar-brand img {
    filter: none !important;
    border-radius: 6px;
}
.navbar-brand span {
    color: #09090b !important;
    font-weight: 700 !important;
}

.navbar-nav .nav-link {
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
    padding: 0.45rem 0.9rem !important;
    border-radius: 8px !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 2px;
}
.navbar-nav .nav-link:hover {
    color: #09090b !important;
    background-color: #f1f5f9 !important;
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-item.active > .nav-link {
    color: #6c804b !important;
    background-color: #f4f6f1 !important;
    font-weight: 600 !important;
}

/* Dropdown Menus (Clean Floating Card) */
.navbar .dropdown-menu {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 30px -4px rgba(9, 9, 11, 0.14), 0 4px 10px -2px rgba(9, 9, 11, 0.06) !important;
    padding: 6px !important;
    background: #ffffff !important;
    min-width: 210px !important;
}

.navbar .dropdown-item {
    padding: 7px 12px !important;
    border-radius: 8px !important;
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    color: #334155 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    transition: all 0.15s ease !important;
}
.navbar .dropdown-item i {
    color: #64748b !important;
    font-size: 0.88rem !important;
    width: 18px !important;
    text-align: center;
    transition: color 0.15s ease;
}
.navbar .dropdown-item:hover {
    background-color: #f4f6f1 !important;
    color: #6c804b !important;
    transform: translateX(2px);
}
.navbar .dropdown-item:hover i {
    color: #6c804b !important;
}
.navbar .dropdown-item.active {
    background-color: #f4f6f1 !important;
    color: #6c804b !important;
    font-weight: 600 !important;
}
.navbar .dropdown-item.active i {
    color: #6c804b !important;
}

.navbar .dropdown-divider {
    border-top: 1px solid #f1f5f9 !important;
    margin: 4px 0 !important;
}

/* Dropdown Submenu Nested Flyout (Holded Style for Facturación -> Compras, Ventas, Contabilidad) */
.dropdown-submenu {
    position: relative;
}
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: 2px;
    display: none;
    box-shadow: 0 14px 32px -4px rgba(15, 23, 42, 0.14) !important;
}
.dropdown-submenu:hover > .dropdown-menu,
.dropdown-submenu:focus-within > .dropdown-menu {
    display: block !important;
    animation: fadeInSlideSubmenu 0.15s ease;
}
@keyframes fadeInSlideSubmenu {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.dropdown-submenu > a.dropdown-item::after {
    content: '\f054';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 0.65rem;
    color: #94a3b8;
}
.dropdown-submenu:hover > a.dropdown-item::after {
    color: #6c804b;
}

/* User & Utility Icons in Navbar */
#menuIconSettings, #menuIconSearch, #menuIconDashboard, #menuIconHelp, .holded-action-icon {
    font-size: 0.95rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 10px !important;
    padding: 0 !important;
    color: #64748b !important;
    background-color: transparent !important;
    border: 1px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    text-decoration: none !important;
}
#menuIconSettings:hover, #menuIconSearch:hover, #menuIconDashboard:hover, #menuIconHelp:hover, .holded-action-icon:hover {
    color: #6c804b !important;
    background-color: #f4f6f1 !important;
    border-color: #d4decb !important;
}
#menuIconSettings i {
    transition: transform 0.3s ease;
}
#menuIconSettings:hover i {
    transform: rotate(45deg);
}
#menuIconSettings.active, #menuIconSearch.active, .holded-action-icon.active {
    color: #6c804b !important;
    background-color: #f4f6f1 !important;
    border-color: #d4decb !important;
}

/* Holded User Pill */
.holded-user-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 3px 12px 3px 4px !important;
    border-radius: 9999px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #1e293b !important;
    transition: all 0.15s ease !important;
    text-decoration: none !important;
    height: 38px !important;
    width: auto !important;
}
.holded-user-pill:hover {
    border-color: #d4decb !important;
    background: #f4f6f1 !important;
    color: #09090b !important;
}
.holded-user-pill::after {
    display: none !important;
}
.holded-avatar-circle {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #09090b 0%, #18181b 40%, #58693c 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.78rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-shadow: 0 1px 3px rgba(108, 128, 75, 0.3) !important;
    flex-shrink: 0 !important;
}

/* ==========================================================================
   HOLDED GLOBAL CONTENT: CARDS, TABLES, BADGES, BUTTONS & FORMS
   ========================================================================== */

/* Modern Cards */
.card {
    background: #ffffff !important;
    border: 1px solid var(--fs-card-border) !important;
    border-radius: var(--fs-radius-lg) !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
    margin-bottom: 20px;
}
.card-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 14px 20px !important;
    font-weight: 700 !important;
    font-size: 0.94rem !important;
    color: #09090b !important;
    border-radius: var(--fs-radius-lg) var(--fs-radius-lg) 0 0 !important;
}
.card-body {
    padding: 20px !important;
}
.card-footer {
    background-color: #f8fafc !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 12px 20px !important;
    border-radius: 0 0 var(--fs-radius-lg) var(--fs-radius-lg) !important;
}

/* Modern Minimalist Tables */
.table {
    color: #1e293b !important;
    font-size: 0.86rem !important;
    margin-bottom: 0 !important;
}
.table thead th {
    background-color: #f8fafc !important;
    color: #64748b !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-top: none !important;
    padding: 10px 14px !important;
    vertical-align: middle !important;
}
.table tbody td {
    padding: 11px 14px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.table-hover tbody tr:hover {
    background-color: #f8fafc !important;
}

/* Modern Pill Badges */
.badge {
    border-radius: 9999px !important;
    padding: 4px 10px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
}
.badge.bg-success, .badge-success {
    background-color: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
}
.badge.bg-danger, .badge-danger {
    background-color: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}
.badge.bg-warning, .badge-warning {
    background-color: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}
.badge.bg-primary, .badge-primary {
    background-color: #f4f6f1 !important;
    color: #6c804b !important;
    border: 1px solid #d4decb !important;
}
.badge.bg-info, .badge-info {
    background-color: #f0fdfa !important;
    color: #0d9488 !important;
    border: 1px solid #99f6e4 !important;
}
.badge.bg-secondary, .badge-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

/* Modern Buttons */
.btn {
    border-radius: var(--fs-radius-md) !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    padding: 7px 15px !important;
    transition: all 0.15s ease !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.06);
}
.btn-primary {
    background-color: var(--fs-primary) !important;
    border-color: var(--fs-primary) !important;
    color: #ffffff !important;
}
.btn-primary:hover {
    background-color: var(--fs-primary-hover) !important;
    border-color: var(--fs-primary-hover) !important;
    box-shadow: 0 4px 6px -1px rgba(108, 128, 75, 0.3) !important;
}
.btn-outline-primary {
    color: var(--fs-primary) !important;
    border-color: var(--fs-primary) !important;
}
.btn-outline-primary:hover {
    background-color: var(--fs-primary) !important;
    border-color: var(--fs-primary) !important;
    color: #ffffff !important;
}
.text-primary {
    color: var(--fs-primary) !important;
}
.bg-primary-subtle {
    background-color: var(--fs-primary-light) !important;
    color: var(--fs-primary) !important;
}
.border-primary-subtle {
    border-color: var(--fs-primary-border) !important;
}
.btn-outline-secondary {
    border-color: #cbd5e1 !important;
    color: #475569 !important;
    background-color: #ffffff !important;
}
.btn-outline-secondary:hover {
    background-color: #f1f5f9 !important;
    color: #09090b !important;
    border-color: #94a3b8 !important;
}

/* Modern Form Controls */
.form-control, .form-select {
    border-radius: var(--fs-radius-md) !important;
    border: 1px solid #cbd5e1 !important;
    padding: 7px 12px !important;
    font-size: 0.88rem !important;
    color: var(--fs-text-main) !important;
    background-color: #ffffff !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--fs-primary) !important;
    box-shadow: 0 0 0 3px rgba(108, 128, 75, 0.18) !important;
    background-color: #ffffff !important;
    outline: none !important;
}

/* Sales & Purchases Document Wrappers */
#salesFormHeader,
#purchasesFormHeader,
#accountingFormHeader {
    background: #ffffff !important;
    border: 1px solid var(--fs-card-border) !important;
    border-radius: var(--fs-radius-lg) !important;
    padding: 16px 20px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04) !important;
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid #e2e8f0 !important;
    gap: 4px;
}
.nav-tabs .nav-link {
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    color: var(--fs-text-muted) !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    padding: 9px 16px !important;
    background: transparent !important;
    border-radius: 0 !important;
    transition: all 0.15s ease;
}
.nav-tabs .nav-link:hover {
    color: var(--fs-text-main) !important;
    border-bottom-color: #cbd5e1 !important;
}
.nav-tabs .nav-link.active {
    color: var(--fs-primary) !important;
    border-bottom: 2px solid var(--fs-primary) !important;
    background: transparent !important;
    font-weight: 700 !important;
}

/* ==========================================================================
   LOCALIZA CRM 360 - UNIFIED HARMONIC DESIGN SYSTEM (PERFECT PROPORTIONS)
   ========================================================================== */
.c360-wrapper {
    max-width: 1680px;
    margin: 0 auto;
}

/* Hero Header Card */
.c360-wrapper .c360-header-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.c360-wrapper .c360-avatar-large {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.c360-wrapper h1.h4,
.c360-wrapper h1.h5,
.c360-wrapper h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

/* 4 KPI Cards */
.c360-wrapper .c360-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.c360-wrapper .c360-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.c360-wrapper .c360-kpi-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.c360-wrapper .c360-kpi-label {
    font-size: 0.70rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 2px;
}

.c360-wrapper .c360-kpi-value {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.c360-wrapper .c360-kpi-subtext {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Master Navigation Tabs */
.c360-wrapper #c360Tabs,
.c360-wrapper #inmuebleTabs {
    border-bottom: 1px solid #e2e8f0;
    gap: 4px;
}
.c360-wrapper #c360Tabs .nav-link,
.c360-wrapper #inmuebleTabs .nav-link {
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    transition: all 0.15s ease;
    background: transparent !important;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.c360-wrapper #c360Tabs .nav-link:hover,
.c360-wrapper #inmuebleTabs .nav-link:hover {
    color: #0f172a;
}
.c360-wrapper #c360Tabs .nav-link.active,
.c360-wrapper #inmuebleTabs .nav-link.active {
    color: #58693c !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #58693c !important;
    background: transparent !important;
}

/* Subtabs Pills */
.c360-wrapper .c360-subtabs-bar {
    background: #f8fafc;
    padding: 5px;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    border: 1px solid #e2e8f0;
}
.c360-wrapper .c360-subtab-btn {
    background: transparent;
    border: 1px solid transparent;
    padding: 6px 14px;
    font-size: 0.80rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 7px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}
.c360-wrapper .c360-subtab-btn:hover {
    color: #58693c;
    background: #f4f6f1;
    border-color: #d4decb;
}
.c360-wrapper .c360-subtab-btn.active {
    background: #58693c !important;
    color: #ffffff !important;
    border-color: #58693c !important;
    box-shadow: 0 2px 6px rgba(108, 128, 75, 0.25);
    font-weight: 700;
}
.c360-wrapper .c360-subtab-btn.active i {
    color: #ffffff !important;
}

/* Inner Section Cards */
.c360-wrapper .card {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.c360-wrapper .card-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 11px 16px;
    font-size: 0.84rem;
    font-weight: 600;
}
.c360-wrapper .card-body {
    padding: 16px;
}

/* Form Controls & Labels (Harmonic SaaS Size: 36px) */
.c360-wrapper .form-label {
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 5px !important;
    display: block !important;
    line-height: 1.3 !important;
}
.c360-wrapper .form-control,
.c360-wrapper .form-control-sm,
.c360-wrapper .form-select,
.c360-wrapper .form-select-sm {
    height: 36px !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
    font-size: 0.84rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    line-height: 1.4 !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.c360-wrapper .form-control:focus,
.c360-wrapper .form-select:focus {
    border-color: #58693c !important;
    box-shadow: 0 0 0 3px rgba(108, 128, 75, 0.12) !important;
    background-color: #ffffff !important;
    outline: none !important;
}
.c360-wrapper textarea.form-control {
    height: auto !important;
    min-height: 85px !important;
    padding: 8px 12px !important;
    font-size: 0.84rem !important;
}
.c360-wrapper .input-group-text {
    height: 36px !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
    font-size: 0.80rem !important;
    border-radius: 6px !important;
}
.c360-wrapper .btn-sm {
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
}

/* ==========================================================================
   FACTURASCRIPTS NATIVE SALES & PURCHASES DOCUMENT EDITION THEME
   EditPedidoCliente, EditFacturaCliente, EditAlbaranCliente, EditPresupuestoCliente,
   EditPedidoProveedor, EditFacturaProveedor, EditAlbaranProveedor, EditPresupuestoProveedor
   ========================================================================== */

/* 0. BASE DOCUMENT CONTAINER & MAX-WIDTH (Matches Ventas360 & ListCliente360) */
body,
.tab-content,
form[name="salesForm"],
form[name="purchasesForm"] {
    background-color: #f8fafc !important;
}

.container-fluid.d-print-none,
.nav-tabs-wrapper,
#mainTabsContent {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

#mainTabsContent {
    padding-top: 4px !important;
}

/* 1. TOP HEADER & TOOLBAR ACTIONS */
.container-fluid.d-print-none {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 3px solid #6c804b !important;
    border-radius: 18px !important;
    padding: 1.15rem 1.5rem !important;
    margin-top: 12px !important;
    margin-bottom: 14px !important;
    box-shadow: 0 4px 20px -4px rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.02) !important;
}

.container-fluid.d-print-none .row {
    align-items: center !important;
}

.container-fluid.d-print-none .btn-group {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.container-fluid.d-print-none .btn-secondary,
.container-fluid.d-print-none .btn-group .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    border-radius: 9px !important;
    padding: 7px 15px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
}
.container-fluid.d-print-none .btn-secondary:hover,
.container-fluid.d-print-none .btn-group .btn-secondary:hover {
    background: #f4f6f1 !important;
    border-color: #d4decb !important;
    color: #58693c !important;
}

.container-fluid.d-print-none .btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}
.container-fluid.d-print-none .btn-group > .btn:nth-child(n+2) {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* + Nuevo / Principal button in toolbar */
.container-fluid.d-print-none .btn-success {
    background: #6c804b !important;
    border: 1px solid #6c804b !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    border-radius: 9px !important;
    padding: 7px 18px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    box-shadow: 0 2px 8px rgba(108, 128, 75, 0.25) !important;
    transition: all 0.15s ease !important;
}
.container-fluid.d-print-none .btn-success:hover {
    background: #58693c !important;
    border-color: #58693c !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

/* Right side document title & badge */
.container-fluid.d-print-none .col-md.text-end {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 12px !important;
}
.container-fluid.d-print-none .col-md.text-end i.fa-3x,
.container-fluid.d-print-none .col-md.text-end .fa-3x {
    font-size: 1.15rem !important;
    width: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f4f6f1 !important;
    color: #58693c !important;
    border: 1px solid #d4decb !important;
    border-radius: 10px !important;
    padding: 0 !important;
    float: none !important;
    margin: 0 !important;
    order: 2 !important;
    flex-shrink: 0 !important;
    box-shadow: 0 1px 3px rgba(108, 128, 75, 0.1) !important;
}
.container-fluid.d-print-none .col-md.text-end h1.h5 {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    color: #09090b !important;
    letter-spacing: -0.02em !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}
.container-fluid.d-print-none .col-md.text-end p.text-info {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #58693c !important;
    background: #f4f6f1 !important;
    border: 1px solid #d4decb !important;
    border-radius: 20px !important;
    padding: 2px 10px !important;
    display: inline-block !important;
    margin: 0 !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
}

/* 2. NAV TABS BAR */
.nav-tabs-wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 6px 10px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}
.nav-tabs-scroll {
    border-bottom: none !important;
    gap: 6px !important;
}
.nav-tabs-scroll .nav-link {
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    border: none !important;
    border-radius: 9px !important;
    padding: 8px 16px !important;
    background: transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    transition: all 0.15s ease !important;
}
.nav-tabs-scroll .nav-link:hover {
    color: #58693c !important;
    background: #f4f6f1 !important;
}
.nav-tabs-scroll .nav-link.active {
    color: #ffffff !important;
    background: #6c804b !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(108, 128, 75, 0.25) !important;
}
.nav-tabs-scroll .nav-link .badge {
    background: #f1f5f9 !important;
    color: #64748b !important;
    font-weight: 700 !important;
    font-size: 0.70rem !important;
    border-radius: 20px !important;
    padding: 2px 7px !important;
    margin-left: 4px !important;
}
.nav-tabs-scroll .nav-link.active .badge {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

/* 3. DOCUMENT HEADER FORM (CLIENT, DATE, SERIE, PAYMENT, PROPOSAL, TOTAL) */
#salesFormHeader,
#purchasesFormHeader,
form[name="salesForm"] > .container-fluid:first-child,
form[name="purchasesForm"] > .container-fluid:first-child {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    padding: 20px 24px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

#salesFormHeader .mb-2,
#purchasesFormHeader .mb-2 {
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    color: #58693c !important;
    margin-bottom: 6px !important;
}

#salesFormHeader .mb-2 a,
#purchasesFormHeader .mb-2 a {
    color: #09090b !important;
    text-decoration: none !important;
    font-weight: 700 !important;
}
#salesFormHeader .mb-2 a:hover,
#purchasesFormHeader .mb-2 a:hover {
    text-decoration: underline !important;
    color: #6c804b !important;
}

/* Form inputs & selects */
#salesFormHeader .form-control,
#purchasesFormHeader .form-control,
#salesFormHeader .form-select,
#purchasesFormHeader .form-select {
    height: 38px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    color: #09090b !important;
    background-color: #ffffff !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
}
#salesFormHeader input[type="date"],
#purchasesFormHeader input[type="date"] {
    background-color: #ffffff !important;
    color: #09090b !important;
}
#salesFormHeader input[type="date"]::-webkit-calendar-picker-indicator,
#purchasesFormHeader input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer !important;
    opacity: 0.6 !important;
    transition: opacity 0.15s ease !important;
}
#salesFormHeader input[type="date"]::-webkit-calendar-picker-indicator:hover,
#purchasesFormHeader input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1 !important;
}

/* Total input in header */
#salesFormHeader input[name="total"],
#purchasesFormHeader input[name="total"] {
    background-color: #f4f6f1 !important;
    border-color: #d4decb !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    color: #09090b !important;
    text-align: right !important;
    font-family: var(--bs-font-monospace) !important;
}

/* Save Floppy Disk Button in Header Total input-group */
#salesFormHeader .input-group button[onclick*="salesFormSave"],
#purchasesFormHeader .input-group button[onclick*="purchasesFormSave"],
#salesFormHeader .input-group .btn-primary,
#purchasesFormHeader .input-group .btn-primary {
    background: #6c804b !important;
    border-color: #6c804b !important;
    color: #ffffff !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    transition: all 0.15s ease !important;
}
#salesFormHeader .input-group button[onclick*="salesFormSave"]:hover,
#purchasesFormHeader .input-group button[onclick*="purchasesFormSave"]:hover,
#salesFormHeader .input-group .btn-primary:hover,
#purchasesFormHeader .input-group .btn-primary:hover {
    background: #58693c !important;
    border-color: #58693c !important;
    color: #ffffff !important;
}

/* Override Webkit Yellow Autofill on Document Forms */
form[name="salesForm"] input:-webkit-autofill,
form[name="purchasesForm"] input:-webkit-autofill,
form[name="salesForm"] input:-webkit-autofill:hover,
form[name="purchasesForm"] input:-webkit-autofill:hover,
form[name="salesForm"] input:-webkit-autofill:focus,
form[name="purchasesForm"] input:-webkit-autofill:focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #09090b !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
}
#salesFormHeader .form-control:focus,
#purchasesFormHeader .form-control:focus,
#salesFormHeader .form-select:focus,
#purchasesFormHeader .form-select:focus {
    border-color: #6c804b !important;
    box-shadow: 0 0 0 3px rgba(108, 128, 75, 0.12) !important;
    background-color: #ffffff !important;
}

/* Input group buttons (e.g. edit customer pen icon) */
#salesFormHeader .input-group .btn,
#purchasesFormHeader .input-group .btn {
    border: 1px solid #cbd5e1 !important;
    border-left: none !important;
    background: #ffffff !important;
    color: #64748b !important;
    border-top-right-radius: 10px !important;
    border-bottom-right-radius: 10px !important;
    height: 38px !important;
    padding: 0 12px !important;
}
#salesFormHeader .input-group .btn:hover,
#purchasesFormHeader .input-group .btn:hover {
    background: #f4f6f1 !important;
    color: #58693c !important;
}
#salesFormHeader .input-group .form-control,
#purchasesFormHeader .input-group .form-control {
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

/* "Detalle" / Auxiliary buttons */
#salesFormHeader .btn-outline-secondary,
#purchasesFormHeader .btn-outline-secondary {
    height: 32px !important;
    border-radius: 8px !important;
    font-size: 0.74rem !important;
    font-weight: 600 !important;
    padding: 0 12px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #475569 !important;
    margin-top: 4px !important;
}
#salesFormHeader .btn-outline-secondary:hover,
#purchasesFormHeader .btn-outline-secondary:hover {
    background: #f1f5f9 !important;
    color: #09090b !important;
}

/* Badges and links in Header bottom row - BRAND OLIVE PILL */
#salesFormHeader a[href*="EditCPPropuesta"],
#salesFormHeader a[href*="EditCPV"],
#salesFormHeader .btn[href*="Propuesta"] {
    background: #f3f6ee !important;
    border: 1px solid #d4e0c4 !important;
    color: #55673d !important;
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    border-radius: 20px !important;
    padding: 5px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    transition: all 0.15s ease !important;
}
#salesFormHeader a[href*="EditCPPropuesta"]:hover,
#salesFormHeader a[href*="EditCPV"]:hover,
#salesFormHeader .btn[href*="Propuesta"]:hover {
    background: #6c804b !important;
    color: #ffffff !important;
    border-color: #6c804b !important;
}

/* Links to albaranes / pedidos / facturas related - SOFT SAGE / SLATE */
#salesFormHeader .btn-outline-primary,
#purchasesFormHeader .btn-outline-primary {
    border-radius: 20px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    padding: 4px 12px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #334155 !important;
    transition: all 0.15s ease !important;
}
#salesFormHeader .btn-outline-primary:hover,
#purchasesFormHeader .btn-outline-primary:hover {
    background: #09090b !important;
    border-color: #09090b !important;
    color: #ffffff !important;
}

/* Document State Button (e.g. "Abierto" / "Boceto") */
#salesFormHeader .btn-group .dropdown-toggle,
#purchasesFormHeader .btn-group .dropdown-toggle,
#document-state-btn {
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.80rem !important;
    height: 38px !important;
    padding: 0 16px !important;
    background: #18181b !important;
    border-color: #18181b !important;
    color: #ffffff !important;
}

/* 4. DOCUMENT LINES GRID / TABLE */
#salesFormLines,
#purchasesFormLines {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 18px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
    overflow: hidden !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
}

/* Column Header Row - SOFT OLIVE / SAGE TINT */
#salesFormLines .titles,
#purchasesFormLines .titles,
#salesFormLines .titles th,
#salesFormLines .titles td,
#salesFormLines .titles div,
#salesFormLines .titles span,
#salesFormLines .titles a,
#purchasesFormLines .titles th,
#purchasesFormLines .titles td,
#purchasesFormLines .titles div,
#purchasesFormLines .titles span,
#purchasesFormLines .titles a {
    background: #f4f6f1 !important;
    color: #58693c !important;
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
}

#salesFormLines .titles,
#purchasesFormLines .titles {
    border-bottom: 1px solid #d4decb !important;
    padding: 12px 18px !important;
    margin: 0 !important;
}

/* Individual Line Row */
#salesFormLines .fs-line,
#purchasesFormLines .fs-line {
    padding: 10px 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
    transition: background 0.12s ease !important;
    margin: 0 !important;
    align-items: center !important;
}
#salesFormLines .fs-line:hover,
#purchasesFormLines .fs-line:hover {
    background: #fbfdfa !important;
}
#salesFormLines .fs-line:last-child,
#purchasesFormLines .fs-line:last-child {
    border-bottom: none !important;
}

/* Product Reference */
#salesFormLines .fs-line a[href*="EditProducto"],
#purchasesFormLines .fs-line a[href*="EditProducto"],
#salesFormLines .doc-line-ref,
#purchasesFormLines .doc-line-ref,
#salesFormLines .columReferencia a {
    font-weight: 700 !important;
    color: #09090b !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 0.80rem !important;
    letter-spacing: -0.01em !important;
    text-decoration: none !important;
}
#salesFormLines .fs-line a[href*="EditProducto"]:hover,
#purchasesFormLines .fs-line a[href*="EditProducto"]:hover,
#salesFormLines .columReferencia a:hover {
    text-decoration: underline !important;
    color: #6c804b !important;
}

/* Description Textarea: CLEAN & INTEGRATED */
#salesFormLines .fs-line .doc-line-desc,
#purchasesFormLines .fs-line .doc-line-desc {
    font-size: 0.84rem !important;
    font-weight: 500 !important;
    color: #1e293b !important;
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    padding: 5px 8px !important;
    resize: none !important;
    overflow: hidden !important;
    min-height: 30px !important;
    line-height: 1.35 !important;
    transition: all 0.15s ease !important;
}
#salesFormLines .fs-line .doc-line-desc:hover {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}
#salesFormLines .fs-line .doc-line-desc:focus {
    background: #ffffff !important;
    border-color: #6c804b !important;
    box-shadow: 0 0 0 2px rgba(108, 128, 75, 0.12) !important;
    outline: none !important;
}

/* Numbers: Quantity, Price, Discount */
#salesFormLines .fs-line input[type="number"],
#purchasesFormLines .fs-line input[type="number"] {
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background: transparent !important;
    font-size: 0.86rem !important;
    font-weight: 600 !important;
    color: #09090b !important;
    padding: 5px 8px !important;
    text-align: right !important;
    transition: all 0.15s ease !important;
}
#salesFormLines .fs-line input[type="number"]:hover {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}
#salesFormLines .fs-line input[type="number"]:focus {
    background: #ffffff !important;
    border-color: #6c804b !important;
    box-shadow: 0 0 0 2px rgba(108, 128, 75, 0.12) !important;
    outline: none !important;
}

/* Stock Pills */
#salesFormLines .fs-line .btn-outline-success,
#salesFormLines .fs-line .btn-outline-danger {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    padding: 2px 7px !important;
    border-radius: 20px !important;
    height: auto !important;
    margin-left: 2px !important;
}

/* Tax Select Dropdown */
#salesFormLines .fs-line select.form-select,
#purchasesFormLines .fs-line select.form-select {
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    background-color: transparent !important;
    font-size: 0.80rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    padding: 5px 20px 5px 8px !important;
    transition: all 0.15s ease !important;
}
#salesFormLines .fs-line select.form-select:hover {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
}
#salesFormLines .fs-line select.form-select:focus {
    background-color: #ffffff !important;
    border-color: #6c804b !important;
    box-shadow: 0 0 0 2px rgba(108, 128, 75, 0.12) !important;
}

/* Line Total (Neto / Subtotal) */
#salesFormLines .columNeto,
#salesFormLines .columSubtotal,
#purchasesFormLines .columNeto,
#purchasesFormLines .columSubtotal {
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #09090b !important;
    text-align: right !important;
    font-family: var(--bs-font-monospace) !important;
}

/* Line Action Buttons (trash, dots) */
#salesFormLines button[onclick*="rm-line"],
#purchasesFormLines button[onclick*="rm-line"],
#salesFormLines .btn-delete-line,
#purchasesFormLines .btn-delete-line {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    border: 1px solid #fee2e2 !important;
    background: #fff5f5 !important;
    color: #ef4444 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.74rem !important;
    transition: all 0.15s ease !important;
}
#salesFormLines button[onclick*="rm-line"]:hover,
#purchasesFormLines button[onclick*="rm-line"]:hover,
#salesFormLines .btn-delete-line:hover,
#purchasesFormLines .btn-delete-line:hover {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

#salesFormLines .fs-line .btn-outline-secondary,
#purchasesFormLines .fs-line .btn-outline-secondary {
    width: 28px !important;
    height: 28px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    color: #64748b !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.74rem !important;
}

/* 5. FAST PRODUCT BAR & FAST LINE CONTROLS */
#salesFormFooter > .container-fluid > .row:first-child,
#purchasesFormFooter > .container-fluid > .row:first-child,
form[name="salesForm"] .container-fluid.mt-3 > .row:first-child,
form[name="purchasesForm"] .container-fluid.mt-3 > .row:first-child {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 12px 18px !important;
    margin-bottom: 16px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

#findProductInput {
    height: 38px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 0.84rem !important;
    padding: 0 14px !important;
    background: #ffffff !important;
}

#btnFastProduct,
[data-bs-target="#findProductModal"],
#findProductModalBtn,
.btn-info[data-bs-target*="findProduct"] {
    height: 38px !important;
    background: #f4f6f1 !important;
    border: 1px solid #d4decb !important;
    color: #58693c !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    padding: 0 16px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
}
#btnFastProduct:hover,
[data-bs-target="#findProductModal"]:hover,
#findProductModalBtn:hover,
.btn-info[data-bs-target*="findProduct"]:hover {
    background: #6c804b !important;
    border-color: #6c804b !important;
    color: #ffffff !important;
}

#btnFastLine,
button[onclick*="new-line"] {
    height: 38px !important;
    background: #6c804b !important;
    border: 1px solid #6c804b !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.83rem !important;
    padding: 0 18px !important;
    box-shadow: 0 2px 6px rgba(108, 128, 75, 0.2) !important;
    transition: all 0.15s ease !important;
}
#btnFastLine:hover,
button[onclick*="new-line"]:hover {
    background: #58693c !important;
    border-color: #58693c !important;
    transform: translateY(-1px) !important;
}

#sortableBtn {
    height: 38px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    padding: 0 14px !important;
}

#btnSubtotalNeto {
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid #d4decb !important;
}
#btnSubtotalNeto .btn {
    height: 38px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 0 14px !important;
    border: none !important;
    background: #f4f6f1 !important;
    color: #58693c !important;
}
#btnSubtotalNeto .btn.active {
    background: #6c804b !important;
    color: #ffffff !important;
}

/* 6. OBSERVACIONES & TOTALS CARDS */
#salesFormFooter,
#purchasesFormFooter,
form[name="salesForm"] .container-fluid.mt-3,
form[name="purchasesForm"] .container-fluid.mt-3 {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

/* Observaciones Box */
#salesFormFooter textarea[name="observaciones"],
#purchasesFormFooter textarea[name="observaciones"] {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    font-size: 0.83rem !important;
    padding: 14px !important;
    min-height: 80px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

/* Totals Metric Cards */
#salesFormFooter > .container-fluid > .row:nth-child(2) > div:not(:first-child),
#purchasesFormFooter > .container-fluid > .row:nth-child(2) > div:not(:first-child),
form[name="salesForm"] .container-fluid.mt-3 > .row:nth-child(2) > div:not(:first-child),
form[name="purchasesForm"] .container-fluid.mt-3 > .row:nth-child(2) > div:not(:first-child) {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 10px 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    margin-top: 6px !important;
}

#salesFormFooter input[name="total"],
#purchasesFormFooter input[name="total"] {
    font-size: 1.30rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    background: transparent !important;
    border: none !important;
    text-align: right !important;
    font-family: var(--bs-font-monospace) !important;
}
#salesFormFooter input[name="totalbeneficio"] {
    font-size: 1.10rem !important;
    font-weight: 800 !important;
    color: #10b981 !important;
    background: transparent !important;
    border: none !important;
    text-align: right !important;
    font-family: var(--bs-font-monospace) !important;
}

/* 7. BOTTOM ACTION BUTTONS ROW */
#salesFormFooter > .container-fluid > .row:last-child,
#purchasesFormFooter > .container-fluid > .row:last-child,
form[name="salesForm"] .container-fluid.mt-3 > .row:last-child,
form[name="purchasesForm"] .container-fluid.mt-3 > .row:last-child {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 14px 20px !important;
    margin-top: 16px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

/* Guardar Button (Save) */
button[name="btn-save"],
form[name="salesForm"] .btn-success,
form[name="purchasesForm"] .btn-success {
    background: #6c804b !important;
    border: 1px solid #6c804b !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 9px 26px !important;
    box-shadow: 0 2px 8px rgba(108, 128, 75, 0.25) !important;
    transition: all 0.15s ease !important;
}
button[name="btn-save"]:hover,
form[name="salesForm"] .btn-success:hover,
form[name="purchasesForm"] .btn-success:hover {
    background: #58693c !important;
    border-color: #58693c !important;
    transform: translateY(-1px) !important;
}

/* Deshacer Button (Undo) */
button[name="btn-undo"],
form[name="salesForm"] .btn-secondary,
form[name="purchasesForm"] .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.83rem !important;
    padding: 9px 20px !important;
    transition: all 0.15s ease !important;
}
button[name="btn-undo"]:hover,
form[name="salesForm"] .btn-secondary:hover,
form[name="purchasesForm"] .btn-secondary:hover {
    background: #f8fafc !important;
    color: #0f172a !important;
}

/* Eliminar Button (Delete) */
button[name="btn-delete"],
form[name="salesForm"] .btn-danger,
form[name="purchasesForm"] .btn-danger {
    background: #fff5f5 !important;
    border: 1px solid #fee2e2 !important;
    color: #dc2626 !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.83rem !important;
    padding: 9px 20px !important;
    transition: all 0.15s ease !important;
}
button[name="btn-delete"]:hover,
form[name="salesForm"] .btn-danger:hover,
form[name="purchasesForm"] .btn-danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
}

/* 8. AUTOCOMPLETE & MODALS */
.ui-autocomplete {
    z-index: 9999 !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
    padding: 6px !important;
    font-size: 0.84rem !important;
    max-height: 280px !important;
    overflow-y: auto !important;
}
.ui-autocomplete .ui-menu-item {
    list-style: none !important;
    padding: 0 !important;
}
.ui-autocomplete .ui-menu-item-wrapper {
    padding: 8px 12px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    color: #1e293b !important;
    font-weight: 500 !important;
    transition: all 0.1s ease !important;
}
.ui-autocomplete .ui-state-active,
.ui-autocomplete .ui-menu-item-wrapper:hover {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: none !important;
    font-weight: 600 !important;
}

/* Modals */
#findCustomerModal .modal-content,
#newCustomerModal .modal-content,
#findProductModal .modal-content,
#headerModal .modal-content,
#footerModal .modal-content {
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
}
#findCustomerModal .modal-header,
#newCustomerModal .modal-header,
#findProductModal .modal-header,
#headerModal .modal-header,
#footerModal .modal-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 16px 20px !important;
}
#findCustomerModal .modal-body,
#newCustomerModal .modal-body,
#findProductModal .modal-body,
#headerModal .modal-body,
#footerModal .modal-body {
    padding: 20px !important;
    background: #f8fafc !important;
}
#findCustomerModal .modal-footer,
#newCustomerModal .modal-footer,
#findProductModal .modal-footer,
#headerModal .modal-footer,
#footerModal .modal-footer {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 12px 20px !important;
}





