/* ValvaClim - Modern HVAC SaaS Stylesheet */
:root {
    --valva-primary: #0284c7;
    --valva-primary-dark: #0369a1;
    --valva-primary-light: #e0f2fe;
    --valva-accent: #38bdf8;
    --valva-cold: #0ea5e9;
    --valva-heat: #f97316;
    --valva-dark: #0f172a;
    --valva-slate: #334155;
    --valva-light: #f8fafc;
    --valva-card-bg: #ffffff;
    --valva-border: #e2e8f0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    margin: 0;
    padding: 0;
}

/* Sidebar & Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    background: #0f172a;
    color: #cbd5e1;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

.app-sidebar .brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.app-sidebar .brand i {
    color: var(--valva-accent);
}

.app-sidebar .nav-link {
    color: #94a3b8;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.app-sidebar .nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.app-sidebar .nav-link.active {
    color: #ffffff;
    background: rgba(2, 132, 199, 0.15);
    border-left-color: var(--valva-primary);
}

.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--valva-border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-content {
    padding: 1.75rem;
    flex-grow: 1;
}

/* Cards & Widgets */
.card-valva {
    background: var(--valva-card-bg);
    border: 1px solid var(--valva-border);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card {
    border-radius: 0.75rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid var(--valva-border);
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon.blue { background: #e0f2fe; color: #0284c7; }
.kpi-icon.green { background: #dcfce7; color: #16a34a; }
.kpi-icon.amber { background: #fef3c7; color: #d97706; }
.kpi-icon.purple { background: #f3e8ff; color: #9333ea; }

/* Badges de Refrigerantes */
.badge-gas-R410A { background-color: #0284c7; color: white; }
.badge-gas-R32 { background-color: #059669; color: white; }
.badge-gas-R22 { background-color: #dc2626; color: white; }
.badge-gas-R134a { background-color: #d97706; color: white; }

/* Checklist HVAC */
.checklist-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

/* Firma Digital Canvas */
.signature-pad-container {
    background: #ffffff;
    border: 2px dashed #94a3b8;
    border-radius: 0.5rem;
    position: relative;
    touch-action: none;
}

.signature-canvas {
    width: 100%;
    height: 180px;
    display: block;
    cursor: crosshair;
}

/* Portal Público Mobile-First */
.portal-container {
    max-width: 540px;
    margin: 0 auto;
}

.portal-header {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: white;
    border-radius: 0 0 1.5rem 1.5rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.timeline-service {
    position: relative;
    padding-left: 28px;
    margin-bottom: 1.5rem;
}

.timeline-service::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 4px;
    bottom: -15px;
    width: 2px;
    background: #cbd5e1;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--valva-primary);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px var(--valva-primary);
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        height: 100vh;
    }
    .app-sidebar.show {
        left: 0;
    }
}
