@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg-primary: #020b14;
    --bg-secondary: #00152a;
    --bg-card: #01215e;
    --bg-card-hover: #012c7d;
    --border-color: rgba(22, 119, 224, 0.2);
    --accent-color: #1677e0;
    --accent-hover: #1264c0;
    --accent-glow: rgba(22, 119, 224, 0.3);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --color-delivered: #10b981;
    --color-pending: #60a5fa;
    --color-cancelled: #f1322a;
    
    --sidebar-width: 280px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   SCROLLBARS
   ========================================================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==========================================================================
   LOGIN SCREEN (Paso 1)
   ========================================================================== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at center, #00152a 0%, var(--bg-primary) 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    background-color: rgba(0, 21, 42, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(22, 119, 224, 0.08);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    width: 210px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 0.75rem auto;
    display: block;
    transition: transform var(--transition-speed);
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.4));
}
.login-logo:hover {
    transform: scale(1.03);
}

.login-title {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.925rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.form-group {
    position: relative;
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.form-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    background-color: rgba(2, 11, 20, 0.7);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: all var(--transition-speed);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background-color: var(--bg-primary);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all var(--transition-speed);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.login-btn:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(22, 119, 224, 0.4);
}

.login-btn:active {
    transform: scale(0.98);
}

.error-message {
    background-color: rgba(241, 50, 42, 0.12);
    border: 1px solid rgba(241, 50, 42, 0.25);
    border-radius: 8px;
    color: var(--color-cancelled);
    font-size: 0.875rem;
    padding: 10px 12px;
    margin-top: 1.25rem;
    display: none;
    align-items: center;
    gap: 8px;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   LAYOUT CON SIDEBAR
   ========================================================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.brand-logo {
    max-width: 42px;
    height: auto;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
}

.brand-name span {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all var(--transition-speed);
}

.menu-item a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.menu-item a:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.menu-item.active a {
    background-color: rgba(22, 119, 224, 0.18);
    color: var(--accent-color);
    border: 1px solid rgba(22, 119, 224, 0.35);
}

.menu-item.disabled a {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.user-info {
    line-height: 1.2;
}

.username {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background-color: transparent;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: var(--color-cancelled);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: var(--color-cancelled);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    min-height: 100vh;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.85rem;
}

.page-title {
    font-size: 2rem;
    color: #ffffff;
}

.page-title span {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 4px;
}

/* ==========================================================================
   GESTION DE REPARTOS DASHBOARD (Paso 3)
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 2rem;
    align-items: stretch;
    min-height: 0;
}

.dashboard-grid.full-width-mode {
    grid-template-columns: 1fr;
}

.control-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    height: auto;
    padding-right: 4px;
}

.map-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    min-height: 0;
}

#mapContainer {
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
}

.map-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-secondary);
    z-index: 10;
    background-color: var(--bg-secondary);
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--text-muted);
}

/* Card Panel style */
.dashboard-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--accent-color);
}

/* Drag & Drop Upload Zone */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    background-color: rgba(10, 14, 20, 0.3);
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.upload-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    transition: transform var(--transition-speed);
}

.upload-zone:hover .upload-icon {
    transform: translateY(-4px);
    color: var(--accent-color);
}

.upload-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-input {
    display: none;
}

/* File Selected Info */
.file-info {
    margin-top: 1rem;
    background-color: rgba(10, 14, 20, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
}

.file-name-container {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 80%;
}

.file-name-container i {
    color: #10b981;
}

.file-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}

.remove-file {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color var(--transition-speed);
}

.remove-file:hover {
    color: var(--color-cancelled);
}

/* Config Selector Form */
.config-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.select-container {
    position: relative;
}

.select-input {
    width: 100%;
    padding: 10px 14px;
    background-color: rgba(10, 14, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    appearance: none;
    cursor: pointer;
}

.select-input option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.select-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.select-container::after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--text-secondary);
}

/* Routing Mode Selector */
.routing-modes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.routing-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    background-color: rgba(10, 14, 20, 0.2);
    transition: all var(--transition-speed);
}

