body {
    font-family: "Segoe UI", sans-serif;
    margin: 0;
    background: #f7f7fb;
    color: #1f2937;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
    padding: 24px 0 48px;
}

.site-header {
    background: #111827;
    color: #fff;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.site-header a {
    color: #fff;
    text-decoration: none;
    margin-left: 16px;
}

.user-badge {
    background: #2563eb;
    padding: 4px 10px;
    border-radius: 999px;
    margin-left: 16px;
}

.button {
    background: #2563eb;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.button.secondary {
    background: #111827;
}

.button.small {
    padding: 6px 12px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.form-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.form-card label {
    display: block;
    margin-bottom: 12px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.client-list {
    margin-bottom: 16px;
    border: 1px solid #e5e7eb;
    padding: 16px;
    border-radius: 8px;
    background: #f9fafb;
}

.stop-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.stop-card {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.messages {
    list-style: none;
    padding: 0;
}

.message {
    padding: 12px 16px;
    background: #d1fae5;
    margin-bottom: 12px;
    border-radius: 6px;
}

.optimize-form {
    margin-bottom: 16px;
}

.supervisor-page {
    background: #f3f5fb;
}

.dashboard-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    height: 64px;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.dashboard-topbar-left,
.dashboard-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #111827;
    font-weight: 700;
}

.brand-icon {
    font-size: 20px;
}

.active-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 14px;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.dashboard-sidebar {
    background: #fbfcff;
    border-right: 1px solid #e5e7eb;
    padding: 16px;
    transition: width .2s ease, padding .2s ease;
}

.sidebar-item {
    display: block;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #334155;
    text-decoration: none;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: #e9eefc;
    color: #1e3a8a;
}

.dashboard-sidebar.collapsed {
    width: 0;
    padding: 0;
    overflow: hidden;
}

.dashboard-main {
    padding: 24px;
    overflow-y: auto;
}

.dashboard-intro h2 {
    margin: 0;
    font-size: 32px;
}

.dashboard-intro p {
    margin: 8px 0 0;
    color: #6b7280;
}

.dashboard-section {
    margin-top: 24px;
}

.kpi-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-card {
    position: relative;
}

.kpi-icon {
    position: absolute;
    top: 16px;
    right: 16px;
}

.kpi-value {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
}

.kpi-helper,
.muted {
    color: #6b7280;
    font-size: 14px;
}

.split-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1.1fr);
}

.map-panel {
    position: relative;
    min-height: 360px;
    overflow: hidden;
}

.map-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, #e5e7eb 1px, transparent 1px), linear-gradient(to bottom, #e5e7eb 1px, transparent 1px);
    background-size: 44px 44px;
}

.map-pin {
    position: absolute;
    z-index: 2;
}

.pin-1 { top: 24%; left: 20%; }
.pin-2 { top: 35%; left: 56%; }
.pin-3 { top: 60%; left: 28%; }
.pin-4 { top: 58%; left: 72%; }
.pin-5 { top: 46%; left: 42%; }

.map-placeholder {
    position: relative;
    z-index: 3;
    margin: 24px;
    min-height: 300px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: rgba(255, 255, 255, .75);
    display: grid;
    place-content: center;
    text-align: center;
}

.seller-list {
    display: grid;
    gap: 12px;
}

.seller-header,
.recent-footer,
.section-head,
.progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.seller-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e5e7eb;
    display: grid;
    place-content: center;
    font-size: 13px;
    font-weight: 700;
}

.seller-profile p {
    margin: 2px 0 0;
    color: #6b7280;
    font-size: 13px;
}

.progress-chip {
    font-size: 13px;
    font-weight: 700;
}

.progress-chip-success { color: #059669; }
.progress-chip-muted { color: #6b7280; }

.seller-metrics {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.seller-metrics div {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
}

.seller-metrics span {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

.progress-track {
    margin-top: 8px;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-fill {
    display: block;
    height: 100%;
}

.progress-fill-success { background: #059669; }
.progress-fill-muted { background: #9ca3af; }

.recent-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.recent-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.recent-header h4 {
    margin: 0;
}

.status-pill {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.status-creado { background: #dbeafe; color: #1d4ed8; }
.status-en-negociación { background: #fef3c7; color: #92400e; }
.status-visitado-sin-gestión { background: #ffedd5; color: #c2410c; }
.status-sin-visitar { background: #e5e7eb; color: #374151; }
.status-no-oportunidad { background: #ffe4e6; color: #be123c; }

.detail-list {
    margin: 12px 0;
    padding-left: 0;
    list-style: none;
    color: #6b7280;
    font-size: 14px;
}

.detail-list li { margin-bottom: 6px; }

.icon-button {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    width: 36px;
    height: 36px;
}

.icon-button.ghost {
    border: none;
}

.link-button {
    border: none;
    background: none;
    color: #1d4ed8;
    cursor: pointer;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .kpi-grid,
    .recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: sticky;
        top: 64px;
        z-index: 30;
    }

    .kpi-grid,
    .recent-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-intro {
        flex-direction: column;
        align-items: flex-start;
    }
}