﻿.bp-app, .bp-app * {
    font-family: 'Noto Sans', system-ui, sans-serif;
    box-sizing: border-box;
}

.bp-app {
    --vino: #611232;
    --vino-dark: #3A0B1F;
    --vino-soft: #fbeef2;
    --vino-glow: rgba(97, 18, 50, 0.15);
    --ink: #1a2332;
    --ink-soft: #4a5568;
    --muted: #8a95a5;
    --line: #e4e9f0;
    --bg: #f7f9fb;
    --white: #ffffff;
    --danger: #d64545;
    --shadow: 0 2px 8px rgba(15, 30, 50, 0.04);
    --shadow-hover: 0 8px 24px rgba(15, 30, 50, 0.08);
}

.bp-app {
    color: var(--ink);
    background: var(--bg);
    margin: -1rem;
    padding: 1.5rem;
    min-height: calc(100vh - 4rem);
}

/* ============ HERO BANNER ============ */
.bp-hero {
    position: relative;
    background: var(--vino);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    margin-bottom: 1.75rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(97, 18, 50, 0.2);
}

    .bp-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 100% 0%, rgba(255,255,255,0.18) 0%, transparent 50%), radial-gradient(circle at 0% 100%, rgba(0,0,0,0.15) 0%, transparent 50%);
        pointer-events: none;
    }

.bp-hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.bp-hero-title {
    color: #fff;
    font-weight: 700;
    margin: 0 0 0.4rem 0;
    letter-spacing: -0.01em;
}

.bp-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

.bp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 100px;
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ============ LAYOUT 2-COLUMNAS ============ */
.bp-workspace {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.25rem;
    align-items: start;
}

/* ============ SIDEBAR DE FILTROS ============ */
.bp-sidebar {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    position: sticky;
    top: 1rem;
}

.bp-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--vino-soft);
}

.bp-sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0;
}

    .bp-sidebar-title i {
        color: var(--vino);
    }

.bp-badge-count {
    background: var(--vino);
    color: #fff;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    min-width: 24px;
    text-align: center;
}

    .bp-badge-count.is-hidden {
        display: none;
    }

/* ============ SEARCH BOX ============ */
.bp-search-hero {
    position: relative;
    margin-bottom: 1.5rem;
}

    .bp-search-hero input {
        width: 100%;
        padding: 0.95rem 1rem 0.95rem 3rem;
        border: 2px solid var(--line);
        border-radius: 12px;
        background: var(--white);
        color: var(--ink);
        font-weight: 500;
        transition: all 0.2s;
    }

        .bp-search-hero input:focus {
            outline: none;
            border-color: var(--vino);
            box-shadow: 0 0 0 4px var(--vino-glow);
        }

        .bp-search-hero input::placeholder {
            color: var(--muted);
            font-weight: 400;
        }

    .bp-search-hero i {
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--vino);
    }

/* ============ FIELD STACK ============ */
.bp-fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bp-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.bp-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.bp-field label {
    font-weight: 600;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .bp-field label i {
        color: var(--vino);
    }

.bp-field input,
.bp-field select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--ink);
    font-weight: 500;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.bp-field select {
    padding-right: 2.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23611232' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
}

    .bp-field input:hover,
    .bp-field select:hover {
        border-color: var(--vino);
    }

    .bp-field input:focus,
    .bp-field select:focus {
        outline: none;
        border-color: var(--vino);
        box-shadow: 0 0 0 3px var(--vino-glow);
    }

.bp-field input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(14%) sepia(63%) saturate(3419%) hue-rotate(325deg) brightness(82%) contrast(98%);
    cursor: pointer;
}

/* ============ TOGGLE SWITCH ============ */
.bp-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: var(--bg);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

    .bp-toggle:hover {
        background: var(--vino-soft);
    }

.bp-toggle-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 500;
    color: var(--ink);
}

    .bp-toggle-label i {
        color: var(--danger);
    }