.routing-mode-option:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.routing-mode-option.active {
    border-color: var(--accent-color);
    background-color: rgba(59, 130, 246, 0.05);
}

.mode-radio {
    margin-top: 3px;
}

.mode-details {
    display: flex;
    flex-direction: column;
}

.mode-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
}

.mode-desc {
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Start Location input */
.text-input {
    width: 100%;
    padding: 10px 14px;
    background-color: rgba(10, 14, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.text-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Indicador de calendario blanco para campos de fecha en tema oscuro */
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    opacity: 0.9;
    transition: opacity var(--transition-speed);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Process and Geocoding Actions */
.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--accent-color);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

/* Progress indicator styles */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: rgba(10, 14, 20, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
    display: none;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: right;
    display: none;
}

/* ==========================================================================
   DELIVERIES LIST AND CURATION
   ========================================================================== */
.client-list-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 400px;
}

.client-item-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-speed);
}

.client-item-card:hover {
    background-color: var(--bg-card-hover);
}

.client-item-info {
    max-width: 70%;
}

.client-item-title {
    font-size: 0.925rem;
    font-weight: 600;
    color: #ffffff;
}

.client-item-address {
    font-size: 0.775rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.client-item-details {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    gap: 10px;
}

.client-item-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.status-valid {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-delivered);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-invalid {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-cancelled);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Curacion / Correction Container */
.curation-banner {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-cancelled);
    font-size: 0.85rem;
}

.curation-banner i {
    font-size: 1.2rem;
}

/* Correction Input styling with Autosuggest drop list */
.correction-box {
    margin-top: 10px;
    position: relative;
}

.autosuggest-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 200;
    list-style: none;
    box-shadow: 0 6px 16px rgba(0,0,0,0.5);
    display: none;
}

.autosuggest-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-speed);
}

.autosuggest-item:last-child {
    border-bottom: none;
}

.autosuggest-item:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #ffffff;
}

/* Confirm Action Container */
.actions-footer {
    display: flex;
    gap: 12px;
    margin-top: auto;
}

.btn-secondary {
    flex-grow: 1;
    padding: 12px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.03);
    border-color: var(--text-secondary);
}

/* Overlay and Toast Notifications */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background-color: var(--bg-card);
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    padding: 12px 20px;
    color: #ffffff;
    font-size: 0.9rem;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    border-left-color: var(--color-delivered);
}

.toast.error {
    border-left-color: var(--color-cancelled);
}

/* ==========================================================================
   HERE MAPS CUSTOM CONTROLS OVERRIDES
   ========================================================================== */
.H_ui {
    font-family: var(--font-body) !important;
}

.H_btn {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.H_btn:hover {
    background: var(--bg-card-hover) !important;
}

/* ==========================================================================
   TABS AND DISABLED CLASSES
   ========================================================================== */
.tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tab-btn:hover:not(.disabled):not([disabled]) {
    background-color: rgba(255, 255, 255, 0.03);
    color: #ffffff;
}

.tab-btn.active {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.tab-btn.disabled, .tab-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.tab-panel-content {
    animation: fadeIn var(--transition-speed) ease-out;
}

.disabled-card {
    position: relative;
    overflow: hidden;
}

.disabled, .inactive {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none !important;
}

/* Inline editing styles */
.inline-edit-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.inline-edit-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    min-height: 42px;
    background-color: rgba(10, 14, 20, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px 12px;
    overflow: hidden;
}

.inline-text-view {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-grow: 1;
}

.btn-edit-inline {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.btn-edit-inline:hover:not(:disabled) {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--accent-color);
}

.btn-edit-inline:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: var(--text-muted);
    border-color: var(--border-color);
}

/* Days of week selector */
.days-selector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.day-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: rgba(10, 14, 20, 0.4);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-badge:hover:not(:disabled) {
    border-color: var(--accent-color);
    color: #ffffff;
}

.day-badge.active {
    background-color: var(--accent-color);
    color: #ffffff;
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
}

.day-badge:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.day-badges-selector .day-badge {
    width: auto;
    padding: 6px 14px;
    border-radius: 16px;
}

/* Autocomplete Suggestions */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin-top: 4px;
}

