/* src/css/pages/repartidor.css */

:root {
    --bg-darker: #0c0c0e;
    --card-bg-modern: rgba(24, 24, 27, 0.95);
    --border-modern: rgba(255, 255, 255, 0.08);
}

.repartidor-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg-darker);
    font-family: 'Outfit', sans-serif;
    color: #f4f4f5;
}

/* Header Estilo App Móvil */
.repartidor-header {
    background: var(--card-bg-modern);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-modern);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.repartidor-header .brand-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.repartidor-header .brand-logo {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    object-fit: cover;
}

.repartidor-header .brand-text h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: white;
}

.repartidor-header .brand-text p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.repartidor-header .user-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-modern);
    color: #e4e4e7;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-header-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.btn-header-icon.danger {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
    background: rgba(248, 113, 113, 0.05);
}

.btn-header-icon.danger:hover {
    background: rgba(248, 113, 113, 0.15);
    color: #ef4444;
}

/* Layout Principal */
.repartidor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Barra de Estado GPS Simplificada */
.gps-status-bar {
    background: var(--card-bg-modern);
    border: 1px solid var(--border-modern);
    border-radius: 12px;
    padding: 0.6rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.gps-info-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
    transition: all 0.3s ease;
}

.status-indicator-dot.active {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.gps-coords-details {
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    text-decoration: underline;
}

.gps-coords-details:focus {
    outline: none;
}

.btn-gps-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    border: 1px solid var(--border-modern);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.2s ease;
}

.btn-gps-toggle.active {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.gps-extra-data {
    display: none;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    margin-top: 0.25rem;
    border: 1px solid var(--border-modern);
}

.gps-extra-data.show {
    display: block;
}

.gps-data-row {
    display: flex;
    justify-content: space-between;
    padding: 0.15rem 0;
}

/* Listado de Pedidos Asignados */
.orders-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}

.orders-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.2rem 0.4rem;
}

.orders-section-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.orders-badge-count {
    background: var(--accent);
    color: black;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
}

/* Tarjetas de Reparto Minimalistas */
.reparto-card {
    background: var(--card-bg-modern);
    border: 1px solid var(--border-modern);
    border-radius: 12px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.reparto-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3.5px;
    background: #3b82f6; /* Indicador de estado en reparto */
}

.reparto-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.4rem;
}

.reparto-card-title {
    color: white;
    font-size: 1.05rem;
    font-weight: 700;
}

.reparto-card-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
    display: block;
}

.reparto-card-badge {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Contenido de la Tarjeta */
.reparto-card-body {
    font-size: 0.88rem;
    line-height: 1.35;
    color: #e4e4e7;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.reparto-card-info-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
}

.reparto-card-info-row span.icon {
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.reparto-card-info-row a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.reparto-card-info-row a:hover {
    text-decoration: underline;
}

.reparto-card-address-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 1.35rem;
    margin-top: -0.15rem;
}

/* Desglose de Items muy compacto */
.reparto-card-items-toggle {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    width: fit-content;
}

.reparto-card-items-toggle:focus {
    outline: none;
}

.reparto-card-items-box {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 0.5rem;
    max-height: 100px;
    overflow-y: auto;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.02);
    display: none;
}

.reparto-card-items-box.show {
    display: block;
}

.reparto-item-row {
    padding: 0.15rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    color: #d4d4d8;
}

.reparto-item-row:last-child {
    border-bottom: none;
}

/* Footer: Costos */
.reparto-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.5rem;
    margin-top: 0.2rem;
}

.reparto-card-footer-envio {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.reparto-card-footer-total {
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

/* Acciones en la Tarjeta: Solo Iconos */
.reparto-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.reparto-card-btn-icon {
    flex: 1;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.reparto-card-btn-icon.map-link {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-modern);
    color: white;
}

.reparto-card-btn-icon.map-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.reparto-card-btn-icon.success {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.reparto-card-btn-icon.success:hover {
    background: #059669;
}

.reparto-card-btn-icon.success:active {
    transform: scale(0.98);
}

/* Pantalla de Carga o Vacío */
.reparto-empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 4rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.reparto-empty-state span.icon {
    font-size: 3rem;
}

.reparto-empty-state h4 {
    margin: 0;
    color: white;
    font-size: 1.1rem;
}

.reparto-empty-state p {
    margin: 0;
    font-size: 0.85rem;
    max-width: 250px;
    line-height: 1.4;
}