.bp-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: var(--line);
    border-radius: 100px;
    transition: background 0.3s;
    flex-shrink: 0;
}

    .bp-switch::after {
        content: '';
        position: absolute;
        top: 2px;
        left: 2px;
        width: 18px;
        height: 18px;
        background: #fff;
        border-radius: 50%;
        transition: transform 0.3s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

.bp-toggle input[type="checkbox"] {
    display: none;
}

.bp-toggle input:checked ~ .bp-switch {
    background: var(--vino);
}

    .bp-toggle input:checked ~ .bp-switch::after {
        transform: translateX(18px);
    }

/* ============ ACTIONS ============ */
.bp-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
}

.bp-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.bp-btn-primary {
    background: var(--vino);
    color: #fff;
    box-shadow: 0 4px 12px var(--vino-glow);
}

    .bp-btn-primary:hover:not(:disabled) {
        background: var(--vino-dark);
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(97, 18, 50, 0.3);
    }

    .bp-btn-primary:disabled {
        opacity: 0.6;
        cursor: wait;
    }

.bp-btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1.5px solid var(--line);
    text-decoration: none;
}

    .bp-btn-ghost:hover {
        border-color: var(--danger);
        color: var(--danger);
        background: #fef5f5;
    }

/* ============ MAIN RESULTADOS ============ */
.bp-main {
    min-width: 0;
}

.bp-results-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
    min-height: 200px;
}

/* ============ TOMSELECT ============ */
.bp-field .ts-wrapper {
    width: 100%;
}

    .bp-field .ts-wrapper .ts-control {
        padding: 0.7rem 2.5rem 0.7rem 0.9rem !important;
        min-height: 0 !important;
        border: 1.5px solid var(--line) !important;
        border-radius: 10px !important;
        background: var(--white) !important;
        box-shadow: none !important;
        color: var(--ink) !important;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
    }

    .bp-field .ts-wrapper:hover .ts-control {
        border-color: var(--vino) !important;
    }

    .bp-field .ts-wrapper.focus .ts-control {
        border-color: var(--vino) !important;
        box-shadow: 0 0 0 3px var(--vino-glow) !important;
    }

    .bp-field .ts-wrapper .ts-control > input {
        color: var(--ink) !important;
        font-weight: 500;
    }

        .bp-field .ts-wrapper .ts-control > input::placeholder {
            color: var(--muted) !important;
            font-weight: 400;
        }

    .bp-field .ts-wrapper .ts-dropdown {
        border: 1px solid var(--line);
        border-radius: 10px;
        box-shadow: var(--shadow-hover);
        margin-top: 6px;
        z-index: 1000;
        overflow: hidden;
    }

        .bp-field .ts-wrapper .ts-dropdown .option {
            padding: 0.65rem 0.9rem;
            color: var(--ink);
        }

        .bp-field .ts-wrapper .ts-dropdown .active {
            background: var(--vino-soft);
            color: var(--vino-dark);
        }

        .bp-field .ts-wrapper .ts-dropdown .no-results {
            padding: 0.75rem 0.9rem;
            color: var(--muted);
            font-style: italic;
        }

    .bp-field .ts-wrapper .clear-button {
        right: 2.25rem !important;
        color: var(--muted);
    }

        .bp-field .ts-wrapper .clear-button:hover {
            color: var(--danger);
        }

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) {
    .bp-workspace {
        grid-template-columns: 300px 1fr;
    }

    .bp-sidebar {
        padding: 1.25rem;
    }

    .bp-results-card {
        padding: 1.25rem;
    }
}

@media (max-width: 1024px) {
    .bp-workspace {
        grid-template-columns: 1fr;
    }

    .bp-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .bp-app {
        margin: -0.5rem;
        padding: 1rem;
    }

    .bp-hero {
        padding: 1.25rem 1.5rem;
    }

    .bp-hero-grid {
        grid-template-columns: 1fr;
    }

    .bp-field-row {
        grid-template-columns: 1fr;
    }
}

.bp-back-container {
    width: 100%;
    max-width: 1200px;
    margin: 15px auto 0 auto;
    padding: 0 20px;
}

.bp-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #0d6efd;
    transition: 0.2s ease-in-out;
}

    .bp-back-link i {
        font-size: 16px;
    }

    .bp-back-link:hover {
        text-decoration: underline;
        opacity: 0.9;
    }