.autocomplete-suggestion {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color var(--transition-speed);
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.autocomplete-suggestion .client-name {
    font-weight: 600;
    color: #ffffff;
    display: block;
}

.autocomplete-suggestion .client-address {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

/* Detail Switcher (Map vs List tabs) */
.detail-switcher {
    display: flex;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    height: 50px;
}

.switcher-tab {
    flex: 1;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed);
}

.switcher-tab:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.02);
}

.switcher-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background-color: rgba(59, 130, 246, 0.05);
}

/* Paradas Table View */
.paradas-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: rgba(10, 14, 20, 0.3);
}

.paradas-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.paradas-table th, .paradas-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.paradas-table th {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.paradas-table tr:last-child td {
    border-bottom: none;
}

.paradas-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.order-badge-list {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 26px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-weight: 600;
}

.order-badge-list.correction-needed {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Modal Overlay Dialog */
.modal {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-speed) ease-out;
}

.modal-content {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-modal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-speed);
}

.close-modal-btn:hover {
    color: #ffffff;
}

.modal-body-grid {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: rgba(255, 255, 255, 0.01);
}

.form-row-group {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row-group .form-group {
    flex: 1;
    margin-bottom: 0;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.btn-delete-route {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #ef4444;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed);
    margin-right: auto;
}

.btn-delete-route:hover {
    background-color: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-cancel-modal {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-cancel-modal:hover {
    border-color: var(--text-secondary);
    color: #ffffff;
}

.btn-submit-modal {
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed);
}

.btn-submit-modal:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

/* ==========================================================================
   REPARTOS ACTIVOS: ACCORDION AND STICKY SELECTOR SYSTEM
   ========================================================================== */
.sticky-reparto-card {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 1rem;
    padding: 16px;
    background-color: var(--bg-card);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    border-radius: 10px;
}

.sticky-reparto-card.compact {
    padding: 10px 16px;
    background-color: #0d1527;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.sticky-reparto-card.compact .reparto-active-badge {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.reparto-active-badge {
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 8px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.reparto-badge-info {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-switch-reparto {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-switch-reparto:hover {
    background: rgba(37, 99, 235, 0.25);
    border-color: var(--accent-color);
    color: #ffffff;
}

.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.accordion-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color var(--transition-speed);
}

.accordion-item.active {
    border-color: var(--accent-color);
}

.accordion-header {
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    transition: background-color var(--transition-speed);
}

.accordion-header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.accordion-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-header-title i {
    color: var(--accent-color);
    font-size: 1.05rem;
}

.accordion-summary-badge {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 4px;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.accordion-content {
    display: none;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(10, 14, 20, 0.2);
}

.accordion-item.active .accordion-content {
    display: block;
}

.btn-unified-save {
    width: 100%;
    margin-top: 1.25rem;
    padding: 14px 20px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    background: linear-gradient(135deg, #1677e0, #1264c0);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(22, 119, 224, 0.4);
    transition: all var(--transition-speed);
}

.btn-unified-save:hover:not(:disabled) {
    background: linear-gradient(135deg, #1264c0, #0e509d);
    box-shadow: 0 6px 20px rgba(22, 119, 224, 0.6);
    transform: translateY(-1px);
}

.btn-unified-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-text-edit {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background var(--transition-speed);
}

.btn-text-edit:hover {
    background: rgba(37, 99, 235, 0.15);
}

.btn-action-add {
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all var(--transition-speed);
}

.btn-action-add:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-reset-accordion {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-reset-accordion:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Circular Day Badges in Periodicidad (Días del Reparto) */
.day-badge-circle, .days-selector .day-badge-circle {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15)) !important;
    background: rgba(10, 14, 20, 0.5) !important;
    color: var(--text-secondary, #9ca3af) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.day-badge-circle:hover:not(:disabled), .days-selector .day-badge-circle:hover:not(:disabled) {
    border-color: var(--accent-color, #2563eb) !important;
    color: #ffffff !important;
}

.day-badge-circle.active, .days-selector .day-badge-circle.active {
    background-color: var(--accent-color, #2563eb) !important;
    color: #ffffff !important;
    border-color: var(--accent-color, #2563eb) !important;
    box-shadow: 0 0 10px var(--accent-glow, rgba(37, 99, 235, 0.4)) !important;
}

.day-badge-circle:disabled, .days-selector .day-badge-circle:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}
.staged-client-card {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 10px;
    padding: 14px;
    margin-top: 10px;
    margin-bottom: 12px;
}

.staged-client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.staged-client-title {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.95rem;
}

.staged-client-id {
    font-size: 0.78rem;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.staged-client-detail-item {
    margin-bottom: 10px;
}

.staged-client-detail-item .detail-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 2px;
}

.staged-client-detail-item .detail-value-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.staged-client-detail-item .detail-value {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
}

.btn-edit-staged-item {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.btn-edit-staged-item:hover {
    background: rgba(59, 130, 246, 0.15);
}

.routing-mode-option {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.routing-mode-option:hover {
    border-color: var(--accent-color);
    color: #ffffff;
}

.routing-mode-option.active {
    background: rgba(37, 99, 235, 0.2);
    border-color: var(--accent-color);
    color: #ffffff;
}

.btn-primary-add {
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    background-color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 8px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary-add:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* ======================================================================
   NUEVA DISPOSICION DE REPARTOS ACTIVOS
   ====================================================================== */
#mainDashboardGrid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
}

#panelActivosContainer {
    width: 100%;
    min-width: 0;
    padding-right: 0;
}

#panelActivos {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
}

#repartoSelectCard {
    grid-column: auto;
    position: relative;
    top: auto;
    margin-bottom: 0;
    box-shadow: none;
}

#repartoAccordionGroup {
    display: contents;
}

#panelActivos .accordion-item {
    min-width: 0;
}

#panelActivos .accordion-header {
    min-height: 58px;
}

#panelActivos .accordion-header-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#panelActivos .accordion-header-title i {
    flex-shrink: 0;
}

#panelActivos .accordion-summary-badge {
    margin-left: auto;
    flex-shrink: 1;
}

#panelActivos .active-reparto-add-client-trigger {
    cursor: pointer;
}

.active-reparto-actions-footer {
    grid-column: 1 / -1;
    display: grid !important;
    grid-template-columns: minmax(180px, 320px) minmax(150px, 240px);
    justify-content: start;
    gap: 12px !important;
    width: 100% !important;
    margin-top: 4px !important;
}

.active-reparto-actions-footer .btn-unified-save,
.active-reparto-actions-footer .btn-secondary {
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 9px 20px;
    border-radius: 6px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
}

.active-reparto-actions-footer .btn-unified-save {
    background: var(--accent-color);
    box-shadow: none;
}

.active-reparto-actions-footer .btn-unified-save:hover:not(:disabled) {
    background: var(--accent-hover);
    box-shadow: 0 4px 12px var(--accent-glow);
    transform: none;
}

.active-reparto-mode-switcher {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 280px;
}

.active-reparto-mode-toggle {
    width: 100%;
    min-height: 40px;
    padding: 9px 20px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.active-reparto-mode-toggle:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: var(--accent-color);
    color: #ffffff;
}

.map-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 560px;
    height: 560px;
    max-height: 560px;
}

.map-panel .detail-switcher {
    display: none;
}

.map-panel .view-panel-container {
    position: relative !important;
    inset: auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

.map-panel #panelMapContainer {
    grid-column: 1;
    grid-row: 1;
    padding: 0;
}

.map-panel #clientListContainer {
    grid-column: 2;
    grid-row: 1;
    padding: 0 !important;
    overflow: hidden !important;
}

.active-view-label {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 50px;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-color);
    background: var(--bg-secondary);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
}

