@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* --- ESTILOS DE PERFIL MODERNIZADOS --- */
.profile-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Forzar que el contenedor blanco siempre ocupe el 100% del wrapper y sea estable */
.profile-wrapper .pedidos-form {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    background: white !important;
    border-radius: 30px !important;
    padding: 40px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    min-height: 600px !important;
    box-sizing: border-box !important;
    display: block !important;
    overflow: hidden !important;
}

/* Asegurar que las pestañas no cambien el layout */
.tab-content {
    display: none;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
}

.tab-content.active {
    display: block;
    animation: tabFadeIn 0.5s ease forwards;
}

/* ESTILOS DE FORMULARIO Y ELEMENTOS COMUNES */
.alerta-perfil {
    margin-bottom: 30px;
    padding: 18px;
    border-radius: 15px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    animation: fadeIn 0.5s ease;
}

.alerta-perfil.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alerta-perfil.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.input-readonly {
    background-color: #f3f4f6 !important;
    cursor: not-allowed !important;
}

.btn-perfil-save {
    background: #2563eb;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-perfil-save:hover {
    background: #1e40af;
    transform: translateY(-2px);
}

.btn-perfil-security {
    background: #ef4444;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-perfil-security:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-perfil-docs {
    background: #16a34a;
    color: white;
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-perfil-docs:hover {
    background: #15803d;
    transform: translateY(-2px);
}

.btn-back-panel {
    margin-top: 30px;
    text-align: center;
}

.btn-back-panel a {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.btn-back-panel a:hover {
    color: #2563eb;
}

/* SOPORTE CARDS */
.btn-s-outline-custom {
    padding: 8px 15px;
    font-size: 0.8rem;
    display: inline-block;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    transition: all 0.2s;
}

.btn-s-outline-custom:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.email-copy-wrapper {
    margin-top: 10px;
    background: #f8fafc;
    padding: 8px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}

.email-text-mini {
    font-size: 0.75rem;
    color: #1e293b;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pqr-admin-reply-box {
    margin-top: 15px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 12px;
    border-radius: 10px;
}

.pqr-reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.pqr-reply-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #166534;
}

.pqr-reply-date {
    font-size: 0.7rem;
    color: #166534;
    opacity: 0.8;
}

.pqr-reply-body {
    font-size: 0.85rem;
    color: #166534;
    margin: 0;
    line-height: 1.5;
}

.doc-status-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.doc-link-view {
    font-size: 13px;
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.doc-delete-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-delete-btn:hover {
    background: #fecaca;
}

/* UTILIDADES DE TEXTO Y ESPACIADO */
.text-muted-sm {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 20px;
}

.text-muted-xs {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.text-no-data {
    font-size: 0.9rem;
    color: #94a3b8;
    text-align: center;
    padding: 20px;
}

.text-md {
    font-size: 1.1rem;
}

.no-border {
    border-bottom: none !important;
}

.icon-history {
    background: #f8fafc;
    color: #64748b;
}

.icon-chevron {
    color: #e2e8f0;
    align-self: flex-start;
    margin-top: 5px;
}

.pqr-id-text {
    color: #94a3b8;
    font-weight: 500;
}

.chip-pqr-status {
    font-size: 0.65rem;
    padding: 3px 10px;
}

.copy-btn-mini {
    background: var(--primary);
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.2s;
}

.copy-btn-mini:hover {
    background: var(--primary-dark);
}

/* --- ESTILOS PANEL CLIENTE --- */
.dashboard-interactive-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-bottom: 30px;
}

.interactive-card {
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.interactive-card:hover {
    transform: translateY(-5px);
}

.card-header-interactive {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-header-interactive h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header-interactive h3 i {
    color: #2563eb;
}

/* Level Card */
.level-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    background: #f1f5f9;
}

.progress-container {
    height: 12px;
    background: #f1f5f9;
    border-radius: 10px;
    margin: 15px 0 8px;
    overflow: hidden;
    position: relative;
}

.progress-bar-glow {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
    transition: width 1s ease-in-out;
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

.next-level-text {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #334155;
    line-height: 1.4;
}

/* Chart Card */
.chart-container-modern {
    height: 200px;
    width: 100%;
}

/* Rediseño de Últimos Pedidos */
.orders-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.order-card-new {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-card-new:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    border-color: #2563eb;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-number {
    font-size: 0.9rem;
    font-weight: 800;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 10px;
    border-radius: 8px;
}

.order-date-new {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.order-card-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-info-row i {
    width: 32px;
    height: 32px;
    background: #f8fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
}

.order-info-content {
    display: flex;
    flex-direction: column;
}

.order-info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
}

.order-info-value {
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
}

.order-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}

.btn-action-modern {
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-view-modern {
    background: #2563eb;
    color: #fff;
}

.btn-view-modern:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header-flex h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

@media (max-width: 992px) {
    .dashboard-interactive-grid {
        grid-template-columns: 1fr;
    }
}
/* --- FIN ESTILOS PANEL CLIENTE --- */

/* --- ESTILOS PERFIL ADMINISTRADOR --- */
.profile-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 25px; margin-top: 20px; }
.profile-card { background: white; border-radius: 20px; padding: 30px; border: 1px solid #f1f5f9; box-shadow: 0 4px 20px rgba(0,0,0,0.02); }
.profile-card .form-group { margin-bottom: 20px; }
.profile-card .form-group label { display: block; font-size: 0.85rem; font-weight: 700; color: #64748b; margin-bottom: 8px; text-transform: uppercase; }
.profile-card .form-control { width: 100%; padding: 12px 15px; border-radius: 12px; border: 1px solid #e2e8f0; font-size: 0.95rem; background: #f8fafc; transition: all 0.3s; }
.profile-card .form-control:focus { outline: none; border-color: #2563eb; background: white; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); }
.profile-card .btn-save { background: #2563eb; color: white; border: none; padding: 12px 25px; border-radius: 12px; font-weight: 700; cursor: pointer; width: 100%; transition: 0.3s; }
.profile-card .btn-save:hover { background: #1d4ed8; transform: translateY(-2px); }
.profile-card .section-title { font-size: 1.25rem; font-weight: 800; color: #1e293b; margin-bottom: 25px; display: flex; align-items: center; gap: 10px; }
.role-badge { padding: 4px 10px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; background: #eef2ff; color: #2563eb; }

/* Estilos para el ojo de la contraseña */
.input-with-icon { position: relative; }
.input-with-icon i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s;
}
.input-with-icon i:hover { color: #2563eb; }
/* --- FIN ESTILOS PERFIL ADMINISTRADOR --- */

/* HEADER DE PERFIL */
.profile-header {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    border-radius: 28px;
    padding: 40px 50px;
    color: white;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px -10px rgba(37, 99, 235, 0.25);
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-header.mensajero {
    background: linear-gradient(135deg, #16a34a 0%, #065f46 100%);
    box-shadow: 0 20px 40px -10px rgba(22, 163, 74, 0.25);
}

.profile-header .header-info {
    position: relative;
    z-index: 2;
}

.profile-header .header-info h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.profile-header .header-info p {
    font-size: 1.05rem;
    opacity: 0.85;
    font-weight: 500;
    color: white;
}

.profile-header .header-status-badge {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 22px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    z-index: 2;
    transition: all 0.3s ease;
    color: white;
}

.profile-header .header-status-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.profile-header .header-icon-bg {
    position: absolute;
    right: -30px;
    bottom: -40px;
    font-size: 220px;
    opacity: 0.08;
    color: white;
    transform: rotate(-15deg);
    pointer-events: none;
}

.profile-header .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 10px currentColor;
}

.profile-header .status-dot.activo { background: #22c55e; color: #22c55e; }
.profile-header .status-dot.inactivo { background: #ef4444; color: #ef4444; }
.profile-header .status-dot.pendiente { background: #f59e0b; color: #f59e0b; }

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        padding: 30px 20px;
        border-radius: 20px;
    }
    
    .profile-header .header-info h1 {
        font-size: 1.6rem;
        justify-content: center;
    }

    .profile-header .header-info p {
        font-size: 0.9rem;
    }

    .profile-header .header-icon-bg {
        font-size: 150px;
        right: -20px;
        bottom: -20px;
    }
}

/* Reset y Variables */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --bg-light: #f3f4f6;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    padding-top: 70px; /* Espacio para el header fijo */
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: var(--white);
    border-bottom: 1px solid #e5e7eb;
    z-index: 3000; /* Siempre en la cima */
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 40px;
    width: auto;
}

.brand-name {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.nav-menu {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-nav {
    background: var(--primary);
    color: white !important;
    padding: 8px 16px;
    border-radius: 8px;
}

.btn-nav:hover {
    background: var(--primary-dark);
}

/* Hero Section */
.hero-section {
    position: relative;
    background-attachment: fixed; /* 🔥 PARALLAX */
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.9s ease, transform 6s ease;
}
.hero-slide.active {
    opacity: 1;
    transform: scale(1);
}
.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeUp 1.2s ease forwards;
}
.hero-indicators {
    position: absolute;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}
.hero-indicator {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease;
}
.hero-indicator.active,
.hero-indicator:hover {
    background: #ffffff;
    transform: scale(1.12);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1;transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* seccion donde se ven las ordenes pendiente del cliente*/
.list-toolbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
}
/* Badge */
.toolbar-left {
    display: flex;
    align-items: center;
}

.toolbar-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    transition: 0.2s ease;
}
/* Select */
.toolbar-select {
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.toolbar-input:focus,
.toolbar-select:focus {
    border-color: #6366f1;
    outline: none;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.badge-count {
    background: #eef2ff;
    color: #4338ca;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}
/* Buscador */
.toolbar-center {
    display: flex;
}

.pedido-item {
    background: #ffffff;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 8px 25px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.pedido-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}
.pedido-summary {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pedido-arrow {
    margin: 0 5px;
    color: #6b7280;
}

.pedido-date {
    font-size: 13px;
    color: #6b7280;
}
.pedido-line {
    font-size: 14px;
    margin-bottom: 8px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pedido-line strong {
    font-weight: 600;
}

.pedido-icon {
    color: #6366f1;
    font-size: 14px;
}

.pedidos-list {
    padding: 40px;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 25px 60px rgba(0,0,0,0.08);
}

.pedidos-list-card {
    width: 100%;
}

.pedidos-list-card .toolbar-center {
    margin-bottom: 16px;
}

.pedidos-excel {
    border-radius: 18px;
}

.pedidos-excel-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin: 6px 0 14px;
}

.pedidos-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #c7d2fe;
    background: #eef2ff;
    color: #1e40af;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pedidos-excel-btn:hover {
    transform: translateY(-1px);
    background: #e0e7ff;
    border-color: #a5b4fc;
}

.pedidos-excel-btn.secondary {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.pedidos-excel-btn.secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.pedidos-excel-table th:last-child,
.pedidos-excel-table td:last-child {
    width: 110px;
    text-align: center;
}

.pedidos-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pedidos-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #334155;
    font-weight: 800;
    font-size: 13px;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pedidos-pagination .page-link:hover {
    transform: translateY(-1px);
    background: #f8fafc;
    border-color: #cbd5e1;
}

.pedidos-pagination .page-link.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.pedidos-pagination .page-ellipsis {
    color: #94a3b8;
    font-weight: 800;
    padding: 0 6px;
}

.pedidos-excel-table {
    min-width: 0;
}

.pedidos-excel-table th,
.pedidos-excel-table td {
    padding: 14px 14px;
}

.pedido-monto {
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
}

.pedido-action-cell {
    vertical-align: middle;
}

.pedido-expand-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.pedido-expand-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    transform: translateY(-1px);
}

.pedido-expand-btn i {
    transition: transform 0.2s ease;
}

.pedido-expand-btn.is-open i {
    transform: rotate(180deg);
}

.pedido-detalle-row {
    display: none;
}

.pedido-detalle-row td {
    background: transparent;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
}

.pedido-detalle-wrap {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.pedido-detalle-excel-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.pedido-detalle-excel-table th {
    width: 230px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    text-align: left;
}

.pedido-detalle-excel-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.pedido-detalle-excel-table tr:last-child th,
.pedido-detalle-excel-table tr:last-child td {
    border-bottom: none;
}

.pedidos-list h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.375rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.about-text,
.mission-banner{
    text-align: center;
    max-width: 600px;
    margin: 0 auto 32px;
}
.login-footer,
.login-register-link{
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.8);
    margin-top: 20px;
    text-align: center;
    max-width: 600px;
    
}

.btn-hero {
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-3px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Containers */
.section-container {
    max-width: 1200px;
    margin: 100px auto;
    padding: 0 20px;
    position: relative;
}

.bg-alt {
    background: rgba(37, 99, 235, 0.03);
    padding: 100px 20px;
    margin: 0;
    max-width: 100%;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.section-underline {
    width: 80px;
    height: 5px;
    background: var(--primary);
    margin: 0 auto 25px;
    border-radius: 10px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin: 0;
}

.about-description-box {
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(37, 99, 235, 0.1);
    position: relative;
    display: inline-block;
}

.about-description-box::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.1;
    font-family: serif;
}

/* Cards Modernization */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.about-card, .team-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    overflow: visible;
    padding: 40px 30px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    position: relative;
}

.team-card {
    padding: 30px 20px;
}

.about-card:hover, .team-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.15);
    background: #fff;
    border-color: rgba(37, 99, 235, 0.2);
}

.card-icon-wrapper {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: -75px auto 25px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.about-card:hover .card-icon-wrapper {
    transform: rotate(10deg) scale(1.1);
}

.about-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.about-card-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.about-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Team Card Specifics */
.team-avatar-wrapper {
    position: relative;
    width: 120px; /* Aumentado para mejor resolución */
    height: 120px;
    margin: 0 auto 20px;
}

.team-avatar-wrapper::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #818cf8);
    z-index: 0;
    opacity: 0.3;
}

.team-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    border: 3px solid #fff;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality; /* Hint para navegadores modernos */
    backface-visibility: hidden;
    transform: translateZ(0);
}

.team-name {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.team-role {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 15px;
}

.team-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 20px;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.team-social a {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.team-social a:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

/* Mission Section Redesign */
.mission-section {
    padding: 100px 20px;
    background: linear-gradient(rgba(37, 99, 235, 0.95), rgba(30, 64, 175, 0.95)), url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: white;
    margin-top: 50px;
}

.mission-container {
    max-width: 1000px;
    margin: 0 auto;
}

.mission-card {
    display: flex;
    align-items: center;
    gap: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    padding: 50px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mission-icon {
    font-size: 4rem;
    color: #fbbf24;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.mission-content h3 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: #fff;
}

.mission-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    opacity: 0.9;
    margin: 0;
}

@media (max-width: 768px) {
    .mission-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .mission-content h3 {
        font-size: 1.75rem;
    }
}

/* Formulario de registro */
.registro-container {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 100px 20px 60px; /* Bajada al igual que el login */
}

.registro-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 550px; /* Un poco más ancho para el grid */
    border: 1px solid #f1f5f9;
    z-index: 10;
}

.registro-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 20px;
}

.registro-full-width {
    grid-column: span 2;
}

.roles-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.rol-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rol-card input[type="radio"] {
    display: none;
}

.rol-card.active {
    border-color: var(--primary);
    background: #eff6ff;
}

.rol-icon {
    font-size: 1.5rem;
    color: #94a3b8;
    transition: color 0.3s;
}

.rol-card.active .rol-icon {
    color: var(--primary);
}

.rol-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #64748b;
}

.rol-card.active .rol-label {
    color: var(--primary);
}
/* Formulario de login */
.login-container {
    min-height: calc(100vh - 140px); /* Restando header y footer */
    display: flex;
    align-items: flex-start; /* Cambiado de center para poder bajar el cuadro */
    justify-content: center;
    padding: 100px 20px 40px; /* Bajando un poco más el cuadro */
}

.login-card {
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 420px;
    border: 1px solid #f1f5f9;
    z-index: 10;
}

.login-header {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo {
    display: block;
    margin: 0 auto 25px auto;
    height: 55px;
    width: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05));
}

.login-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.login-form .form-group label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 10px;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.input-icon-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-group i:not(.toggle-password-icon) {
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-size: 1.1rem;
}

.input-icon-group input {
    padding-left: 48px !important;
    padding-right: 48px !important;
}

.toggle-password-icon {
    position: absolute;
    right: 16px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.toggle-password-icon:hover {
    color: var(--primary);
}

.login-extra-links {
    margin-top: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.forgot-password {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white !important;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 12px;
    text-decoration: none;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.25);
    color: white !important;
}

.register-prompt {
    font-size: 0.9rem;
    color: #64748b;
}

.register-prompt a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.register-prompt a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.alerta {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-weight: 500;
    font-size: 0.9rem;
}

.alerta.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alerta.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Panel Header (Para pedidos.php) */
.panel-header {
    background: linear-gradient(135deg, #2563eb 0%, #390a91 100%);
    color: white;
    padding: 10px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.panel-title h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.pedidos-layout {
    max-width: 100%;
    margin: 0 auto 80px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
}

.pedidos-layout.pedidos-layout-stack {
    grid-template-columns: 1fr;
}

.pedidos-layout.pedidos-layout-stack .pedidos-form {
    max-width: 100%;
}

.form-row-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
/* Card principal */
.pedidos-form {
    width: 100%;
    max-width: 100%;
    padding: 45px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.3);   
}

/* Título Pedidos*/
.pedido-header h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 35px;
    background: linear-gradient(90deg, #5683e4, #35264f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Secciones de origen y enviado*/
.form-section {
    margin-bottom: 35px;
    padding: 25px;
    border-radius: 16px;
    background: #f9fafb;
    border: 1px solid #eef0f3;
}
.form-section:hover {
    transform: translateY(-2px);
}

/* Título pequeño */
.section-title-sm {
    margin-bottom: 18px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}
/* Grid interno */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}
/* Columnas completas */
.col-span-2 {
    grid-column: span 2;
}
/* Inputs */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 13px;
    background: #ffffff;
    transition: all 0.25s ease;
}

/* Focus elegante */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #6366f1;
    background: #ffffff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Input con icono */
.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    transition: color 0.2s;
    cursor: pointer;
}

.input-icon i.textarea-icon {
    top: 18px;
    transform: none;
}

/* Botón */
#btnAgregarPedido {
    margin-top: 25px;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    color: rgb(215, 222, 240);
    font-weight: 600;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.25);
}

#btnAgregarPedido:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.35);
    }

.roles-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.rol-option {
    display: block;
}

.rol-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rol-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: var(--text-dark);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s, transform 0.1s;
}

.rol-box:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.radio-circle {
    width: 16px;
    height: 16px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.rol-option input[type="radio"]:checked + .rol-box {
    border-color: var(--primary);
    background: #f8fafc;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.rol-option input[type="radio"]:checked + .rol-box .radio-circle {
    border-color: var(--primary);
}

.rol-option input[type="radio"]:checked + .rol-box .radio-circle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-group {
    margin-top: 4px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #9ca3af;
    border-radius: 6px;
    position: relative;
    background: #fff;
    margin-top: 2px;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.checkbox-container input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-container input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 2px;
    transform: translate(-50%, -50%);
}

.text-terms a {
    color: var(--primary);
    text-decoration: underline;
}

/* Estilos para modales modernos */
.modal-moderno {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999 !important; /* Z-index mayor que el header */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-contenido-moderno {
    background: white;
    border-radius: 24px;
    border: 1px solid #e5e7eb;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    z-index: 10000 !important;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px 20px;
    border-bottom: 2px solid #f1f5f9;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.cerrar-modal {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

.cerrar-modal:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.modal-body-grid {
    padding: 25px 30px;
}
.modal-body {
    overflow-y: auto;
    padding: 25px 30px;
    flex: 1 1 auto;
    min-height: 0;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 30px 30px;
    border-top: 1px solid #e5e7eb;
}

.btn-gris {
    padding: 12px 24px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-gris:hover {
    background: #e2e8f0;
}

.btn-azul {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    background: #2563eb;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-azul:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.btn-cliente-externo {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    background: #0f766e;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cliente-externo:hover {
    background: #115e59;
    transform: translateY(-1px);
}

.btn-danger {
    padding: 12px 24px;
    border-radius: 12px;
    border: 2px solid #dc2626;
    background: #ef4444;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.3);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px -1px rgba(239, 68, 68, 0.2);
}

@media (max-width: 992px) {
    .about-grid, .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .nav-menu { display: none; }
    .about-grid, .team-grid { grid-template-columns: 1fr; }
    .pedidos-layout { grid-template-columns: 1fr; }
    .section-container { margin: 40px auto; }
    .roles-container { grid-template-columns: 1fr; }
    .pedidos-form {padding: 25px; }
    .form-grid {grid-template-columns: 1fr; }
    .hero-section {background-attachment: scroll; }
    .hero-subtitle { font-size: 1.05rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-indicators { bottom: 22px; }
    .list-toolbar {grid-template-columns: 1fr; gap: 12px; }
    .orden-layout {margin: 20px auto; }
    .orden-list {height: auto; }
    .form-row-sections { grid-template-columns: 1fr; }
    .pedidos-excel-actions { justify-content: space-between; }
    .pedidos-excel-btn { flex: 1; justify-content: center; }

    .pedidos-excel-table {
        min-width: 0;
    }

    .pedidos-excel-table thead {
        display: none;
    }

    .pedidos-excel-table,
    .pedidos-excel-table tbody {
        display: block;
        width: 100%;
    }

    .pedidos-excel-table tr.pedido-row-excel {
        display: block;
        background: #fff;
        border: 1px solid #eef2f7;
        border-radius: 16px;
        margin-bottom: 10px;
        overflow: hidden;
    }

    .pedidos-excel-table tr.pedido-row-excel td {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        border-bottom: 1px solid #f1f5f9;
    }

    .pedidos-excel-table tr.pedido-row-excel td:last-child {
        border-bottom: none;
        width: auto;
        text-align: right;
        justify-content: flex-end;
    }

    .pedidos-excel-table tr.pedido-row-excel td::before {
        content: attr(data-label);
        font-weight: 900;
        color: #64748b;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        flex: 0 0 auto;
    }

    .pedidos-excel-table tr.pedido-row-excel td.pedido-expand-cell::before {
        content: "";
    }

    .pedidos-excel-table tr.pedido-row-excel td.pedido-action-cell::before {
        content: "";
    }

    .pedido-detalle-row {
        display: none;
    }

    .pedido-detalle-row td {
        padding: 0;
        border: none;
        background: transparent;
    }

    .pedido-detalle-wrap {
        border-radius: 14px;
        overflow: hidden;
    }

    .pedido-detalle-excel-table tr {
        display: block;
        padding: 12px 14px;
        border-bottom: 1px solid #e2e8f0;
        background: #fff;
    }

    .pedido-detalle-excel-table tr:last-child {
        border-bottom: none;
    }

    .pedido-detalle-excel-table th,
    .pedido-detalle-excel-table td {
        display: block;
        width: 100%;
        padding: 0;
        border: none;
        background: transparent;
    }

    .pedido-detalle-excel-table th {
        font-size: 11px;
        margin-bottom: 6px;
        color: #64748b;
    }

    .pedido-detalle-excel-table td {
        font-size: 13px;
        color: #0f172a;
        font-weight: 600;
    }
}

/* --- ESTILOS DASHBOARD PANEL.PHP --- */
.panel-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 20px;
    padding: 40px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
.panel-hero::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.panel-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 800;
}
.panel-hero p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.action-card {
    background: white;
    padding: 25px;
    border-radius: 18px;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1e293b;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0,0,0,0.1);
    border-color: #2563eb;
}

.action-card-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.action-card-disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #f1f5f9;
}

.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 5px;
}
.action-card span {
    font-weight: 700;
    font-size: 1rem;
}

.live-monitor {
    background: white;
    border-radius: 20px;
    padding: 25px;
    border: 1px solid #f1f5f9;
}
.monitor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}
.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}
.monitor-item {
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}
.monitor-value {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    margin-bottom: 5px;
}
.monitor-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clock-widget {
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 1px solid #f1f5f9;
    text-align: center;
}
#digital-clock {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}
#digital-date {
    font-size: 0.9rem;
    color: #64748b;
}

/* --- SECCIÓN SERVICIOS --- */
:root {
    --primary-blue: #0038a8;
    --secondary-blue: #0056b3;
    --light-bg: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
}

.servicios-body {
    background-color: #ffffff;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
}

/* Hero Section */
.s-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 80px 10%;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
}

.s-hero-content {
    max-width: 600px;
}

.s-badge {
    background-color: #dbeafe;
    color: var(--primary-blue);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
}

.s-hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 800;
    color: #0f172a;
}

.s-hero-title span {
    color: var(--primary-blue);
}

.s-hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
    line-height: 1.6;
}

.s-hero-buttons {
    display: flex;
    gap: 16px;
}

.btn-s-primary {
    background-color: var(--primary-blue);
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-s-outline {
    border: 1px solid #e2e8f0;
    color: var(--text-dark);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.s-hero-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

/* Stats Section */
.s-stats {
    background-color: var(--primary-blue);
    color: white;
    padding: 60px 10%;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stat-item h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Services Grid */

/* --- ESTILOS CLIENTES EXTERNOS --- */
.clientes-hero {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 4px 20px rgba(37,99,235,0.2);
}

.clientes-hero-text h1 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 800;
}

.clientes-hero-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.125rem;
}

.clientes-btn {
    background: white;
    color: #2563eb;
    padding: 14px 28px;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.clientes-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.clientes-title {
    color: #1e293b;
    font-size: 1.5rem;
    margin: 0 0 20px 0;
    font-weight: 800;
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.cliente-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}

.cliente-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.cliente-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.cliente-nombre {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.cliente-actions {
    display: flex;
    gap: 8px;
}

.cliente-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.cliente-action-btn.edit {
    background: #eff6ff;
    color: #2563eb;
}

.cliente-action-btn.edit:hover {
    background: #dbeafe;
}

.cliente-action-btn.delete {
    background: #fef2f2;
    color: #dc2626;
}

.cliente-action-btn.delete:hover {
    background: #fee2e2;
}

.cliente-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cliente-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #475569;
}

.cliente-info-item i {
    width: 20px;
    color: #94a3b8;
    margin-top: 2px;
}

.cliente-info-text {
    flex: 1;
}

.cliente-label {
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    font-weight: 700;
}

.cliente-value {
    font-size: 0.9375rem;
    color: #334155;
    font-weight: 600;
}

.clientes-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.clientes-empty i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.clientes-empty h3 {
    color: #475569;
    font-size: 1.25rem;
    margin: 0 0 8px 0;
    font-weight: 800;
}

.clientes-empty p {
    color: #94a3b8;
    margin: 0;
}

.clientes-table-container {
    width: 100%;
}

.clientes-table-wrapper {
    width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
}

.clientes-table {
    width: 100%;
    border-collapse: collapse;
}

.clientes-table thead {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.clientes-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 800;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.clientes-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.clientes-table tbody tr:hover {
    background-color: #f8fafc;
}

.clientes-table tbody tr:last-child {
    border-bottom: none;
}

.clientes-table td {
    padding: 16px 20px;
    font-size: 0.9375rem;
    color: #334155;
}

.clientes-table-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .clientes-hero {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .clientes-table-wrapper {
        overflow-x: auto;
    }
    
    .clientes-table {
        min-width: 600px;
    }
}

.s-services-section {
    padding: 100px 10%;
    text-align: center;
    background-color: var(--light-bg);
}

.s-section-header {
    margin-bottom: 60px;
}

.s-section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.s-section-header p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.s-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.s-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f1f5f9;
}

.s-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.s-card-icon {
    width: 50px;
    height: 50px;
    background-color: #eff6ff;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.s-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.s-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.s-card-list {
    list-style: none;
    padding: 0;
}

.s-card-list li {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.s-card-list li i {
    color: var(--primary-blue);
    font-size: 0.75rem;
}

/* Why Choose Us & Courier CTA */
.s-features-cta {
    padding: 100px 10%;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.s-features-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
}

.s-feature-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.s-feature-icon {
    min-width: 48px;
    height: 48px;
    background-color: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.2rem;
}

.s-feature-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.s-feature-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.s-cta-card {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e40af 100%);
    color: white;
    padding: 50px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
}

.s-cta-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.s-cta-card p {
    opacity: 0.9;
    margin-bottom: 30px;
    line-height: 1.6;
}

.s-cta-list {
    list-style: none;
    padding: 0;
    margin-bottom: 40px;
}

.s-cta-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.btn-s-white {
    background-color: white;
    color: var(--primary-blue);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
}

/* Footer Banner */
.s-final-cta {
    margin: 0 10% 100px;
    background: linear-gradient(rgba(0,56,168,0.9), rgba(0,56,168,0.9)), url('https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    padding: 80px;
    border-radius: 30px;
    text-align: center;
    color: white;
}

.s-final-cta h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.s-final-cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto 40px;
}

.s-final-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-app {
    background-color: white;
    color: var(--primary-blue);
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-web {
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 992px) {
    .s-hero, .s-features-cta {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .s-hero-content, .s-section-header p {
        margin: 0 auto 40px;
    }
    .s-hero-buttons, .s-final-buttons {
        justify-content: center;
    }
    .s-hero-title {
        font-size: 2.5rem;
    }
    .s-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .pedidos-form { padding: 22px; }
    .pedidos-list { padding: 18px; }
    .pedidos-excel-actions { flex-direction: column; }
    .pedidos-excel-btn { width: 100%; }
}

@media (max-width: 1024px) {
    .orden-layout {grid-template-columns: 1fr; gap: 20px; }
    .registro-card {height: auto; }
    .pedidos-form { padding: 32px; }
    .pedidos-list { padding: 24px; }
    .pedidos-excel-table th,
    .pedidos-excel-table td { padding: 12px 12px; }
}

/* Footer */
.registro-footer {
    text-align: center;
    padding: 25px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: transparent;
}

.registro-footer-spaced {
    margin-bottom: 40px;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}

.modal-card {
    width: 420px;
    max-width: 95%;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 22px;
}

.modal-card h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #0f172a;
}

.modal-card p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 18px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.modal-btn:hover {
    transform: translateY(-1px);
}

.modal-btn.btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.modal-btn.btn-confirm {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22);
}

.modal-btn.btn-confirm:hover {
    opacity: 0.95;
}

.footer-links {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Tablas */
.table-container {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-dark);
}

tr:last-child td {
    border-bottom: none;
}

/* Status Chips */
.status-chip {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
}

.status-pendiente {background: #fef3c7; color: #92400e; border-color: #fde68a;}
.status-aceptado {background: #535353; color: #ffffff; border-color: #474848;}
.status-en_ruta, .status-ruta, .status-en-ruta {background: #fffbeb; color: #92400e;}
.status-entregado {background: #dcfce7; color: #166534; border-color: #bbf7d0;}
.status-cancelado {background: #fee2e2; color: #b91c1c; border-color: #fecaca;}

.pedido-footer {
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
}


/*panel de ordenes de mensajero*/

/* =========================
   BOTÓN VER Y ACTUALIZAR
   ========================= */

.btn-ver-detalle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 10px 14px;
    border-radius: 12px;

    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
    text-decoration: none;

    transition: all 0.25s ease;
    box-shadow: 0 8px 18px rgba(37,99,235,0.25);
}

.btn-ver-detalle i {
    font-size: 14px;
}

.btn-ver-detalle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(37,99,235,0.35);
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.orden-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.orden-list {
    height: 75vh;
    display: flex;
    flex-direction: column;
    padding: 20px;
    
}

.orden-tab-content {
    overflow-y: auto;
    flex: 1;
}

.orden-tab-content::-webkit-scrollbar {
    width: 6px;
}
.orden-tab-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.orden-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.orden-tab {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background: #f1f5f9;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s ease;
}

.orden-tab-active {
    background: #6366f1;
    color: white;
}

/* =========================
   DETALLE DE PEDIDO DEL PEDIDO (MEJORADO)
   ========================= */

.orden-detail {
    background: #ffffff;
    border-radius: 22px;
    padding: 32px;
    box-shadow: 0 20px 45px rgba(0,0,0,0.06);
}

.orden-detail h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 25px;
    color: #111827;
}

.orden-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f7;
}
.detalle-line {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
}

.detalle-label {
    font-weight: 600;
    color: #374151;
}

.detalle-value {
    color: #6b7280;
}
/* Cada línea del detalle */
.orden-detail .pedido-line {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 12px 14px;
    margin-bottom: 10px;

    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #eef2f7;

    font-size: 14px;
    color: #374151;
}

.orden-detail .pedido-line strong {
    font-weight: 600;
    color: #111827;
}

/* Separar acciones */
.orden-detail form {
    margin-top: 14px;
}

/* Select y inputs más elegantes */
.orden-detail select,
.orden-detail input[type="number"] {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    font-size: 14px;
}

/* Botones dentro del detalle */
.orden-detail button {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.orden-detail button:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {

    .orden-layout {
        grid-template-columns: 1fr; /* una sola columna */
        gap: 20px;
        margin: 20px auto;
    }

    .orden-list {
        height: auto;     /* quita altura fija */
        max-height: none;
        padding: 16px;
    }

    .orden-tab-content {
        overflow-y: visible; /* sin scroll interno */
    }

    .orden-detail {
        padding: 20px;
    }
}
@media (max-width: 768px) {

    .pedido-item {
        padding: 16px;
        border-radius: 16px;
    }

    .pedido-line {
        font-size: 13px;
    }
}
@media (max-width: 768px) {

    .pedido-actions {
        flex-direction: column;
        gap: 10px;
    }

    .pedido-actions a,
    .pedido-actions button {
        width: 100%;
        height: 42px;
        font-size: 15px;
        border-radius: 12px;
    }
}
@media (max-width: 768px) {

    .orden-detail h3 {
        font-size: 18px;
        margin-bottom: 18px;
    }

    .orden-detail .pedido-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 14px;
    }
}
@media (max-width: 768px) {

    .orden-detail form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .orden-detail select,
    .orden-detail input,
    .orden-detail button {
        width: 100%;
        max-width: 100%;
    }
}
@media (max-width: 768px) {
    .pedido-active {
        order: -1;
    }
}


.orden-detail .pedido-line:last-child {
    border-bottom: none;
}
.empty-detail {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 2px dashed #e5e7eb;
    border-radius: 20px;
    background: #f9fafb;
    text-align: center;
}

.btn-orden {
    display: flex;
    justify-content: center;
    align-items: center;

    height: 25px;          /* 🔥 altura fija */
    padding: 0;            /* quitamos padding irregular */
    
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}
.btn-ver {
    background: #eef2ff;
    color: var(--primary);
}
.btn-ver:hover {
    background:var(--primary);
    color: white;
}
.btn-aceptar {
    background: var(--primary);
    color: white;
}
.btn-aceptar:hover {
    background: #ffffff;
    color: var(--primary);
}

.btn-orden:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}
.pedido-active {
    border: 2px solid var(--primary);   
    background: #eef2ff;
}
.pedido-actions {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}
/* 🔥 Esto es la clave */
.pedido-actions a,
.pedido-actions form {
    flex: 1;
}
/* Hacer que el botón dentro del form ocupe todo el ancho */
.form-aceptar button {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
}
/* Aca esta los estilos del panel inicio del cliente */
.pendiente { background: #fde68a; }
.aceptado { background: #535353; }
.entregado { background: #bbf7d0; }
.cancelado { background: #fecaca; }

/* DASHBOARD GLOBAL */
.dashboard-container {
    max-width: 100%;
    margin: auto;
    padding: 30px 20px;
}

.dashboard-hero {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    padding: 30px;
    border-radius: 18px;
    margin-bottom: 30px;
}

.dashboard-hero.mensajero {
    background: linear-gradient(135deg, #16a34a, #065f46);
}

.dashboard-hero h1 span {
    color: #c7d2fe;
}

.btn-primary {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 20px;
    background: #fff;
    color: #1e40af;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    text-align: center;
}

.metric-card span, .metric-value {
    font-size: 26px;
    font-weight: bold;
    color: #1e40af;
}

.dashboard-hero.mensajero ~ .dashboard-metrics .metric-card span {
    color: #065f46;
}

/* GRÁFICA */
.dashboard-chart {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.chart-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    border-radius: 12px;
}

/* PEDIDOS */
.dashboard-orders table {
    width: 100%;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    border-collapse: collapse;
}

.dashboard-orders th,
.dashboard-orders td {
    padding: 14px;
    text-align: center;
}

.dashboard-orders thead {
    background: #1e40af;
    color: #fff;
}

.estado {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.en-camino { background: #fde68a; }
.entregado { background: #bbf7d0; }

/* INFO EMPRESA */
.dashboard-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.info-card { 
    background: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
}

.nivel-nuevo { border-left: 6px solid #22c55e; }
.nivel-frecuente { border-left: 6px solid #3b82f6;}
.nivel-avanzado { border-left: 6px solid #8b5cf6;}
.nivel-premium { border-left: 6px solid #f97316;}
.nivel-vip { border-left: 6px solid #eab308;}

/* MENSAJERO ESPECÍFICO */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
}

.filtro-fechas {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.filtro-fechas input,
.filtro-fechas button {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.filtro-fechas button {
    background: #065f46;
    color: #fff;
    cursor: pointer;
}


/* =========================
   MENÚ RESPONSIVE MÓVIL
   ========================= */
/* Botones modernos de navegación y sidebar */
.menu-toggle, .sidebar-toggle-btn-header {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Ocultar botones de toggle antiguos y residuales en todas las vistas */
.sidebar-toggle, .admin-toggle, button[onclick="toggleSidebarAdmin()"] {
    display: none !important;
}

/* Desktop */
.nav-menu {
    display: flex;
    gap: 20px;
}

/* Overlay para el menú móvil */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1500; /* Debajo de los menús y el header */
}

.menu-overlay.active {
    display: block;
}

/* Mobile */
@media (max-width: 768px) {
    .header-actions-mobile {
        display: flex;
        gap: 15px;
        align-items: center;
        z-index: 3000; /* Botones siempre visibles y clicables */
        position: relative;
    }

    .menu-toggle, .sidebar-toggle-btn-header {
        display: block;
        background: none;
        border: none;
        font-size: 22px;
        color: var(--primary);
        cursor: pointer;
        padding: 5px;
        transition: transform 0.2s;
    }

    .menu-toggle:active, .sidebar-toggle-btn-header:active {
        transform: scale(0.9);
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: 0;
        max-height: 0;
        padding: 0 25px;
        background: #fff;
        display: flex;
        flex-direction: column;
        gap: 10px;
        box-shadow: none;
        z-index: 2500; /* Sobre el overlay (1500) pero bajo el header (3000) */
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
    }

    .nav-menu.active {
        height: auto;
        max-height: calc(100vh - 70px);
        padding: 25px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        visibility: visible;
        opacity: 1;
    }

    /* Sidebars (Mensajero y Admin) como overlay desplegable bajo el header */
    .sidebar, .admin-sidebar {
        position: fixed !important; 
        top: 70px !important; /* Justo debajo del header */
        left: 0 !important;
        width: 100% !important;
        height: 0 !important;
        max-height: 0 !important;
        overflow-y: auto !important;
        background: #fff !important;
        z-index: 2500 !important; /* Sobre el overlay (1500) pero bajo el header (3000) */
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: none !important;
        display: block !important;
        padding: 0 20px !important;
        border-bottom: 0 solid #e2e8f0;
        margin-top: 0 !important;
        visibility: hidden;
        opacity: 0;
    }

    .sidebar.active, .admin-sidebar.active {
        height: auto !important;
        max-height: calc(100vh - 70px) !important;
        padding: 25px 20px !important;
        border-bottom: 3px solid var(--primary);
        box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
        visibility: visible;
        opacity: 1;
    }

    .sidebar-menu {
        flex-direction: column !important;
        gap: 5px !important;
    }

    .sidebar-item {
        background: #f8fafc;
        margin-bottom: 5px;
        border-radius: 10px;
    }

    .main-content, .main-content-seguridad {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 10px 15px !important;
        min-height: auto !important;
    }

    .app-layout {
        display: flex !important;
        flex-direction: column !important; /* Apilado vertical */
    }

    .nav-link {
        padding: 12px 15px;
        font-size: 16px;
        text-align: left;
        border-bottom: 1px solid #f1f5f9;
        color: #1e293b;
        font-weight: 600;
        display: block;
        width: 100%;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .btn-nav {
        margin-top: 6px;
        padding: 12px 15px;
        font-size: 16px;
        border-radius: 12px;
        text-align: center;
        background: var(--primary);
        color: white !important;
    }

    /* Grillas del Index y Servicios */
    .about-grid, .team-grid, .servicios-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Formularios Login y Registro */
    .login-container, .registro-container {
        padding: 40px 15px;
    }

    .login-card, .registro-card {
        padding: 30px 20px;
        border-radius: 20px;
        max-width: 100%;
    }

    .registro-form-grid {
        grid-template-columns: 1fr;
    }

    .registro-full-width {
        grid-column: span 1;
    }

    .roles-selector {
        grid-template-columns: 1fr;
    }

    .sidebar-header {
        display: block;
        margin-bottom: 20px;
    }

    .sidebar-menu {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .sidebar-item {
        flex-direction: row;
        font-size: 15px;
        padding: 12px 16px;
        width: 100%;
        border-radius: 12px;
    }

    /* Ajuste para eliminar duplicados */

    /* Header Admin */
    .header-container {
        padding: 0 15px;
    }

    .brand-name {
        font-size: 14px;
    }
}

/* GRID DEL DETALLE */
/* GRID DEL DETALLE */
.detalle-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}

.detalle-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 14px 16px;
    border: 1px solid #eef2f7;
}

.detalle-card h4 {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
    font-weight: 600;
}

.detalle-card p {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.detalle-card small {
    font-size: 12px;
    color: #6b7280;
}

/* PANEL DE ACCIONES */
.acciones-card {
    margin-top: 30px;
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #e5e7eb;
}

.acciones-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.accion-form {
    margin-bottom: 16px;
}

.accion-form label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: block;
    margin-bottom: 6px;
}

.accion-row {
    display: flex;
    gap: 10px;
}

.accion-row input,
.accion-row select {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-success {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:hover,
.btn-success:hover {
    opacity: 0.9;
}
@media (max-width: 768px) {
    .detalle-grid {
        grid-template-columns: 1fr;
    }

    .accion-row {
        flex-direction: column;
    }

    .accion-row button {
        width: 100%;
    }
}


/* ESTRUCTURA GLOBAL CON SIDEBAR FIJO */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: 240px; /* Ancho del sidebar */
    padding: 30px;
    background: #f8fafc;
    min-height: calc(100vh - 70px);
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 70px; /* altura del header */
    left: 0;
    width: 240px;
    height: calc(100vh - 70px);
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

/* Ajuste responsive para el layout */
@media (max-width: 768px) {
    /* Eliminado el duplicado que sobreescribía los estilos */
}

.sidebar-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: #2563eb;
}

.sidebar-header span {
    font-size: 14px;
    color: #6b7280;
}

.sidebar-header small {
    color: #6b7280;
}

/* Menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 16px;
    border-radius: 12px;

    text-decoration: none;
    font-weight: 600;
    color: #4b5563;

    transition: 0.2s;
}
/* Hover */
.sidebar-item:hover {
    background: #eef2ff;
    color: #2563eb;
}

/* Activo */
.sidebar-item.active {
    background: #e0edff;
    color: #2563eb;
}

.sidebar-item i {
    font-size: 16px;
}

/* Badge */
.badge {
    margin-left: auto;
    background: #2563eb;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 999px;
}

/* =========================
   CONTENIDO PRINCIPAL
========================= */
.app-content {
    flex: 1;
    padding: 0;
    background: linear-gradient(135deg, #f8fafc, #e0ecf7);
}

/* RESPONSIVE (MÓVIL) */
@media (max-width: 768px) {
    /* Eliminado el bloque redundante que causaba conflictos con el sidebar */
}
        
/* GRID DE PEDIDOS MODERNO (4 COLUMNAS) */
.pedidos-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.pedido-card-moderno {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.pedido-card-moderno:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-header {
    padding: 15px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.pedido-id {
    font-weight: 700;
    color: #1e40af;
}

.badge-pendiente {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-programado {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #ef4444;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.18);
    animation: pulse-programado 2.2s ease-in-out infinite;
}

@keyframes pulse-programado {
    0%, 100% { box-shadow: 0 2px 4px rgba(220, 38, 38, 0.18), 0 0 0 0 rgba(239, 68, 68, 0.28); }
    50%      { box-shadow: 0 2px 4px rgba(220, 38, 38, 0.18), 0 0 0 6px rgba(239, 68, 68, 0); }
}

.badge-programado i { font-size: 10.5px; }

.pedido-programado {
    border-left: 5px solid #dc2626 !important;
    background: linear-gradient(90deg, #fee2e2 0%, #ffffff 32%);
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.16) !important;
    position: relative;
    animation: border-pulse 2.4s ease-in-out infinite;
}

@keyframes border-pulse {
    0%, 100% { border-left-color: #dc2626 !important; }
    50%      { border-left-color: #ef4444 !important; }
}

.pedido-programado::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 42px 42px 0;
    border-color: transparent #ef4444 transparent transparent;
    opacity: 0.30;
    pointer-events: none;
}

.card-body {
    padding: 15px;
    flex-grow: 1;
}

.info-item {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.info-item i {
    color: #64748b;
    margin-top: 4px;
    width: 16px;
    text-align: center;
}

.info-item small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
}

.info-item p {
    font-size: 13px;
    margin: 0;
    color: #334155;
    font-weight: 500;
    line-height: 1.4;
}

.card-footer {
    padding: 15px;
    display: flex;
    gap: 10px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
}

.btn-ver-moderno, .btn-aceptar-moderno {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-ver-moderno {
    background: #f1f5f9;
    color: #475569;
}

/* --- BOTÓN FLOTANTE DE WHATSAPP --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 25px rgba(37, 211, 102, 0.6);
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
}

/* --- SEARCH DROPDOWN (BUSQUEDA CLIENTE/MENSAJERO) --- */
.search-dropdown-wrapper {
    position: relative;
    width: 100%;
    z-index: 20;
}
.search-dropdown-wrapper:focus-within {
    z-index: 40;
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1001;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}
.modal-contenido-moderno,
.modal-body-grid,
.form-section,
.form-grid,
.form-group {
    overflow: visible;
}
.search-dropdown-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}
.search-dropdown-item:last-child {
    border-bottom: none;
}
.search-dropdown-item:hover {
    background-color: #f8fafc;
}
.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.search-select {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.form-row-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
@media (max-width: 900px) {
    .form-row-sections {
        grid-template-columns: 1fr;
    }
}


.btn-ver-moderno:hover {
    background: #e2e8f0;
}

.btn-aceptar-moderno {
    background: #2563eb;
    color: #fff;
}

.btn-aceptar-moderno:hover {
    background: #1d4ed8;
}

/* MODAL MODERNO */
.modal-moderno {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-moderno,
html.modal-open,
body.modal-open {
    /* Evitar doble scroll (sólo se desplaza el contenido interno del modal) */
    overflow: hidden;
}

.modal-contenido-moderno {
    background: #fff;
    width: 700px;
    max-width: 95%;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-contenido-moderno > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px 25px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 0 0 auto;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
}

.cerrar-modal {
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
}

.modal-body-grid {
    padding: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    min-height: 0;
    overflow: auto;
    flex: 1 1 auto;
}

.modal-section {
    background: #f8fafc;
    padding: 15px;
    border-radius: 12px;
}

.modal-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #2563eb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-section p {
    margin: 5px 0;
    font-size: 14px;
}

.full-width {
    grid-column: span 2;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.modal-footer {
    padding: 15px 25px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    text-align: right;
    flex: 0 0 auto;
}

.btn-cerrar-modal {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

/* RESPONSIVE PARA PEDIDOS-GRID-4 */
@media (max-width: 1200px) {
    .pedidos-grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .pedidos-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .modal-body-grid { grid-template-columns: 1fr; }
    .full-width { grid-column: span 1; }
}

@media (max-width: 600px) {
    .pedidos-grid-4 { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
}

/* BUSCADOR Y TABLAS MODERNAS */
.search-container {
    margin-bottom: 25px;
    position: relative;
    max-width: 500px;
}

.admin-toolbar-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
}

.admin-toolbar-row .search-container {
    flex: 1;
    min-width: 0;
    max-width: none;
    margin-bottom: 0;
}

.admin-toolbar-row .btn-azul,
.admin-toolbar-row .btn-gris,
.admin-toolbar-row .btn-cliente-externo {
    height: 40px;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .admin-toolbar-row {
        flex-wrap: wrap;
    }

    .admin-toolbar-row .btn-azul,
    .admin-toolbar-row .btn-gris,
    .admin-toolbar-row .btn-cliente-externo {
        width: 100%;
    }
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
}

/* TABLA ESTILO EXCEL MODERNA */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #f1f5f9;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.modern-table.pedidos-excel-table {
    min-width: 0;
}

.modern-table th {
    background: #f8fafc;
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #f1f5f9;
}

.modern-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Indicadores de Estado */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
}

.status-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-circle.activo { background-color: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.4); }
.status-circle.inactivo { background-color: #94a3b8; }
.status-circle.suspendido { background-color: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.status-circle.pendiente { background-color: #f59e0b; }
.status-circle.aprobado { background-color: #3b82f6; }

/* Botones y Acciones */
.acciones {
    vertical-align: top !important; /* alinea con el inicio de las demás columnas, sin importar cuántas líneas tenga Recogida/Entrega */
}

.acciones-icons {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
    color: #94a3b8;
}

.acciones i {
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.acciones i.fa-pen:hover { color: #2563eb; transform: scale(1.2); }
.acciones i.fa-eye:hover { color: #10b981; transform: scale(1.2); }
.acciones i.fa-lock:hover { color: #f59e0b; transform: scale(1.2); }

.btn-gris {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-gris:hover { background: #e2e8f0; }

.btn-azul {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-azul:hover { background: #1d4ed8; }


.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:hover {
    background-color: #f8fafc;
}

.modern-table .order-id {
    font-weight: 700;
    color: #2563eb;
}

.modern-table .price-cell {
    font-weight: 600;
    color: #0f172a;
}

.modern-table .date-cell {
    color: #64748b;
    font-size: 13px;
}

.modern-table .btn-action {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view-table {
    background: #f1f5f9;
    color: #475569;
}

.btn-view-table:hover {
    background: #e2e8f0;
}

@media (max-width: 768px) {
    .search-container {
        max-width: 100%;
    }
}

/* GESTIÓN DE MENSAJERORS (ADMIN) */
.badge-pendientes {
    background: #ef4444;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 10px;
}

.mensajero-card-mini {
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    border-left: 5px solid #2563eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.mensajero-card-mini:hover {
    transform: translateY(-3px);
}

.doc-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f1f5f9;
    border-radius: 10px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.doc-link:hover {
    background: #e0edff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.stats-grid-mensajero {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.revision-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.tab-nav-admin {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-nav-admin .tab-item {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 700;
    color: #64748b;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-nav-admin .tab-item.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.tab-nav-admin .tab-item:hover:not(.active) {
    color: #1e293b;
    background: #f8fafc;
}

.status-badge-revision {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge-revision.pendiente { background: #fef3c7; color: #92400e; }
.status-badge-revision.aprobado { background: #dcfce7; color: #166534; }
.status-badge-revision.rechazado { background: #fee2e2; color: #b91c1c; }

    /* PESTAÑAS (TABS) MENSAJERO */
.tabs-container {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 2px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e2e8f0;
    border-bottom: none;
}

.tab-btn i {
    font-size: 16px;
}

.tab-btn:hover {
    background: #eef2ff;
    color: #2563eb;
}

.tab-btn.active {
    background: #fff;
    color: #2563eb;
    border-bottom: 3px solid #2563eb;
    margin-bottom: -2px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FORMULARIOS Y SECCIONES PERFIL */
.form-section {
    background: #fff;
    padding: 25px;
    border-radius: 18px;
    margin-bottom: 25px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.section-title-sm {
    font-size: 17px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    color: #1e293b;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* CARGA DE ARCHIVOS (FILE UPLOAD) */
.file-upload-wrapper {
    background: #f8fafc;
    border: 2px dashed #e2e8f0;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-wrapper:hover {
    border-color: #2563eb;
    background: #f0f7ff;
}

.file-upload-wrapper input[type="file"] {
    width: 100%;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
}

.file-upload-wrapper input[type="file"]::-webkit-file-upload-button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 600;
    margin-right: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.file-upload-wrapper input[type="file"]::-webkit-file-upload-button:hover {
    background: #1d4ed8;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .tabs-container {
        flex-direction: column;
        gap: 5px;
    }
    
    .tab-btn {
        width: 100%;
        border-radius: 10px;
        border-bottom: 1px solid #e2e8f0;
    }
}

/* -------------------------------------------------------------------------- */
/* GESTIÓN DE ÓRDENES (ADMIN) */
.status-chip {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
}

.status-chip.status-pendiente { background: #fef3c7; color: #92400e; }
.status-chip.status-aceptado { background: #535353; color: #ffffff; }
.status-chip.status-en-ruta { background: #dbeafe; color: #1e40af; }
.status-chip.status-entregado { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.status-chip.status-cancelado { background: #fee2e2; color: #b91c1c; }

.order-id {
    font-weight: 800;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 8px;
    border-radius: 6px;
}

/* Grilla de métricas unificada */
.metrics-unificada-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.metric-card-sm {
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.metric-card-sm h4 {
    font-size: 11px;
    margin-bottom: 5px;
}

.metric-card-sm span {
    font-size: 20px;
    font-weight: 800;
}

/* Variaciones de colores para métricas */
.metric-blue { border-top: 4px solid #3b82f6; }
.metric-purple { border-top: 4px solid #8b5cf6; }
.metric-pink { border-top: 4px solid #ec4899; }
.metric-green-bg { border-top: 4px solid #16a34a; background: #f0fdf4; }

.admin-contract-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 260px));
    gap: 14px;
    align-items: stretch;
    justify-content: start;
    margin-bottom: 20px;
}

.admin-contract-metric {
    padding: 14px 16px;
    border-radius: 14px;
    text-align: left;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.admin-contract-metric h4 {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: #64748b;
}

.admin-contract-metric span {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

.admin-contract-metric-blue {
    border-left: 4px solid #2563eb;
}

.admin-contract-metric-blue span {
    color: #2563eb;
}

.admin-contract-metric-green {
    border-left: 4px solid #16a34a;
}

.admin-contract-metric-green span {
    color: #16a34a;
}

@media (max-width: 640px) {
    .admin-contract-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.mensajero-profile-page {
    width: 100%;
}

.mensajero-profile-shell {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

.mensajero-profile-shell .tabs-container {
    width: 100%;
    box-sizing: border-box;
}

.mensajero-profile-shell .tab-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
}

.mensajero-profile-shell .tab-content > form,
.mensajero-profile-shell .tab-content > div,
.mensajero-profile-shell .tab-content > section {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mensajero-profile-shell .form-section,
.mensajero-profile-shell .soporte-pqr-container,
.mensajero-profile-shell .contract-page-grid {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.mensajero-profile-shell #contrato .contract-page-grid {
    grid-template-columns: 1fr;
    gap: 18px;
}

.mensajero-profile-shell #contrato .contract-side-panel,
.mensajero-profile-shell #contrato .contract-preview-panel {
    width: 100%;
    max-width: 100%;
}

.cliente-profile-shell {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

.cliente-profile-page {
    width: 100%;
}

.cliente-profile-wrapper {
    width: 100% !important;
    max-width: 1100px !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

.cliente-profile-wrapper .profile-header,
.cliente-profile-wrapper .alerta-perfil,
.cliente-profile-shell,
.cliente-profile-back {
    width: 100%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.cliente-profile-shell .tabs-container {
    width: 100%;
    box-sizing: border-box;
}

.cliente-profile-shell .tab-content {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    box-sizing: border-box;
}

.cliente-profile-shell .tab-content > form,
.cliente-profile-shell .tab-content > div,
.cliente-profile-shell .tab-content > section,
.cliente-profile-shell .tab-content > main,
.cliente-profile-shell .tab-content > aside {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.cliente-profile-shell .form-section,
.cliente-profile-shell .soporte-pqr-container,
.cliente-profile-shell .soporte-sidebar,
.cliente-profile-shell .pqr-main-wrap,
.cliente-profile-shell .pqr-main-card,
.cliente-profile-shell .pqr-history-card,
.cliente-profile-shell .pqr-item-info,
.cliente-profile-shell .pqr-item-pro {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.metric-blue-bg { border-top: 4px solid #2563eb; background: #eff6ff; }
.metric-red-bg { border-top: 4px solid #ef4444; background: #fff1f2; }

/* -------------------------------------------------------------------------- */
/* EXCEL-STYLE TABLE REFINEMENTS */

/* Contenedores de Grillas Admin */
.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.revision-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.efectividad-bar-container {
    width: 100px;
    background: #f1f5f9;
    height: 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.efectividad-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.stats-docs-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stats-history-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
}

/* INDICADOR DE ESTADO CON CÍRCULO */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #475569;
}

.status-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-circle.activo { background-color: #22c55e; box-shadow: 0 0 8px #22c55e; }
.status-circle.inactivo { background-color: #ef4444; box-shadow: 0 0 8px #ef4444; }
.status-circle.pendiente { background-color: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.status-circle.aprobado { background-color: #22c55e; box-shadow: 0 0 8px #22c55e; }
.status-circle.rechazado { background-color: #ef4444; box-shadow: 0 0 8px #ef4444; }

/* ESTADOS SIN DATOS */
.sin-datos {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 18px;
    color: #94a3b8;
    border: 2px dashed #e2e8f0;
    width: 100%;
}

.sin-datos i {
    font-size: 50px;
    margin-bottom: 15px;
    display: block;
}

.sin-datos p {
    font-size: 18px;
    font-weight: 500;
}
.gestion-container{
    background: #f5f6fa;
    padding: 20px;
    border-radius: 12px;
}

.gestion-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.acciones-header button{
    margin-left: 10px;
}

.btn-azul{
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
}

.btn-gris{
    background: #e5e7eb;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
}

.filtros{
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.filtros input, .filtros select{
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.tabla-moderna{
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.tabla-moderna th{
    text-align: left;
    padding: 12px;
    font-size: 12px;
    color: gray;
}

.tabla-moderna td{
    padding: 12px;
    border-top: 1px solid #eee;
}

.fila-cliente:hover{
    background: #f9fafb;
}

.badge{
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.badge.activo{
    background: #d1fae5;
    color: #065f46;
}

.badge.suspendido{
    background: #fef3c7;
    color: #92400e;
}

.badge.inactivo{
    background: #e5e7eb;
    color: #374151;
}

.acciones i{
    margin-right: 10px;
    cursor: pointer;
    color: #555;
}

.acciones i:hover{
    color: #000;
}

/* Dashboard Hero Split */
.dashboard-hero-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 50px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: #fff;
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.dashboard-hero-split .hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 800;
}

.dashboard-hero-split .hero-text p {
    font-size: 1.1rem;
    opacity: 0.9;
}

.btn-hero-large {
    padding: 18px 35px;
    font-size: 1.25rem;
    font-weight: 700;
    border-radius: 15px;
    background: #fff;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-hero-large:hover {
    background: #f8fafc;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    color: #1d4ed8;
}

.btn-hero-large i {
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-hero-split {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        gap: 25px;
    }
    
    .dashboard-hero-split .hero-text h1 {
        font-size: 2rem;
    }
    
    .btn-hero-large {
        width: 100%;
        justify-content: center;
    }
}

.btn-success-sm, .btn-azul-sm, .btn-verde-sm, .btn-ver-moderno {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    min-width: 90px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-ver-moderno { background: #f1f5f9; color: #475569; }
.btn-ver-moderno:hover { background: #e2e8f0; transform: translateY(-2px); }

.btn-success-sm { background: #16a34a; color: #fff; }
.btn-success-sm:hover { background: #15803d; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(22, 163, 74, 0.2); }

.btn-azul-sm { background: #2563eb; color: #fff; }
.btn-azul-sm:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2); }

.btn-verde-sm { background: #059669; color: #fff; }
.btn-verde-sm:hover { background: #047857; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2); }

.justify-center { justify-content: center !important; }

.modern-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.modern-table th { padding: 15px; background: #f8fafc; color: #64748b; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; border-bottom: 2px solid #edf2f7; }
.modern-table td { padding: 15px; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.modern-table tr:hover { background-color: #fcfdfe; }


/* UTILIDADES DE FLEXBOX */
.flex { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; }
.gap-10 { gap: 10px !important; }
.justify-center { justify-content: center !important; }


.btn-disabled-sm {
    background: #f1f5f9;
    color: #cbd5e1;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 32px;
    min-width: 90px;
    cursor: not-allowed;
    white-space: nowrap;
}

/* BOTONES EXTRA PEQUEÑOS (XS) PARA EL DASHBOARD */
.btn-ver-xs, .btn-success-xs, .btn-azul-xs, .btn-disabled-xs {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    min-width: 35px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-ver-xs { background: #f1f5f9; color: #475569; min-width: 50px; }
.btn-ver-xs:hover { background: #e2e8f0; }

.btn-success-xs { background: #16a34a; color: #fff; }
.btn-success-xs:hover { background: #15803d; }

.btn-azul-xs { background: #2563eb; color: #fff; }
.btn-azul-xs:hover { background: #1d4ed8; }

.btn-disabled-xs { background: #f8fafc; color: #cbd5e1; border: 1px solid #f1f5f9; cursor: not-allowed; }

.gap-5 { gap: 5px !important; }

/* --- DISEÑO SOPORTE Y PQR PROFESIONAL --- */
.soporte-pqr-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 25px;
    margin-top: 20px;
}

.soporte-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.soporte-card-mini {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    text-align: center;
}

.soporte-card-mini:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: #2563eb;
}

.soporte-icon-wrap {
    width: 50px;
    height: 50px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 15px;
}

.soporte-card-mini.whatsapp .soporte-icon-wrap { background: #f0fdf4; color: #22c55e; }
.soporte-card-mini.email .soporte-icon-wrap { background: #f8fafc; color: #334155; }

.soporte-card-mini h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.soporte-card-mini p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 15px;
}

/* Formulario PQR Pro */
.pqr-main-card {
    background: #fff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}

.pqr-header-pro {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.pqr-header-pro i {
    font-size: 1.5rem;
    color: #2563eb;
    background: #eff6ff;
    padding: 12px;
    border-radius: 12px;
}

.pqr-header-pro h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
}

.pqr-form-group-pro {
    margin-bottom: 20px;
}

.pqr-form-group-pro label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.pqr-input-pro, .pqr-select-pro, .pqr-textarea-pro {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pqr-input-pro:focus, .pqr-select-pro:focus, .pqr-textarea-pro:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-pqr-send {
    background: #2563eb;
    color: #fff;
    padding: 12px 25px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    width: fit-content;
    margin-left: auto;
}

.btn-pqr-send:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Historial de PQR Pro */
.pqr-history-card {
    margin-top: 30px;
    background: #fff;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}

.pqr-item-pro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s ease;
}

.pqr-item-pro:last-child { border-bottom: none; }
.pqr-item-pro:hover { background: #f8fafc; }

.pqr-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pqr-item-title {
    font-weight: 700;
    color: #1e293b;
    font-size: 0.95rem;
}

.pqr-item-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pqr-item-msg {
    font-size: 0.85rem;
    color: #64748b;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-s-outline {
    border: 1px solid #e2e8f0;
    color: var(--text-dark);
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-s-outline:hover {
    background: #f8fafc;
    border-color: #2563eb;
    color: #2563eb;
}

/* --- DASHBOARD MENSAJERO PROFESIONAL --- */
.mensajero-hero-pro {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    padding: 40px;
    border-radius: 24px;
    color: white;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.2);
}

.mensajero-hero-pro::after {
    content: "\f206";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 150px;
    opacity: 0.1;
    transform: rotate(-15deg);
}

.mensajero-hero-pro h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.mensajero-hero-pro p {
    opacity: 0.9;
    font-size: 1.1rem;
}

.mensajero-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card-pro {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.metric-card-pro:hover {
    transform: translateY(-5px);
}

.metric-icon-wrap {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-icon-wrap.blue { background: #eff6ff; color: #2563eb; }
.metric-icon-wrap.green { background: #f0fdf4; color: #22c55e; }
.metric-icon-wrap.purple { background: #f5f3ff; color: #7c3aed; }
.metric-icon-wrap.orange { background: #fff7ed; color: #f97316; }

.metric-info-pro {
    display: flex;
    flex-direction: column;
}

.metric-label-pro {
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-value-pro {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.mensajero-charts-pro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card-pro {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #f1f5f9;
}

.chart-header-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header-pro h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.mensajero-info-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card-pro {
    background: white;
    padding: 20px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid #f1f5f9;
}

.info-card-pro i {
    font-size: 1.2rem;
    color: #2563eb;
}

.info-card-pro p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

@media (max-width: 992px) {
    .mensajero-charts-pro { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .soporte-pqr-container { grid-template-columns: 1fr; }
    .soporte-sidebar { flex-direction: row; flex-wrap: wrap; }
    .soporte-card-mini { flex: 1; min-width: 250px; }
}

/* --- REPORTE DE CARTERA ADMINISTRADOR --- */
.cartera-container {
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}

.report-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
}

.report-header p {
    color: #64748b;
    font-size: 0.85rem;
}

.btn-excel {
    background: #10b981;
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-excel:hover {
    background: #059669;
    transform: translateY(-1px);
}

.table-cartera {
    width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #f1f5f9;
}

.table-cartera th {
    background: #f8fafc;
    padding: 12px 15px;
    text-align: left;
    font-size: 0.65rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    border-bottom: 2px solid #f1f5f9;
}

.table-cartera td {
    padding: 10px 15px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #1e293b;
    vertical-align: middle;
}

.table-cartera tr:last-child td {
    border-bottom: none;
}

.table-cartera tr:hover td {
    background-color: #fcfdfe;
}

.saldo-badge {
    background: #fff1f2;
    color: #e11d48;
    padding: 4px 10px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-block;
}

.count-badge {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 700;
    color: #475569;
    font-size: 0.75rem;
}

.btn-pay {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-cash { 
    background: #f0fdf4; 
    color: #16a34a;
    border: 1px solid #dcfce7;
}

.btn-trans { 
    background: #eff6ff; 
    color: #2563eb;
    border: 1px solid #dbeafe;
}

/* --- CONTABILIDAD PRO --- */
.contabilidad-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 35px;
    border-radius: 24px;
    color: white;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.contabilidad-hero::after {
    content: "\f155";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 150px;
    opacity: 0.05;
    transform: rotate(-15deg);
}

.contabilidad-hero h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contabilidad-hero p {
    opacity: 0.7;
    font-size: 0.95rem;
}

.grid-metrics-pro {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.card-metric-pro {
    background: white;
    padding: 20px 25px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-metric-pro:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
}

.metric-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-metric-pro .label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-metric-pro .value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.2;
}

.value-wrapper {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.active-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #16a34a;
    font-weight: 700;
}

.active-indicator .dot {
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    display: inline-block;
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-green { background: #f0fdf4; color: #16a34a; }
.icon-orange { background: #fff7ed; color: #f97316; }

.card-metric-pro .trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.trend.up { color: #10b981; }
.trend.down { color: #ef4444; }

.section-pro {
    background: white;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #f1f5f9;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.section-header-pro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f1f5f9;
}

.section-header-pro h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header-pro h3 i {
    color: #2563eb;
}

.form-inline-pro {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 15px;
    border-radius: 16px;
    margin-bottom: 20px;
}

.input-pro {
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.9rem;
    background: white;
    min-width: 150px;
}

.input-pro:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-cash:hover { background: #16a34a; color: white; }
.btn-trans:hover { background: #2563eb; color: white; }

.btn-ver-moderno {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-ver-moderno:hover {
    background: #f8fafc;
    color: #1e293b;
}

/* Detalle de órdenes expandible */
.detalle-cartera-row {
    background: #fbfcfe;
}

.detalle-cartera-container {
    padding: 15px 20px;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.subtable-cartera {
    width: 100%;
    background: white;
    border-radius: 12px;
    border: 1px solid #edf2f7;
}

.subtable-cartera th {
    padding: 8px 15px;
    background: #f8fafc;
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 800;
}

.subtable-cartera td {
    padding: 10px 15px;
    font-size: 0.8rem;
}

/* MODAL REGISTRO MENSAJERO */
.modal-registro {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-registro.show {
    display: flex;
}

.modal-registro-content {
    background-color: #fff;
    padding: 40px;
    border-radius: 24px;
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalAppear {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.close-modal-registro {
    position: absolute;
    right: 25px;
    top: 25px;
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal-registro:hover {
    color: #1e293b;
}

.modal-registro-header {
    text-align: center;
    margin-bottom: 30px;
}

.modal-registro-header i {
    font-size: 3rem;
    color: #2563eb;
    margin-bottom: 15px;
}

.modal-registro-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.modal-registro-form .form-group {
    margin-bottom: 20px;
}

.modal-registro-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.modal-registro-form input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-registro-form input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-modal-registro {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-modal-registro:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

/* Estilos de Contabilidad y Tabs */
.main-content .registro-card { max-width: none; }
.main-content .registro-card h2 { text-align: left; margin-bottom: 0; }
.main-content .registro-card h3 { text-align: left; }
.sec-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.sec-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sec-toggle { height: 36px; white-space: nowrap; }
.sec-body { margin-top: 12px; }
.sec-card.is-collapsed .sec-body { display: none; }
.sec-head h2 { font-size: 22px; line-height: 1.2; font-weight: 900; letter-spacing: -0.02em; }
.sec-actions .btn-gris { height: 36px; padding: 0 12px; border-radius: 12px; font-weight: 800; background: #ffffff; border: 1px solid #e2e8f0; color: #0f172a; }
.sec-actions a.btn-gris { display: inline-flex; align-items: center; text-decoration: none; }
.sec-actions .btn-gris:hover { background: #eef2ff; border-color: #c7d2fe; color: #2563eb; }
.sec-actions .btn-gris:active { transform: translateY(1px); }
.sec-actions .btn-export { gap: 8px; }
.sec-actions .btn-export i { font-size: 14px; }
.sec-actions .btn-export-excel { background: rgba(22,163,74,0.08); border-color: rgba(22,163,74,0.35); color: #166534; }
.sec-actions .btn-export-excel:hover { background: rgba(22,163,74,0.14); border-color: rgba(22,163,74,0.45); color: #14532d; }
.sec-actions .btn-export-pdf { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.35); color: #7f1d1d; }
.sec-actions .btn-export-pdf:hover { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.45); color: #7f1d1d; }

.tabs-header {
    display: flex;
    gap: 8px;
    background: #ffffff;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-bottom: 25px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
}
.tab-btn {
    padding: 12px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.tab-btn i { font-size: 16px; opacity: 0.7; }
.tab-btn:hover {
    background: #f1f5f9;
    color: #2563eb;
    border-color: #cbd5e1;
}
.tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.tab-btn.active i { opacity: 1; }
.tab-content {
    display: none;
    animation: fadeInTab 0.3s ease-out;
}
.tab-content.active {
    display: block;
}
.badge-pro {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.badge-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Estilos de Métricas y Bancos - Reportes */
.grid-metrics-pro {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card-metric-pro {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 24px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-metric-pro:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
}

/* Nuevos estilos para Reportes */
.cartera-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.report-header {
    margin-bottom: 30px;
}

.report-header h2 {
    margin: 0;
    color: #1e293b;
    font-size: 1.75rem;
    font-weight: 800;
}

.report-header p {
    margin: 5px 0 0;
    color: #64748b;
}

.section-pro {
    background: white;
    padding: 25px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.section-pro h3 {
    margin: 0;
    color: #1e293b;
    font-weight: 700;
}

.detalle-cartera-container {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin: 10px;
    border: 1px solid #e2e8f0;
}

.subtable-cartera {
    width: 100%;
    border-collapse: collapse;
}

.subtable-cartera th {
    padding: 12px;
    text-align: left;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
}

.subtable-cartera td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}

.btn-cerrar-detalle {
    font-size: 0.85rem;
    color: #64748b;
    text-decoration: none;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.btn-cerrar-detalle:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.table-cartera {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-cartera th {
    padding: 16px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid #edf2f7;
    text-align: left;
}

.table-cartera td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.cliente-row:hover {
    background-color: #f8fafc;
}

.saldo-badge {
    background: #f1f5f9;
    color: #1e293b;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.95rem;
}

.count-badge {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.btn-pay {
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.btn-cash {
    background: #dcfce7;
    color: #15803d;
}

.btn-cash:hover {
    background: #bbf7d0;
}

.btn-trans {
    background: #eff6ff;
    color: #1d4ed8;
}

.btn-trans:hover {
    background: #dbeafe;
}

.btn-ver-moderno {
    background: #f1f5f9;
    color: #475569;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: 0.2s;
}

.btn-ver-moderno:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-excel {
    background: #10b981;
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

/* --- LOGIN ADMINISTRATIVO --- */
.body-login-admin {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.8)), 
                url('https://images.unsplash.com/photo-1580674271209-40b49a11ef88?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    font-family: 'Inter', sans-serif;
}

.login-footer {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 40px 20px;
    margin: 0 auto;
    animation: fadeInLogin 0.8s ease-out;
}

@keyframes fadeInLogin {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

/* Logo unificado arriba */

.login-box h2 {
    color: #1e293b;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.login-box p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.login-form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control-custom {
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control-custom:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.input-with-icon i:hover {
    color: #2563eb;
}

.btn-login-admin {
    width: 100%;
    padding: 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
}

.btn-login-admin:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.4);
}

.alert-custom {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
    display: flex;
    align-items: center;
    gap: 10px;
}

.back-link {
    display: inline-block;
    margin-top: 25px;
    color: #64748b;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s;
}

.back-link:hover {
    color: #2563eb;
}

@media (max-width: 480px) {
    .login-wrapper {
        padding: 25px 15px;
    }
    .login-box {
        padding: 28px 22px;
    }
}

/* --- LOGIN PÚBLICO (CLIENTES/MENSAJEROS) --- */
.body-login-public {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(rgba(241, 245, 249, 0.8), rgba(241, 245, 249, 0.9)), 
                url('https://images.unsplash.com/photo-1566576721346-d4a3b4eaad5b?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
}

.login-public-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px; /* Aumentado para bajarlo del header */
}

.login-public-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 35px; /* Reducido */
    border-radius: 28px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 380px; /* Reducido */
    text-align: center;
    animation: fadeInLogin 0.6s ease-out;
}

.login-public-box h2 {
    color: #0f172a;
    font-weight: 800;
    font-size: 1.5rem; /* Reducido */
    margin-bottom: 8px;
}

.login-public-box p {
    color: #64748b;
    font-size: 0.85rem; /* Reducido */
    margin-bottom: 25px; /* Reducido */
}

.login-public-form-group {
    text-align: left;
    margin-bottom: 18px; /* Reducido */
}

.login-public-form-group label {
    display: block;
    font-size: 0.8rem; /* Reducido */
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.btn-login-public {
    width: 100%;
    padding: 12px; /* Reducido */
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem; /* Reducido */
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.3);
}

.btn-login-public:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(37, 99, 235, 0.4);
}

.login-register-prompt {
    margin-top: 25px; /* Reducido */
    padding-top: 20px; /* Reducido */
    border-top: 1px solid #f1f5f9;
    font-size: 0.85rem; /* Reducido */
    color: #64748b;
}

.login-register-prompt a {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

/* --- REGISTRO PÚBLICO --- */
.body-registro-public {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(rgba(241, 245, 249, 0.8), rgba(241, 245, 249, 0.9)), 
                url('https://images.unsplash.com/photo-1586864387917-f53bc2644343?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
}

.registro-public-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px; /* Aumentado para bajarlo del header */
}

.registro-public-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 30px 35px; /* Reducido */
    border-radius: 28px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 440px; /* Reducido */
    text-align: center;
    animation: fadeInLogin 0.6s ease-out;
}

.registro-public-box h2 {
    color: #0f172a;
    font-weight: 800;
    font-size: 1.5rem; /* Reducido */
    margin-bottom: 8px;
}

.registro-public-box p {
    color: #64748b;
    font-size: 0.85rem; /* Reducido */
    margin-bottom: 25px;
}

.registro-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px; /* Reducido */
    text-align: left;
}

.registro-full-width {
    grid-column: span 2;
}

.registro-form-group {
    margin-bottom: 15px; /* Reducido */
}

.registro-form-group label {
    display: block;
    font-size: 0.75rem; /* Reducido */
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.roles-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px; /* Reducido */
    margin-bottom: 15px;
}

.rol-card {
    cursor: pointer;
    border: 2px solid #e2e8f0;
    border-radius: 10px; /* Reducido */
    padding: 10px; /* Reducido */
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8fafc;
}

.rol-card:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.rol-card input[type="radio"] {
    display: none;
}

.rol-card.active {
    border-color: #2563eb;
    background: #eff6ff;
    color: #2563eb;
}

.rol-icon {
    font-size: 1.1rem; /* Reducido */
}

.rol-label {
    font-size: 0.8rem; /* Reducido */
    font-weight: 700;
}

.btn-registro-public {
    width: 100%;
    padding: 12px; /* Reducido */
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem; /* Reducido */
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
    box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.3);
}

.btn-registro-public:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px rgba(37, 99, 235, 0.4);
}

@media (max-width: 580px) {
    .registro-form-grid { grid-template-columns: 1fr; }
    .registro-full-width { grid-column: span 1; }
    .roles-selector { grid-template-columns: 1fr; }
}

/* --- ESTILOS DE SEGURIDAD Y PQRS (ADMIN) --- */
.admin-content-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: #f8fafc;
}

.main-content-seguridad {
    flex: 1;
    padding: 30px;
    transition: all 0.3s;
    margin-left: 240px; /* Ancho de la sidebar fija */
}

.seguridad-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Pestañas */
.tabs-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.tab-btn.active {
    background: #6366f1;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tarjetas y Contenedores */
.card-seguridad {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 25px;
    border: 1px solid #edf2f7;
    margin-bottom: 25px;
}

.section-title-seguridad {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Estilos de PQRs */
.pqr-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pqr-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pqr-item:hover {
    border-color: #6366f1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pqr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badge-seguridad {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pendiente { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-rol { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

.pqr-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar-seguridad {
    width: 35px;
    height: 35px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
}

.user-details h4 {
    font-size: 0.95rem;
    color: #1e293b;
    margin: 0;
}

.user-details span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.pqr-message-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.pqr-asunto {
    font-weight: 700;
    color: #334155;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.pqr-texto {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

/* Formulario de Respuesta */
.respuesta-form {
    background: #fff;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

.textarea-seguridad {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 12px;
    resize: none;
    transition: all 0.2s;
}

.textarea-seguridad:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.select-estado {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #475569;
    background: #fff;
}

.btn-enviar-seguridad {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-enviar-seguridad:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* Sidebar de Seguridad */
.policy-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 20px;
    border-left: 5px solid #6366f1;
}

.policy-card h4 {
    color: #1e293b;
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.policy-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-list li {
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.policy-list li strong { color: #1e293b; }

.btn-danger-outline-seguridad {
    width: 100%;
    background: #fff;
    color: #ef4444;
    border: 2px solid #fee2e2;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
}

.btn-danger-outline-seguridad:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.btn-dark-seguridad {
    width: 100%;
    background: #1e293b;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', sans-serif;
}

.btn-dark-seguridad:hover { 
    background: #0f172a; 
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 1024px) {
    .seguridad-grid { grid-template-columns: 1fr; }
    .main-content-seguridad { margin-left: 0; padding: 20px; }
    .admin-content-wrapper { flex-direction: column; }
}


/* --- ESTILOS DE SEGURIDAD Y PQRS (ADMIN) --- */
.admin-content-wrapper {
    display: flex;
    min-height: calc(100vh - 70px);
    background-color: #f8fafc;
}

.main-content {
    flex: 1;
    padding: 30px;
    transition: all 0.3s;
    margin-left: 240px; /* Ancho de la sidebar fija */
}

.seguridad-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Pestañas */
.tabs-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: none;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.tab-btn.active {
    background: #6366f1;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tarjetas y Contenedores */
.card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 25px;
    border: 1px solid #edf2f7;
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Estilos de PQRs */
.pqr-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pqr-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pqr-item:hover {
    border-color: #6366f1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pqr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pendiente { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.badge-rol { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

.pqr-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.9rem;
}

.user-details h4 {
    font-size: 0.95rem;
    color: #1e293b;
    margin: 0;
}

.user-details span {
    font-size: 0.75rem;
    color: #94a3b8;
}

.pqr-message-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.pqr-asunto {
    font-weight: 700;
    color: #334155;
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.pqr-texto {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

/* Formulario de Respuesta */
.respuesta-form {
    background: #fff;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 12px;
    resize: none;
    transition: all 0.2s;
}

textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.select-estado {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #475569;
    background: #fff;
}

.btn-enviar {
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-enviar:hover {
    background: #4f46e5;
    transform: translateY(-1px);
}

/* Sidebar de Seguridad */
.policy-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    padding: 20px;
}

.policy-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.policy-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #475569;
}

.btn-danger-outline {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #ef4444;
    border: 2px solid #fee2e2;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.btn-danger-outline:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.btn-dark {
    width: 100%;
    padding: 12px;
    background: #1e293b;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-dark:hover {
    background: #0f172a;
}

/* Contrato de mensajeros */
.contract-stats-grid,
.contract-page-grid,
.contract-admin-grid {
    display: grid;
    gap: 20px;
}

.contract-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 20px 0;
}

.contract-admin-grid,
.contract-page-grid {
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1.25fr);
    align-items: start;
}

.contract-form-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contract-editor {
    min-height: 320px;
    font-family: inherit;
    resize: vertical;
}

.contract-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contract-preview-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.contract-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #475569;
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.contract-preview-box {
    max-height: 70vh;
    overflow: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    color: #0f172a;
    line-height: 1.65;
}

.contract-preview-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.contract-read-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.contract-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
}

.contract-zoom-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 999px;
    background: #ffffff;
    color: #1d4ed8;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contract-zoom-btn:hover {
    background: #dbeafe;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.16);
}

.contract-preview-stage {
    width: 100%;
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.contract-preview-zoom {
    width: 100%;
    transform-origin: top center;
    transition: transform 0.2s ease;
}

.contract-preview-box p {
    margin: 0 0 14px 0;
}

.contract-preview-box .contract-pdf-document {
    background: transparent;
}

.contract-page-grid.contract-read-mode .contract-side-panel {
    display: none;
}

.contract-page-grid.contract-read-mode .contract-preview-panel {
    grid-column: 1 / -1;
    width: 100%;
}

.contract-page-grid.contract-read-mode .contract-preview-box {
    max-height: 82vh;
    padding: 14px;
}

.contract-page-grid.contract-read-mode .contract-preview-stage {
    justify-content: center;
}

.contract-meta-list {
    display: grid;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px;
    color: #334155;
}

.contract-signature-box {
    background: #f8fafc;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 18px;
}

.contract-signature-box label {
    display: block;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 10px;
}

.signature-canvas {
    width: 100%;
    min-height: 220px;
    background: #fff;
    border: 2px dashed #93c5fd;
    border-radius: 14px;
    touch-action: none;
    display: block;
}

.contract-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: #334155;
    font-size: 0.95rem;
}

.contract-check input {
    margin-top: 4px;
}

.contract-signature-summary {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 18px;
    color: #166534;
}

.contract-signature-summary h4 {
    margin: 0 0 12px 0;
    color: #15803d;
}

.contract-signature-image {
    display: block;
    max-width: 100%;
    max-height: 160px;
    background: #fff;
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 10px;
    margin-top: 14px;
}

.contract-pdf-document {
    width: 100%;
}

.contract-print-page {
    width: min(100%, 794px);
    max-width: 100%;
    min-height: 297mm;
    margin: 0 auto;
    padding: 16mm 14mm 18mm;
    background: #fff;
    color: #111827;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.45;
}

.contract-document-body p {
    margin: 0 0 10px 0;
    text-align: justify;
}

.contract-document-body ol {
    margin: 0 0 10px 22px;
    padding: 0;
}

.contract-preview-box .contract-print-page {
    min-height: auto;
}

.contract-doc-title {
    text-align: center !important;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px !important;
}

.contract-doc-subtitle {
    text-align: center !important;
    margin-top: 16px !important;
}

.contract-signature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
    margin-top: 28px;
    align-items: end;
}

.contract-signature-col {
    text-align: center;
}

.contract-signature-role {
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}

.contract-signature-print {
    display: block;
    width: 100%;
    max-width: 220px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto 2px;
}

.contract-signature-placeholder {
    background: transparent;
}

.contract-signature-line {
    border-top: 1px solid #111827;
    width: 100%;
    margin: 0 auto 8px;
}

.contract-signature-name {
    font-weight: 700;
    text-transform: uppercase;
}

.contract-signature-doc {
    margin-top: 4px;
}

.contract-print-body {
    background: #e5e7eb;
    margin: 0;
    padding: 20px;
}

.contract-print-body .contract-print-page {
    width: 210mm;
    max-width: none;
}

.contract-print-toolbar {
    max-width: 210mm;
    margin: 0 auto 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

@media (max-width: 992px) {
    .contract-admin-grid,
    .contract-page-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .contract-preview-box {
        padding: 16px;
    }

    .contract-actions,
    .contract-preview-header {
        flex-direction: column;
    }

    .contract-signature-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    .contract-print-body {
        background: #fff;
        padding: 0;
    }

    .contract-print-toolbar {
        display: none !important;
    }

    .contract-print-page {
        width: auto;
        min-height: auto;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    .contract-preview-box {
        overflow: visible;
        max-height: none;
        border: none;
        padding: 0;
        background: transparent;
    }
}


/* ==============================================================
   SISTEMA DE RECUPERACIÓN DE CONTRASEÑA
============================================================== */
.reset-pass-header {
    text-align: center;
    margin-bottom: 25px;
}
.reset-pass-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 18px;
    box-shadow: 0 8px 20px -6px rgba(37, 99, 235, 0.35);
}
.reset-pass-icon.icon-valid {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}
.reset-pass-header h2 {
    color: #0f172a;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 8px;
}
.reset-pass-header p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}
.reset-pass-links {
    margin-top: 20px;
    text-align: center;
}
.reset-pass-links .back-link {
    display: inline-block;
}
.token-admin-preview {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}
.token-admin-preview label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.token-url-box {
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.78rem;
    color: #78350f;
    word-break: break-all;
    margin-bottom: 10px;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}
.btn-copiar-token {
    background: #f59e0b;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-copiar-token:hover {
    background: #d97706;
    transform: translateY(-1px);
}
.copiado-msg-oculto, .copiado-reset-oculto {
    display: none;
    margin-left: 10px;
    font-size: 0.75rem;
    color: #10b981;
    font-weight: 700;
}
.copiado-msg-visible, .copiado-reset-visible {
    display: inline !important;
    animation: fadeInCopiado 0.3s ease-out;
}
@keyframes fadeInCopiado {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.strength-checker {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
}
.strength-checker label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}
.strength-checker input {
    cursor: pointer;
}
.alert-success {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #bbf7d0 !important;
}

/* --- ADMIN: SOLICITUDES DE RECUPERACIÓN (SEGURIDAD.PHP) --- */
.badge-count-red {
    background: #ef4444 !important;
    color: white !important;
    font-size: 0.7rem !important;
    padding: 2px 8px !important;
    margin-left: 8px !important;
    vertical-align: middle !important;
    border-radius: 999px !important;
}
.reset-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.reset-item {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-left: 4px solid #ef4444;
    border-radius: 14px;
    padding: 20px;
    transition: all 0.25s;
    box-shadow: 0 2px 8px -3px rgba(15, 23, 42, 0.06);
}
.reset-item:hover {
    box-shadow: 0 8px 24px -8px rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}
.reset-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 15px;
    flex-wrap: wrap;
}
.reset-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 220px;
}
.reset-avatar {
    background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
    color: #b91c1c !important;
}
.user-details h4 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}
.reset-meta-line {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.6;
}
.reset-meta-line i {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-right: 3px;
}
.reset-badges {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-end;
}
.reset-url-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    margin-bottom: 14px;
}
.reset-url-box:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.reset-url-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}
.reset-url-label i {
    margin-right: 4px;
}
.reset-url-text {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #334155;
    word-break: break-all;
    line-height: 1.4;
}
.reset-url-box small {
    position: absolute;
    top: 10px;
    right: 14px;
    background: #10b981;
    color: white;
    padding: 3px 9px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.65rem;
}
.reset-actions-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
.reset-form-inline {
    margin: 0;
}
.btn-reset-accion {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-regenerar {
    background: #dbeafe;
    color: #1d4ed8;
}
.btn-regenerar:hover {
    background: #bfdbfe;
    transform: translateY(-1px);
}
.btn-cancelar {
    background: #fee2e2;
    color: #b91c1c;
}
.btn-cancelar:hover {
    background: #fecaca;
    transform: translateY(-1px);
}
.btn-asignar {
    background: #22c55e;
    color: white;
}
.btn-asignar:hover {
    background: #16a34a;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px -4px rgba(34, 197, 94, 0.4);
}
.reset-manual-block {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 14px;
}
.reset-manual-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: #475569;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.reset-manual-title i {
    color: #64748b;
    margin-right: 5px;
}
.reset-manual-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
}
.reset-pass-input {
    flex: 1;
    min-width: 200px;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.85rem;
    background: white;
    transition: all 0.2s;
    outline: none;
}
.reset-pass-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}
.badge-success-small {
    background: #dcfce7 !important;
    color: #166534 !important;
    font-size: 0.7rem !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
}
.badge-gray-small {
    background: #f1f5f9 !important;
    color: #475569 !important;
    font-size: 0.7rem !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    font-weight: 700 !important;
}
.reset-historial-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}
.reset-historial-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.reset-historial-table thead {
    background: #f8fafc;
}
.reset-historial-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 700;
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
.reset-historial-table td {
    padding: 12px 15px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.reset-historial-table tbody tr:last-child td {
    border-bottom: none;
}
.reset-historial-table tbody tr:hover {
    background: #f8fafc;
}
@media (max-width: 900px) {
    .seguridad-grid { grid-template-columns: 1fr; }
    .main-content-seguridad { margin-left: 0; padding: 18px; }
    .reset-header { flex-direction: column; align-items: flex-start; }
    .reset-badges { align-items: flex-start; flex-direction: row; }
}
@media (max-width: 520px) {
    .reset-manual-form { flex-direction: column; align-items: stretch; }
    .reset-pass-input { width: 100%; }
    .btn-asignar { justify-content: center; }
}

/* Utilidades recuperación contraseña */
.alert-margin-bottom { margin-bottom: 25px; }
.alert-margin-bottom-sm { margin-bottom: 20px; }
.btn-block-link { display: block !important; text-align: center !important; text-decoration: none !important; }
.mensaje-nota-admin { opacity: 0.85; display: block; margin-top: 5px; }
.back-link-mt-0 { margin-top: 0 !important; }


/* ==============================================================
   ADMIN CONFIGURACIÓN DE CORREO Y SMTP
============================================================== */
.email-config-wrapper { width: 100%; max-width: 1100px; }
.config-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.config-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.config-form-group label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.config-form-group small {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}
.config-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}
.config-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #fff;
}
.config-select {
    cursor: pointer;
    appearance: none;
    background-image: url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>\");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

/* Toggle Switch SMTP */
.toggle-switch-wrapper {
    display: inline-flex;
    align-items: center;
    user-select: none;
}
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 999px;
}
.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}
.toggle-switch input:checked + .slider:before {
    transform: translateX(24px);
}

.smtp-config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    transition: opacity 0.3s, filter 0.3s;
}
.smtp-config-grid.smtp-desactivado {
    opacity: 0.5;
    filter: grayscale(0.4);
    pointer-events: none;
}

.config-actions-bar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    flex-wrap: wrap;
    padding: 18px 24px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}
.config-actions-bar .btn-save-permisos { margin: 0; }
.test-email-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    justify-content: flex-start;
    min-width: 280px;
    flex-wrap: wrap;
}
.test-email-input {
    max-width: 280px;
    min-width: 220px;
}
.btn-test-email {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    border: none;
    padding: 11px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 14px -4px rgba(37, 99, 235, 0.45);
}
.btn-test-email:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 10px 20px -4px rgba(37, 99, 235, 0.55);
}

.proveedores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 15px;
}
.proveedor-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}
.proveedor-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
    padding-bottom: 6px;
    border-bottom: 2px solid #dbeafe;
}
.proveedor-card ul {
    margin: 0;
    padding-left: 18px;
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.7;
}
.proveedor-card ul b {
    color: #1e293b;
}
.proveedor-card code {
    background: #e0e7ff;
    color: #3730a3;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

@media (max-width: 900px) {
    .config-form-row { grid-template-columns: 1fr; }
    .smtp-config-grid { grid-template-columns: 1fr; }
    .config-actions-bar { gap: 14px; }
    .config-actions-bar .btn-save-permisos { width: 100%; justify-content: center; }
    .config-actions-bar > div[style] { display: none !important; }
    .test-email-form { width: 100%; flex-direction: column; }
    .test-email-input { max-width: 100%; width: 100%; min-width: 0; }
    .btn-test-email { width: 100%; justify-content: center; }
}

