        :root {
        --navy: #163a5f;
        --navy-dark: #0F2540;
        --navy-deeper: #0A1A2F;
        --navy-light: #2c5d8a;
        --gold: #10B981;
        --gold-light: #34D399;
        --gold-dim: rgba(16,185,129,0.12);
        --white: #fff;
        --off-white: #f8f9fb;
        --gray: #888;
        --gray-light: #e8ecf0;
        --shadow: 0 4px 20px rgba(15,38,64,.10);
        --shadow-sm: 0 2px 8px rgba(15,38,64,.07);
        --shadow-md: 0 4px 16px rgba(15,38,64,.10);
        --shadow-lg: 0 8px 30px rgba(15,38,64,.14);
        --shadow-xl: 0 16px 50px rgba(15,38,64,.20);
        --radius: 14px;
        --radius-sm: 8px;
        --sidebar-w: 260px;
        /* Colores de acento (estados) y escala de grises — se usan en toda la app */
        --accent-red: #e74c3c;
        --accent-blue: #2980b9;
        --accent-green: #27ae60;
        --accent-orange: #e67e22;
        --gray-100: #f1f4f8;
        --gray-200: #e2e8f0;
        --gray-300: #cbd5e0;
        --gray-400: #64748b;
        --gray-500: #475569;
    }

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

        body {
            font-family: 'Inter', sans-serif;
            background: var(--off-white);
            color: var(--navy-dark);
            min-height: 100vh;
        }

        /* ===== SCROLLBAR ===== */
        ::-webkit-scrollbar { width: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 10px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--navy-light); }

        /* ===== LOGIN ===== */
        #loginScreen {
            position: fixed; inset: 0; z-index: 99999;
            background: linear-gradient(135deg,#0a1628 0%,#0F2540 45%,#0e3d2a 100%);
            display: flex; flex-direction: column; align-items: stretch;
            transition: opacity 0.5s, transform 0.5s; overflow-y: auto;
        }
        #loginScreen::before {
            content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
            background-image: radial-gradient(circle, rgba(255,255,255,.07) 1.5px, transparent 1.5px);
            background-size: 26px 26px;
        }
        #loginScreen.hide { opacity: 0; transform: scale(1.02); pointer-events: none; }
        /* Login nav bar */
        .ls-nav {
            position: relative; z-index: 2; display: flex; align-items: center;
            justify-content: space-between; padding: 18px 40px;
            border-bottom: 1px solid rgba(255,255,255,0.07); flex-shrink: 0;
        }
        .ls-nav-brand { font-size: 22px; font-weight: 800; color: white; letter-spacing: -0.5px; font-family: 'Inter',sans-serif; text-decoration: none; }
        .ls-nav-brand span { color: #10B981; }
        .ls-nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
        .ls-nav-link { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 20px; transition: all 0.2s; }
        .ls-nav-link:hover { color: white; background: rgba(255,255,255,0.1); }
        .ls-nav-cta { background: #10B981 !important; color: white !important; box-shadow: 0 2px 12px rgba(16,185,129,0.4); }
        .ls-nav-cta:hover { background: #0ea572 !important; transform: translateY(-1px); }
        /* Login two-column main */
        .ls-main {
            flex: 1; position: relative; z-index: 2; display: flex; align-items: center;
            justify-content: center; gap: 64px; padding: 48px 40px;
            max-width: 1100px; margin: 0 auto; width: 100%; box-sizing: border-box;
        }
        .ls-left { flex: 1; max-width: 500px; }
        .ls-tag {
            display: inline-flex; align-items: center; gap: 6px;
            background: rgba(16,185,129,0.18); border: 1px solid rgba(16,185,129,0.4);
            color: #6ee7b7; font-size: 12px; font-weight: 600;
            padding: 5px 14px; border-radius: 20px; margin-bottom: 22px; letter-spacing: 0.5px;
        }
        .ls-headline {
            font-size: 46px; font-weight: 800; color: white; line-height: 1.1;
            margin: 0 0 18px; letter-spacing: -1.5px; font-family: 'Inter', sans-serif;
        }
        .ls-headline em { color: #10B981; font-style: normal; }
        .ls-desc { font-size: 16px; color: rgba(255,255,255,0.6); line-height: 1.75; margin-bottom: 32px; }
        .ls-features { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
        .ls-feature { display: flex; align-items: flex-start; gap: 12px; }
        .ls-feat-icon {
            width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 1px;
            background: rgba(16,185,129,0.2); border: 1px solid rgba(16,185,129,0.5);
            color: #10B981; font-size: 12px; font-weight: 700;
            display: flex; align-items: center; justify-content: center;
        }
        .ls-feat-text { font-size: 14px; color: rgba(255,255,255,0.75); line-height: 1.5; }
        .ls-feat-text strong { color: white; }
        .ls-bottom-links { display: flex; gap: 20px; flex-wrap: wrap; }
        .ls-bottom-link { font-size: 13px; color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; }
        .ls-bottom-link:hover { color: rgba(255,255,255,0.85); }
        .ls-right { flex-shrink: 0; width: 360px; }
        /* Login box */
        .login-box {
            background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
            border-radius: 20px; padding: 40px 36px; width: 100%;
            backdrop-filter: blur(20px); text-align: center;
            animation: landIn 0.8s ease both; box-shadow: 0 24px 60px rgba(0,0,0,0.4);
            box-sizing: border-box;
        }
        .login-logo {
            width: 84px; height: 84px; margin: 0 auto 16px;
            display: flex; align-items: center; justify-content: center;
        }
        .login-logo svg { width: 84px; height: 84px; }
        .login-title {
            font-family: 'Inter', sans-serif; font-size: 26px; font-weight: 700;
            color: white; margin-bottom: 4px;
        }
        .login-sub { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 28px; letter-spacing: 1px; }
        .login-input {
            width: 100%; padding: 12px 16px; border-radius: 8px;
            border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.1);
            color: white; font-size: 14px; font-family: 'Inter', sans-serif;
            margin-bottom: 12px; outline: none; transition: border-color 0.2s;
            box-sizing: border-box;
        }
        .login-input::placeholder { color: rgba(255,255,255,0.4); }
        .login-input:focus { border-color: rgba(255,255,255,0.5); background: rgba(255,255,255,0.15); }
        .login-btn {
            width: 100%; padding: 13px; border-radius: 8px;
            background: white; color: var(--navy-dark); font-size: 14px; font-weight: 700;
            font-family: 'Inter', sans-serif; border: none; cursor: pointer;
            margin-top: 4px; transition: all 0.2s; letter-spacing: 0.5px;
        }
        .login-btn:hover { background: var(--off-white); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
        .login-error {
            background: rgba(192,57,43,0.3); border: 1px solid rgba(192,57,43,0.5);
            border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #ffb3b3;
            margin-bottom: 12px; display: none;
        }
        .login-forgot {
            margin-top: 16px; font-size: 12px; color: rgba(255,255,255,0.5);
            cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
            transition: color 0.2s;
        }
        .login-forgot:hover { color: rgba(255,255,255,0.8); }
        .login-success-msg {
            background: rgba(39,174,96,0.3); border: 1px solid rgba(39,174,96,0.5);
            border-radius: 8px; padding: 10px 14px; font-size: 12px; color: #a8f0c6;
            margin-bottom: 12px; display: none;
        }
        /* Responsive login */
        @media (max-width: 820px) {
            .ls-nav { padding: 14px 20px; }
            .ls-nav-link { font-size: 12px; padding: 6px 12px; }
            .ls-main { flex-direction: column; gap: 32px; padding: 28px 20px; }
            .ls-left { max-width: 100%; }
            .ls-headline { font-size: 32px; letter-spacing: -1px; }
            .ls-right { width: 100%; max-width: 400px; }
        }
        @media (max-width: 480px) {
            .ls-nav-links { display: none; }
            .ls-headline { font-size: 26px; }
            .ls-desc { font-size: 14px; }
        }

        /* ===== LANDING ===== */
        #landing {
            position: fixed; inset: 0; z-index: 9999;
            background: linear-gradient(135deg, var(--navy-deeper) 0%, var(--navy) 40%, var(--navy-light) 100%);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            transition: opacity 0.5s, transform 0.5s;
        }
        #landing.hide { opacity: 0; transform: scale(1.02); pointer-events: none; }

        .landing-bg {
            position: absolute; inset: 0; overflow: hidden;
        }
        .landing-bg::before {
            content: ''; position: absolute; width: 600px; height: 600px;
            border: 1px solid rgba(255,255,255,0.06); border-radius: 50%;
            top: 50%; left: 50%; transform: translate(-50%, -50%);
            animation: landPulse 6s ease-in-out infinite;
        }
        .landing-bg::after {
            content: ''; position: absolute; width: 900px; height: 900px;
            border: 1px solid rgba(255,255,255,0.03); border-radius: 50%;
            top: 50%; left: 50%; transform: translate(-50%, -50%);
            animation: landPulse 6s ease-in-out 1.5s infinite;
        }
        @keyframes landPulse {
            0%, 100% { opacity: 0.3; transform: translate(-50%,-50%) scale(1); }
            50% { opacity: 0.8; transform: translate(-50%,-50%) scale(1.03); }
        }

        .landing-content {
            position: relative; z-index: 1; text-align: center;
            animation: landIn 0.8s ease both;
        }
        @keyframes landIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

        .landing-logo {
            width: 104px; height: 104px; margin: 0 auto 20px;
            display: flex; align-items: center; justify-content: center;
        }
        .landing-logo svg { width: 104px; height: 104px; }

        .landing-name {
            font-family: 'Inter', sans-serif;
            font-size: clamp(36px, 6vw, 64px); font-weight: 700;
            color: var(--white); line-height: 1.1; margin-bottom: 4px;
        }
        .landing-sub {
            font-size: 14px; color: rgba(255,255,255,0.5);
            letter-spacing: 3px; text-transform: uppercase; margin-bottom: 6px;
        }
        .landing-folini {
            font-size: 16px; color: rgba(255,255,255,0.7);
            font-style: italic; margin-bottom: 40px;
        }

        .landing-cards {
            display: flex; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; justify-content: center;
        }
        .landing-card {
            width: 170px; padding: 28px 18px;
            background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
            border-radius: var(--radius); cursor: pointer;
            transition: all 0.3s ease; backdrop-filter: blur(8px);
            user-select: none;
        }
        .landing-card:hover { background: rgba(255,255,255,0.15); transform: translateY(-4px); border-color: rgba(255,255,255,0.25); }
        .landing-card-icon { font-size: 32px; margin-bottom: 10px; }
        .landing-card-title { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
        .landing-card-desc { font-size: 11px; color: rgba(255,255,255,0.5); }
        .landing-hint { font-size: 11px; color: rgba(255,255,255,0.35); margin-top: 10px; }

        /* ===== APP LAYOUT ===== */
        .app { display: flex; min-height: 100vh; opacity: 0; transition: opacity 0.4s; }
        .app.show { opacity: 1; }

        /* ===== SIDEBAR ===== */
        .sidebar {
            width: var(--sidebar-w); background: var(--navy-dark);
            position: fixed; height: 100vh; z-index: 100;
            display: flex; flex-direction: column;
            border-right: 1px solid rgba(255,255,255,0.06);
        }
        .sidebar-brand {
            padding: 20px 16px; display: flex; align-items: center; gap: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.08);
        }
        .sidebar-logo-sm {
            width: 38px; height: 38px; border-radius: 50%;
            background: rgba(255,255,255,0.1); border: 1.5px solid rgba(255,255,255,0.2);
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .sidebar-logo-sm svg { width: 20px; height: 20px; }
        .sidebar-brand-text { flex: 1; }
        .sidebar-brand-name {
            font-family: 'Inter', sans-serif;
            font-size: 16px;
            font-weight: 700;
            color: #fff;
            letter-spacing: 0.2px;
        }
        .sidebar-brand-sub {
            font-family: 'Inter', sans-serif;
            font-size: 11px;
            color: rgba(16,185,129,0.8);
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        .sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
        .nav-section { margin-bottom: 16px; }
        .nav-section-label {
            font-size: 9px; letter-spacing: 2px; text-transform: uppercase;
            color: rgba(255,255,255,0.3); padding: 0 12px; margin-bottom: 6px; font-weight: 700;
        }
        .nav-item {
            display: flex; align-items: center; gap: 10px;
            padding: 9px 12px; border-radius: var(--radius-sm);
            color: rgba(255,255,255,0.6); cursor: pointer; transition: all 0.2s;
            font-size: 13px; font-weight: 500; margin-bottom: 2px;
        }
        .nav-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
        .nav-item.active { background: rgba(255,255,255,0.12); color: var(--white); }
        .nav-icon { width: 18px; text-align: center; font-size: 14px; }
        .nav-badge {
            margin-left: auto; background: var(--accent-red); color: white;
            font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 10px;
        }

        /* ===== MAIN ===== */
        .main { flex: 1; margin-left: var(--sidebar-w); padding: 24px 28px; min-height: 100vh; }

        .page-header {
            display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px;
        }
        .page-title {
            font-family: 'Inter', sans-serif; font-size: 28px; font-weight: 700; color: var(--navy-dark);
        }
        .page-subtitle { font-size: 13px; color: var(--gray-400); margin-top: 2px; }
        .header-actions { display: flex; gap: 8px; align-items: center; }

        /* ===== BUTTONS ===== */
        .btn {
            display: inline-flex; align-items: center; gap: 6px;
            padding: 8px 16px; border-radius: var(--radius-sm);
            font-size: 13px; font-weight: 600; cursor: pointer;
            transition: all 0.2s; border: none; font-family: 'Inter', sans-serif;
        }
        .btn-primary { background: var(--navy); color: var(--white); }
        .btn-primary:hover { background: var(--navy-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
        .btn-secondary { background: var(--white); color: var(--navy); border: 1px solid var(--gray-200); }
        .btn-secondary:hover { background: var(--gray-100); }
        .btn-danger { background: var(--accent-red); color: white; }
        .btn-danger:hover { opacity: 0.9; }
        .btn-sm { padding: 5px 10px; font-size: 12px; }
        .btn-icon {
            width: 30px; height: 30px; border-radius: var(--radius-sm); padding: 0;
            border: 1px solid var(--gray-200); background: white; color: var(--gray-400);
            cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
            transition: all 0.2s; font-size: 13px;
        }
        .btn-icon:hover { background: var(--navy); color: white; border-color: var(--navy); }

        /* ===== SEARCH ===== */
        .search-box {
            display: flex; align-items: center; gap: 8px;
            background: white; border: 1px solid var(--gray-200);
            border-radius: var(--radius-sm); padding: 8px 14px; width: 260px;
        }
        .search-box input {
            flex: 1; background: transparent; border: none; color: var(--navy-dark);
            font-size: 13px; outline: none; font-family: 'Inter', sans-serif;
        }
        .search-box input::placeholder { color: var(--gray-300); }

        /* ===== CARDS ===== */
        .card {
            background: white; border: 1px solid var(--gray-100);
            border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden;
        }
        .card-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 16px 20px; border-bottom: 1px solid var(--gray-100);
        }
        .card-title { font-size: 15px; font-weight: 700; color: var(--navy-dark); }
        .card-body { padding: 16px 20px; }

        /* ===== STATS ===== */
        .stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
        .stat-card {
            background: white; border: 1px solid var(--gray-100);
            border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
            position: relative; overflow: hidden;
        }
        .stat-card::after {
            content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
        }
        .stat-card:nth-child(1)::after { background: var(--navy); }
        .stat-card:nth-child(2)::after { background: var(--accent-green); }
        .stat-card:nth-child(3)::after { background: var(--accent-orange); }
        .stat-card:nth-child(4)::after { background: var(--accent-red); }
        .stat-icon { font-size: 20px; margin-bottom: 8px; }
        .stat-value { font-size: 26px; font-weight: 800; color: var(--navy-dark); }
        .stat-label { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

        /* ===== TABLE ===== */
        .data-table { width: 100%; border-collapse: collapse; }
        .data-table th {
            text-align: left; padding: 10px 14px; font-size: 11px; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-400);
            border-bottom: 2px solid var(--gray-100); background: var(--off-white);
        }
        .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
        .data-table tr:hover { background: rgba(26,58,92,0.02); }
        .data-table tr:last-child td { border-bottom: none; }

        /* ===== STATUS BADGES ===== */
        .badge {
            display: inline-flex; align-items: center; gap: 4px;
            padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
        }
        .badge-vigente { background: #e8f5e9; color: #2e7d32; }
        .badge-vencida { background: #ffebee; color: #c62828; }
        .badge-porvencer { background: #fff3e0; color: #e65100; }
        .badge-anulada { background: var(--gray-100); color: var(--gray-400); text-decoration: line-through; }
        .badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

        .type-badge {
            display: inline-block; padding: 2px 8px; border-radius: 4px;
            font-size: 11px; font-weight: 700;
        }
        .type-auto { background: #e3f2fd; color: #1565c0; }
        .type-moto { background: #fff8e1; color: #f57c00; }
        .type-hogar { background: #fce4ec; color: #ad1457; }
        .type-vida { background: #f3e5f5; color: #6a1b9a; }
        .type-ap { background: #fff3e0; color: #e65100; }
        .type-comercio { background: #e8f5e9; color: #2e7d32; }
        .type-art { background: #e0f2f1; color: #00695c; }
        .type-rc { background: #e8eaf6; color: #283593; }
        .type-embarcacion { background: #e3f2fd; color: #0277bd; }
        .type-tecnico { background: #f3e5f5; color: #6a1b9a; }
        .type-caucion { background: #fff9c4; color: #f57f17; }

        /* ===== MODAL ===== */
        .modal-overlay {
            position: fixed; inset: 0; background: rgba(10,26,48,0.6);
            backdrop-filter: blur(4px); display: none;
            align-items: center; justify-content: center; z-index: 1000;
        }
        .modal-overlay.active { display: flex; }
        .modal {
            background: white; border-radius: var(--radius);
            width: 100%; max-width: 720px; max-height: 90vh; overflow-y: auto;
            box-shadow: var(--shadow-xl); animation: modalIn 0.25s ease;
        }
        .modal-wide { max-width: 880px; }
        @keyframes modalIn { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
        .modal-header {
            display: flex; justify-content: space-between; align-items: center;
            padding: 18px 24px; border-bottom: 1px solid var(--gray-100);
        }
        .modal-title { font-family: 'Inter', sans-serif; font-size: 20px; font-weight: 700; }
        .modal-close {
            width: 30px; height: 30px; border-radius: var(--radius-sm);
            border: 1px solid var(--gray-200); background: white; color: var(--gray-400);
            cursor: pointer; display: flex; align-items: center; justify-content: center;
            transition: all 0.2s; font-size: 14px;
        }
        .modal-close:hover { background: var(--accent-red); border-color: var(--accent-red); color: white; }
        .modal-body { padding: 20px 24px; }
        .modal-footer {
            display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap;
            padding: 16px 24px; border-top: 1px solid var(--gray-100);
        }

        /* ===== FORMS ===== */
        .form-section {
            font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
            color: var(--navy); margin: 18px 0 10px; padding-bottom: 6px;
            border-bottom: 2px solid var(--gray-100);
        }
        .form-section:first-child { margin-top: 0; }
        .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
        .form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-bottom: 12px; }
        .form-group { margin-bottom: 12px; }
        .form-label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-500); margin-bottom: 4px; }
        .form-input {
            width: 100%; padding: 9px 12px; background: var(--off-white);
            border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
            color: var(--navy-dark); font-size: 13px; font-family: 'Inter', sans-serif;
            transition: border-color 0.2s; outline: none;
        }
        .form-input:focus { border-color: var(--navy); background: white; }
        .form-select {
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7f96' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px;
        }
        .form-textarea {
            width: 100%; padding: 9px 12px; background: var(--off-white);
            border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
            color: var(--navy-dark); font-size: 13px; font-family: 'Inter', sans-serif;
            resize: vertical; min-height: 70px; outline: none;
        }
        .form-textarea:focus { border-color: var(--navy); background: white; }

        /* ===== VIEW SECTIONS ===== */
        .view { display: none; }
        .view.active { display: block; animation: fadeUp 0.2s ease; }
        @keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

        /* ===== HOME WELCOME ===== */
        .home-welcome {
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
            border-radius: var(--radius); padding: 36px; color: white; margin-bottom: 24px;
            position: relative; overflow: hidden;
        }
        .home-welcome::after {
            content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
            border: 1px solid rgba(255,255,255,0.08); border-radius: 50%;
        }
        .home-welcome h1 {
            font-family: 'Inter', sans-serif; font-size: 28px; font-weight: 700; margin-bottom: 6px;
        }
        .home-welcome p { font-size: 14px; opacity: 0.7; }

        .home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
        .home-card {
            background: white; border: 1px solid var(--gray-100); border-radius: var(--radius);
            padding: 28px 20px; text-align: center; cursor: pointer;
            transition: all 0.3s ease; box-shadow: var(--shadow-sm);
        }
        .home-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--navy); }
        .home-card-icon { font-size: 36px; margin-bottom: 12px; }
        .home-card-title { font-size: 16px; font-weight: 700; color: var(--navy-dark); margin-bottom: 4px; }
        .home-card-desc { font-size: 12px; color: var(--gray-400); }
        .home-card-hint { font-size: 10px; color: var(--gray-300); margin-top: 8px; }

        /* ===== CLIENT DETAIL PANEL ===== */
        .client-detail-header {
            background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
            border-radius: var(--radius) var(--radius) 0 0;
            padding: 24px; color: white; display: flex; align-items: center; gap: 16px;
        }
        .client-avatar-lg {
            width: 56px; height: 56px; border-radius: 50%;
            background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.3);
            display: flex; align-items: center; justify-content: center;
            font-size: 20px; font-weight: 800;
        }
        .client-detail-name { font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 700; }
        .client-detail-sub { font-size: 13px; opacity: 0.7; }

        .client-policies-area {
            background: white; border: 1px solid var(--gray-100);
            border-radius: 0 0 var(--radius) var(--radius); border-top: none;
        }

        /* ===== FILTER BAR ===== */
        .filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
        .filter-select {
            padding: 8px 30px 8px 12px; background: white;
            border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
            color: var(--navy-dark); font-size: 13px; font-family: 'Inter', sans-serif;
            appearance: none; cursor: pointer;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7f96' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
            background-repeat: no-repeat; background-position: right 8px center;
        }

        /* ===== EMPTY STATE ===== */
        .empty-state { text-align: center; padding: 40px; color: var(--gray-300); }
        .empty-state-icon { font-size: 40px; margin-bottom: 10px; opacity: 0.4; }
        .empty-state-text { font-size: 14px; }

        /* ===== ACTIONS CELL ===== */
        .actions-cell { display: flex; gap: 4px; }

        /* ===== RECEIPT (printable) ===== */
        .receipt-container {
            width: 700px; padding: 30px; background: white; font-family: 'Inter', sans-serif;
            border: 2px solid var(--navy);
        }
        .receipt-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 2px solid var(--navy); }
        .receipt-logo-area { display: flex; align-items: center; gap: 12px; }
        .receipt-logo-circle {
            width: 50px; height: 50px; border-radius: 50%; background: var(--navy);
            display: flex; align-items: center; justify-content: center;
        }
        .receipt-logo-circle svg { width: 28px; height: 28px; }
        .receipt-company-name { font-family: 'Inter', sans-serif; font-size: 22px; font-weight: 700; color: var(--navy-dark); }
        .receipt-company-addr { font-size: 11px; color: var(--gray-400); }
        .receipt-num { text-align: right; }
        .receipt-label { font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1px; }
        .receipt-field { border-bottom: 1px solid var(--gray-200); padding: 4px 0; min-height: 24px; font-size: 14px; margin-bottom: 8px; }
        .receipt-field.editable { cursor: text; }
        .receipt-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
        .receipt-table th { background: var(--navy); color: white; padding: 8px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; }
        .receipt-table td { padding: 8px 12px; border-bottom: 1px solid var(--gray-200); font-size: 13px; }
        .receipt-total { text-align: right; font-size: 18px; font-weight: 800; color: var(--navy-dark); margin-top: 12px; }
        .receipt-footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--gray-200); font-size: 11px; color: var(--gray-400); }

        /* ===== DOCUMENTACION SINIESTRO FOTOS ===== */
        .foto-section { margin-top: 4px; }
        .foto-categoria {
            background: var(--off-white); border: 1px solid var(--gray-100);
            border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px;
        }
        .foto-categoria-header {
            display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
        }
        .foto-categoria-title {
            font-size: 12px; font-weight: 700; color: var(--navy);
            text-transform: uppercase; letter-spacing: 0.5px; flex: 1;
        }
        .foto-drop-area {
            border: 2px dashed var(--gray-200); border-radius: var(--radius-sm);
            background: white; padding: 14px 12px; text-align: center;
            transition: all 0.2s; display: flex; align-items: center;
            justify-content: center; gap: 10px; flex-wrap: wrap;
        }
        .foto-drop-area.drag-over { border-color: var(--navy-light); background: #eef3fb; }
        .foto-drop-hint { font-size: 12px; color: var(--gray-400); }
        .foto-label-btn {
            display: inline-flex; align-items: center; gap: 6px;
            background: var(--navy); color: white; border: none; border-radius: var(--radius-sm);
            padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
            font-family: inherit; transition: all 0.2s; position: relative;
            user-select: none; white-space: nowrap;
        }
        .foto-label-btn:hover { background: var(--navy-dark); }
        .foto-grid {
            display: flex; flex-wrap: wrap; gap: 8px;
        }
        .foto-thumb {
            position: relative; border-radius: var(--radius-sm); overflow: hidden;
            width: 80px; height: 80px; background: var(--gray-100); cursor: zoom-in;
            border: 2px solid transparent; transition: all 0.2s; flex-shrink: 0;
        }
        .foto-thumb:hover { border-color: var(--navy-light); transform: scale(1.04); }
        .foto-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
        .foto-thumb-pdf {
            width: 100%; height: 100%; display: flex; flex-direction: column;
            align-items: center; justify-content: center; background: #fff3e0;
            font-size: 22px; gap: 2px; cursor: default;
        }
        .foto-thumb-pdf span { font-size: 9px; color: var(--gray-500); font-weight: 700; }
        .foto-thumb-del {
            position: absolute; top: 2px; right: 2px; width: 18px; height: 18px;
            background: rgba(192,57,43,0.9); border-radius: 50%; border: none; cursor: pointer;
            color: white; font-size: 10px; display: flex; align-items: center; justify-content: center;
            opacity: 0; transition: opacity 0.2s; z-index: 2;
        }
        .foto-thumb:hover .foto-thumb-del { opacity: 1; }
        .foto-count-badge {
            display: inline-flex; align-items: center; gap: 4px;
            background: var(--navy); color: white; font-size: 10px; font-weight: 700;
            padding: 2px 8px; border-radius: 10px;
        }
        /* ===== ACTIVIDAD RECIENTE ===== */
        .activity-item {
            display: flex; align-items: flex-start; gap: 12px;
            padding: 11px 18px; border-bottom: 1px solid var(--gray-100);
            transition: background 0.15s;
        }
        .activity-item:last-child { border-bottom: none; }
        .activity-item:hover { background: var(--off-white); }
        .activity-icon {
            width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center; font-size: 15px;
        }
        .activity-icon.cli  { background: #e3f2fd; }
        .activity-icon.pol  { background: #e8f5e9; }
        .activity-icon.sin  { background: #fff3e0; }
        .activity-icon.cot  { background: #f3e5f5; }
        .activity-icon.ren  { background: #e0f7fa; }
        .activity-icon.ann  { background: #ffebee; }
        .activity-body { flex: 1; min-width: 0; }
        .activity-title { font-size: 13px; font-weight: 600; color: var(--navy-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .activity-sub   { font-size: 11px; color: var(--gray-400); margin-top: 1px; }
        .activity-time  { font-size: 11px; color: var(--gray-300); flex-shrink: 0; white-space: nowrap; padding-top: 2px; }

        /* Lightbox */
        #fotoLightbox {
            display: none; position: fixed; inset: 0; z-index: 99998;
            background: rgba(0,0,0,0.9); align-items: center; justify-content: center;
        }
        #fotoLightbox.open { display: flex; }
        #fotoLightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
        #fotoLightboxClose {
            position: fixed; top: 18px; right: 24px; font-size: 32px; color: white;
            cursor: pointer; z-index: 99999; line-height: 1; background: none; border: none;
        }

        /* ===== CUOTAS GRID ===== */
        .cuotas-grid { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
        .cuota-chip {
            width: 32px; height: 28px; border-radius: 4px;
            display: flex; align-items: center; justify-content: center;
            font-size: 10px; font-weight: 800; cursor: pointer;
            transition: all 0.15s; border: 1.5px solid transparent; user-select: none;
        }
        .cuota-chip.paid { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
        .cuota-chip.unpaid { background: #ffebee; color: #c62828; border-color: #ef9a9a; }
        .cuota-chip:hover { transform: scale(1.15); box-shadow: var(--shadow-md); }
        .debt-banner {
            display: inline-flex; align-items: center; gap: 6px;
            background: #fff3e0; border: 1px solid #ffe0b2; border-radius: var(--radius-sm);
            padding: 4px 10px; font-size: 12px; font-weight: 700; color: #e65100;
        }
        .cuota-summary {
            font-size: 11px; color: var(--gray-400); margin-left: 6px;
        }

        /* Pólizas anuladas: se muestran TACHADAS y en gris para que no confundan con las
           vigentes. Los botones de acción (columna de acciones) quedan sin tachar. */
        .poliza-anulada td { text-decoration: line-through; color: #9aa7b4; }
        .poliza-anulada td.actions-cell { text-decoration: none; }

        /* Botón hamburguesa + fondo del menú móvil: OCULTOS en escritorio.
           Se activan solo dentro del media query de celular (abajo). */
        .mobile-menu-btn { display: none; }
        .mobile-backdrop { display: none; }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 1100px) {
            .stats-row { grid-template-columns: repeat(2, 1fr); }
            .home-grid { grid-template-columns: 1fr; }
        }
        @media (max-width: 768px) {
            /* El menú lateral pasa a ser un CAJÓN deslizable (antes se ocultaba
               por completo y no se podía navegar desde el celular). */
            .sidebar {
                width: 264px; z-index: 160;
                transform: translateX(-100%);
                transition: transform 0.28s ease;
                box-shadow: 2px 0 18px rgba(0,0,0,0.35);
            }
            .sidebar.mobile-open { transform: translateX(0); }
            .main { margin-left: 0; padding: 16px; padding-top: 64px; }
            .form-row, .form-row-3 { grid-template-columns: 1fr; }
            /* Botón hamburguesa fijo arriba a la izquierda */
            .mobile-menu-btn {
                display: flex; align-items: center; justify-content: center;
                position: fixed; top: 10px; left: 10px; z-index: 140;
                width: 44px; height: 44px; border: none; border-radius: 10px;
                background: var(--navy-dark); color: #fff; font-size: 20px;
                cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,0.3);
            }
            /* Fondo oscuro detrás del menú abierto (tocar cierra) */
            .mobile-backdrop {
                position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 150;
            }
            .mobile-backdrop.show { display: block; }
        }
        @media print {
            .sidebar, .page-header, .nav-item, .btn, .modal-overlay { display: none !important; }
            .main { margin-left: 0; padding: 0; }
            .receipt-container { border: 2px solid #000; }
        }