.map-panel #mapContainer {
    flex: 1 1 0;
    width: 100%;
    height: calc(100% - 50px);
    min-height: 0;
}

.map-panel .map-placeholder {
    top: 50px;
    background-color: var(--bg-secondary);
    justify-content: flex-start;
    padding: 4rem 2rem;
    gap: 0;
}

.map-panel .map-placeholder i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.map-panel .map-placeholder h3,
.list-placeholder h3 {
    color: var(--text-secondary);
}

.map-panel .map-placeholder p {
    color: var(--text-muted);
    margin-top: 10px;
}

.map-panel #paradasTableWrapper {
    flex: 1 1 0;
    min-height: 0;
    height: calc(100% - 50px);
    max-height: calc(100% - 50px) !important;
    overflow-y: auto !important;
    overflow-x: auto;
    border-radius: 0;
    border-top: 0;
}

.add-client-modal {
    z-index: 3000;
    padding: 1rem;
}

.add-client-modal-window {
    width: min(980px, 95vw);
    height: 640px;
    max-height: 90vh;
    min-height: 640px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.65);
}

.add-client-modal-header {
    flex-shrink: 0;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
}

.add-client-tabs {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.55);
}

.add-client-tab {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.add-client-tab:hover,
.add-client-tab.active {
    border-color: var(--accent-color);
    background: rgba(59, 130, 246, 0.12);
    color: #ffffff;
}

.add-client-tab i {
    color: var(--accent-color);
    margin-right: 5px;
}

.add-client-tab-panel {
    display: none;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    background: transparent;
}

.add-client-tab-panel.active {
    display: flex;
    flex-direction: column;
}

/* Pestaña: Clientes Pre Cargados */
.add-client-staged-layout {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.staged-empty-message {
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.staged-clients-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.staged-client-card {
    background: rgba(10, 14, 20, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    box-sizing: border-box;
    width: 100%;
}

.staged-client-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.staged-client-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.92rem;
}

.btn-remove-staged-client {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.btn-remove-staged-client:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.staged-actions-footer {
    flex-shrink: 0;
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.staged-actions-footer .btn-cancel-modal,
.staged-actions-footer .btn-submit-modal {
    min-width: 120px;
    height: 40px;
}

/* Pestaña 2: Buscar Cliente Existente */
.add-client-search-header {
    flex-shrink: 0;
    padding: 16px 24px 10px 24px;
}

.add-client-table-scroll-container {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0 24px 20px 24px;
}

.add-client-table-scroll-container .paradas-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}

.add-client-table-scroll-container .paradas-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.add-client-table-scroll-container .paradas-table thead th {
    position: sticky;
    top: 0;
    background: #0f172a;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 12px;
    z-index: 10;
}

.add-client-table-scroll-container .paradas-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Pestaña 3: Cargar Cliente Nuevo */
.add-client-form-layout {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.add-client-form-scroll-body {
    flex: 1 1 0;
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px;
}

.add-client-form-scroll-body .form-section-title {
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
    margin-top: 15px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.add-client-form-scroll-body .form-section-title:first-child {
    margin-top: 0;
}

.add-client-form-footer {
    flex-shrink: 0;
    padding: 14px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1100px) {
    #panelActivos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .map-panel {
        grid-template-rows: 0 minmax(420px, 1fr);
    }
}

@media (max-width: 720px) {
    #panelActivos {
        grid-template-columns: minmax(0, 1fr);
    }

    .active-reparto-actions-footer {
        grid-template-columns: minmax(0, 1fr);
    }

    .active-reparto-mode-switcher {
        width: 220px;
    }

    .map-panel {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto minmax(360px, 1fr) minmax(360px, 1fr);
    }

    .map-panel #panelMapContainer,
    .map-panel #clientListContainer {
        grid-column: 1;
    }

    .map-panel #panelMapContainer {
        grid-row: 2;
    }

    .map-panel #clientListContainer {
        grid-row: 3;
    }

    .add-client-tabs,
    .add-client-routing-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .add-client-tab {
        text-align: left;
    }

    .add-client-routing-layout {
        display: block;
    }

    .add-client-routing-layout > * + * {
        margin-top: 16px;
    }
}

/* ======================================================================
   AJUSTES DE PRECISION: RECUADROS COMPACTOS Y ACCIONES
   ====================================================================== */
#panelActivos {
    align-items: start;
    grid-auto-rows: max-content;
}

