/* ==========================================================================
   Total Care Pro Services CRM - High-End Professional Stylesheet
   Theme: Silicon Valley Clean Tech (Light Gray Sidebar, Emerald #28A745, Cyan #0EA5E9)
   ========================================================================== */

:root {
    --primary-dark: #1e293b;
    --primary-navy: #1e293b;
    --emerald-green: #28a745;
    --emerald-light: #34d399;
    --cyan-accent: #0ea5e9;
    --cyan-dark: #0284c7;
    --slate-bg: #f8fafc;
    --slate-card: #ffffff;
    --slate-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --shadow-soft: 0 4px 20px -2px rgba(13, 100, 100, 0.08), 0 2px 6px -1px rgba(13, 100, 100, 0.05);
    --shadow-elevated: 0 20px 40px -10px rgba(13, 100, 100, 0.14);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--slate-bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar - Light Bluish Gray (Gris azulado clarito) */
#sidebar {
    background-color: #d9e2ec !important;
    color: #1e293b !important;
}

/* Nav item labels and close button in dark slate */
#sidebar nav span,
#sidebar nav > a > span,
#sidebar .inactive-nav-link > span,
#sidebar #closeSidebarBtn {
    color: #334155 !important;
}

/* Emoticonos e iconos con sus colores vibrantes */
#sidebar .text-emerald-500 { color: #059669 !important; }
#sidebar .text-emerald-400 { color: #10b981 !important; }
#sidebar .text-cyan-500    { color: #0284c7 !important; }
#sidebar .text-cyan-400    { color: #0284c7 !important; }
#sidebar .text-cyan-300    { color: #0369a1 !important; }
#sidebar .text-indigo-500  { color: #4f46e5 !important; }
#sidebar .text-indigo-400  { color: #6366f1 !important; }
#sidebar .text-amber-500   { color: #d97706 !important; }
#sidebar .text-amber-400   { color: #f59e0b !important; }
#sidebar .text-purple-500  { color: #9333ea !important; }
#sidebar .text-purple-400  { color: #a855f7 !important; }
#sidebar .text-sky-500     { color: #0284c7 !important; }
#sidebar .text-sky-400     { color: #0ea5e9 !important; }
#sidebar .text-slate-500   { color: #64748b !important; }
#sidebar .text-slate-400   { color: #64748b !important; }

/* Logo title in dark slate */
#sidebar .font-black { color: #0f172a !important; }

/* Navigation active states - Clean white pill card */
.active-nav-link {
    background: #ffffff !important;
    color: #0284c7 !important;
    font-weight: 700 !important;
    border-left: 3px solid #0284c7 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}

.active-nav-link span {
    color: #0284c7 !important;
}

.inactive-nav-link {
    color: #334155 !important;
    font-weight: 600;
}
.inactive-nav-link:hover {
    background: rgba(255, 255, 255, 0.6) !important;
    color: #0f172a !important;
}
.inactive-nav-link:hover span {
    color: #0f172a !important;
}

/* Custom Badges */
.badge-vip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.badge-residential {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.badge-commercial {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.client-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981, #0ea5e9);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    flex-shrink: 0;
}

/* Modal and Drawers animations */
.modal-overlay {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    transition: opacity 0.25s ease;
}

.drawer-slide {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Print Stylesheet for High-Fidelity Printable Invoices */
@media print {
    body * {
        visibility: hidden !important;
    }

    #invoiceViewerModal,
    #invoiceViewerModal * {
        visibility: visible !important;
    }

    #invoiceViewerModal {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    #printableInvoiceDocument {
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        box-shadow: none !important;
        padding: 20px !important;
    }

    .modal-overlay,
    button,
    .no-print {
        display: none !important;
    }
}