#panelActivos .accordion-item {
    align-self: start;
    height: max-content;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    position: relative;
    overflow: visible;
}

#panelActivos .accordion-item.active {
    border-color: transparent !important;
    z-index: 50;
}

#panelActivos .accordion-header {
    min-height: 52px;
    height: 52px;
    padding: 9px 12px;
    gap: 8px;
    font-size: 0.84rem;
}

#panelActivos .accordion-header-title {
    gap: 7px;
    font-size: 0.84rem;
}

#panelActivos .accordion-header-title i {
    font-size: 0.95rem;
}

#panelActivos .accordion-summary-badge {
    max-width: 108px;
    padding: 3px 6px;
    font-size: 0.7rem;
}

#panelActivos .accordion-content {
    padding: 12px;
}

#repartoSelectCard {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}

#repartoSelectCard .accordion-content {
    margin: 0;
}

#repartoSelectCard .form-label {
    margin-bottom: 5px;
    font-size: 0.75rem;
}

#repartoSelectCard .select-input {
    padding: 8px 12px;
    font-size: 0.84rem;
}

.active-reparto-actions-footer {
    grid-column: 3 / -1;
    grid-row: 2;
    align-self: end;
    justify-content: end;
}

#panelActivos .active-reparto-actions-footer {
    grid-column: 3 / -1;
    grid-row: 2;
}

@media (max-width: 1100px) {
    #panelActivos .active-reparto-actions-footer {
        grid-column: 1 / -1;
        grid-row: auto;
    }
}

@media (max-width: 720px) {
    #panelActivos .active-reparto-actions-footer {
        grid-column: 1;
        grid-row: auto;
    }
}

.active-reparto-actions-footer {
    grid-template-columns: max-content max-content max-content;
    justify-content: end;
    align-items: center;
}

.active-reparto-actions-footer .btn-unified-save,
.active-reparto-actions-footer .btn-secondary,
.active-reparto-actions-footer #btnDeleteActiveReparto {
    width: auto !important;
    min-width: 142px;
    min-height: 40px;
    padding: 9px 16px;
    flex: none !important;
}

.active-reparto-actions-footer #btnDeleteActiveReparto {
    justify-content: center;
}

.active-reparto-actions-footer .btn-unified-save {
    min-width: 166px;
}

.active-reparto-actions-footer #btnCancelActiveReparto {
    min-width: 112px;
}

.map-panel {
    gap: 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr;
    min-height: 560px;
    height: 560px;
    max-height: 560px;
}

.map-panel .view-panel-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 0;
    height: 100% !important;
    max-height: 100% !important;
    box-sizing: border-box;
}

.map-panel #panelMapContainer {
    grid-column: 1;
    grid-row: 1;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

.map-panel #clientListContainer {
    grid-column: 2;
    grid-row: 1;
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.map-panel #paradasTableWrapper {
    flex: 1 1 0;
    min-height: 0;
    height: calc(100% - 50px);
    max-height: calc(100% - 50px) !important;
    overflow-y: auto !important;
    overflow-x: auto;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 0;
}

.map-panel .paradas-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}

.map-panel .paradas-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.map-panel .paradas-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--border-color);
    padding: 10px 12px;
    z-index: 10;
}

.map-panel .paradas-table th,
.map-panel .paradas-table td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-panel .paradas-table tbody tr {
    cursor: pointer;
    transition: background-color 0.18s ease;
}

.map-panel .paradas-table tbody tr:hover {
    background-color: rgba(22, 119, 224, 0.08);
}

.paradas-table tbody tr.selected-stop-row,
.map-panel .paradas-table tbody tr.selected-stop-row {
    background-color: rgba(37, 99, 235, 0.28) !important;
    border-left: 4px solid #3b82f6 !important;
    box-shadow: inset 0 0 10px rgba(59, 130, 246, 0.15) !important;
}

.map-panel .btn-edit-stop,
.map-panel .btn-edit-start-inline,
.map-panel .btn-edit-end-inline {
    padding: 6px 10px !important;
    font-size: 0.78rem !important;
}

@media (max-width: 720px) {
    .active-reparto-actions-footer {
        grid-template-columns: minmax(0, 1fr);
        justify-content: stretch;
    }

    .active-reparto-actions-footer .btn-unified-save,
    .active-reparto-actions-footer .btn-secondary,
    .active-reparto-actions-footer #btnDeleteActiveReparto {
        width: 100% !important;
    }
}

/* ======================================================================
   CAMPOS SUPERIORES: ETIQUETA, RECUADRO Y DESPLIEGUE EN CAPA
   ====================================================================== */
.active-reparto-field-label {
    min-height: 20px;
    height: auto;
    margin: 0 0 8px 0;
    padding: 0;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#panelActivos .accordion-header {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 7px;
}

#panelActivos .accordion-header-title {
    color: var(--text-primary);
    font-weight: 600;
}

#panelActivos .accordion-header-title > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#panelActivos .accordion-content {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 60;
    margin: 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #01215e;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.55);
}

#panelActivos .direct-edit-field .accordion-header {
    display: none;
}

#panelActivos .direct-edit-field .accordion-content {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    display: block !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#panelActivos .direct-edit-field .inline-edit-wrapper {
    min-height: 52px;
    padding: 0;
    display: flex;
    gap: 8px;
    align-items: center;
}

#panelActivos .direct-edit-field .inline-edit-container {
    min-height: 52px;
    height: 52px;
    padding: 4px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 7px;
    cursor: text;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

#panelActivos .direct-edit-field .btn-edit-inline {
    height: 52px;
    padding: 0 12px;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
}

#panelActivos .direct-edit-field .inline-text-view,
#panelActivos .direct-edit-field .text-input {
    font-size: 0.78rem;
}

#panelActivos .direct-edit-field #endLocationGroup > div:first-child,
#panelActivos .direct-edit-field #endLocationToggleContainer,
#panelActivos .accordion-content .btn-reset-accordion {
    display: none !important;
}

#panelActivos #repartoSelectCard {
    overflow: visible;
    padding: 0 !important;
}

#panelActivos #repartoSelectCard .accordion-content {
    padding: 10px;
}

.active-reparto-native-selector {
    display: none;
}

.active-reparto-options,
.active-reparto-checkbox-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
    max-height: 210px;
    overflow-y: auto;
}

.active-reparto-checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 5px 7px;
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.78rem;
}

.active-reparto-checkbox-option:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
}

.active-reparto-checkbox-option input {
    appearance: none;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    margin: 0;
    border: 1px solid #64748b;
    border-radius: 3px;
    background: #0f172a;
    cursor: pointer;
}

.active-reparto-checkbox-option input:checked {
    border-color: var(--accent-color);
    background: var(--accent-color);
    box-shadow: inset 0 0 0 3px #0f172a;
}

.active-reparto-checkbox-option input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.active-reparto-empty-option {
    display: block;
    padding: 8px;
    color: var(--text-muted);
    font-size: 0.78rem;
}

#accItemRepartidores.active #repartidorText,
#accItemRepartidores.active #btnEditRepartidor {
    display: none !important;
}

#accItemRepartidores.active #repartidorSelectWrapper {
    display: block !important;
    width: 100%;
}

#accItemRepartidores .accordion-content {
    padding: 10px;
}

#accItemRepartidores .inline-edit-container {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

#accItemDias .active-reparto-checkbox-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ==========================================================================
   DISPOSICION ELEGANTE CREAR NUEVO REPARTO (REDISENO CON DIVISORES Y PASO 4)
   ========================================================================== */
.new-reparto-unified-top {
    display: flex;
    align-items: stretch;
    gap: 24px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 24px;
}

.new-reparto-top-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.new-reparto-v-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0 12px;
    flex-shrink: 0;
}

.new-reparto-step-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.new-reparto-step-circle {
    background: #2563eb;
    color: #ffffff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    flex-shrink: 0;
}

.new-reparto-step-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #ffffff;
}

/* Selector de Días tipo Pill */
#newRepartoDiasSelector {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

#newRepartoDiasSelector .day-badge {
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
}

#newRepartoDiasSelector .day-badge:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

#newRepartoDiasSelector .day-badge.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* Divisor Horizontal */
.new-reparto-h-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 28px 0 24px 0;
}

/* Sección Clientes */
.new-reparto-clients-section {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    margin-bottom: 20px;
}

.new-reparto-clients-header {
    padding: 0 0 16px 0;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.new-reparto-count-badge {
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    padding: 4px 12px;
    border-radius: 20px;
    color: #94a3b8;
    font-weight: 600;
}

.new-reparto-clients-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 0 0 16px 0;
    border-bottom: none;
}

.new-reparto-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.new-reparto-toolbar-left .new-reparto-action-btn {
    width: 215px;
    height: 40px;
    padding: 0 14px;
    font-weight: 600;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    box-sizing: border-box;
    white-space: nowrap;
    flex-grow: 0;
    flex-shrink: 0;
}

.new-reparto-toolbar-left #btnNewRepartoAddNew {
    background: var(--accent-color);
    color: #ffffff;
    border: 1px solid var(--accent-color);
}

.new-reparto-toolbar-left #btnNewRepartoAddNew:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.new-reparto-toolbar-left #btnOpenImportExcelModal {
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.new-reparto-toolbar-left #btnOpenImportExcelModal:hover {
    background: rgba(59, 130, 246, 0.12);
}

.new-reparto-toolbar-left .btn-download-excel-link {
    background: transparent;
    color: #10b981;
    border: 1px solid #10b981;
    text-decoration: none;
    transition: all 0.2s ease;
}

.new-reparto-toolbar-left .btn-download-excel-link:hover {
    background: rgba(16, 185, 129, 0.12);
}

.new-reparto-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.new-reparto-toolbar-right .btn-unified-save {
    margin-top: 0;
    width: auto !important;
    height: 40px;
    min-height: 40px;
    padding: 0 20px;
    font-size: 0.90rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    white-space: nowrap;
    box-sizing: border-box;
    flex-grow: 0;
}

.new-reparto-toolbar-right .btn-secondary {
    width: auto !important;
    height: 40px;
    min-height: 40px;
    padding: 0 18px;
    font-size: 0.90rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px;
    white-space: nowrap;
    box-sizing: border-box;
    flex-grow: 0;
}

/* Tabla Estilizada - Idéntica a Directorio de Clientes */
.new-reparto-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-family: var(--font-body);
}

.new-reparto-table thead th {
    background: transparent;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 14px 8px 14px;
    border: none;
    border-top: none;
    border-bottom: none;
    vertical-align: middle;
}

.new-reparto-table td {
    padding: 4px 14px;
    border: none;
    border-bottom: none;
    vertical-align: middle;
}

.new-reparto-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}



@media (max-width: 1024px) {
    .new-reparto-unified-top {
        flex-direction: column;
    }
    .new-reparto-v-divider {
        width: 100%;
        height: 1px;
        margin: 16px 0;
    }
}

/* ========================================== */
/* ESTILOS: GESTIÓN DE REPARTIDORES Y PRODUCTOS */
/* ========================================== */

.access-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 5px 12px;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-copy-code {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 3px 5px;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: all 0.15s ease;
}

.btn-copy-code:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.badge-retornable {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-no-retornable {
    background: rgba(148, 163, 184, 0.12);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-reparto-tag {
    display: inline-block;
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 2px;
}

.badge-comodato {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-deuda-envase {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-sin-deuda {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-envase-item {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px;
}

.badge-dispenser-item {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 2px;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Ventas Styles & Badges */
.badge-pago-al-dia {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pago-parcial {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pago-fiado {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-repartidor-tag {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.72rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-date-preset {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-date-preset:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

.btn-date-preset.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}




