/* ==========================================
   RESET Y ESTILOS BASE
   ========================================== */

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.modal-open {
    overflow: hidden;
}

main {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contenedor del aviso para empleados */
.tomar-cargo-container {
    background: #fdf2f2;
    border: 1px dashed #be0319;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.tomar-cargo-info {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    text-align: center;
}

/* Botón Principal */
.btn-tomar-cargo {
    background-color: #be0319;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(190, 3, 25, 0.2);
}

.btn-tomar-cargo:hover {
    background-color: #a00215;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(190, 3, 25, 0.3);
}

.btn-tomar-cargo:active {
    transform: translateY(0);
}

/* Estado de carga (cuando se hace clic) */
.btn-tomar-cargo:disabled {
    background-color: #d1d1d1;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Animación opcional para el "Modo Tomar Cargo" */
.tomar-cargo-mode {
    animation: pulse-border 2s infinite;
    border-radius: 8px;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(190, 3, 25, 0.1);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(190, 3, 25, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(190, 3, 25, 0);
    }
}

/* ==========================================
   ANIMACIONES
   ========================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LAYOUT ===== */
.row {
    display: flex;
    width: 100%;
    gap: 16px;
    margin: 16px 0;
}

.row div {
    flex: 1;
}

/* ==========================================
   COMPONENTES DE FORMULARIO
   ========================================== */

.login-form {
    width: 100%;
}

.login-container {
    background: #fff;
    padding: 40px;
    border-radius: 16px;
    color: #000;
    max-width: 440px;
    margin: 20px auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-top: 10px solid var(--color-main);
}

.login-container h2 {
    color: #000;
    margin-bottom: 12px;
    font-weight: 600;
    text-align: center;
    font-size: 1.5rem;
}

.login-container h3 {
    text-align: center;
    color: #000;
    padding-top: 8px;
}

.login-container h3 a {
    color: var(--color-main-dark);
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-container h3 a:hover {
    color: var(--color-main-focus);
}

.login-container label {
    display: block;
    font-weight: 600;
    margin-top: 16px;
    font-size: 0.9rem;
}

.login-container input,
.login-container select {
    width: 100%;
    padding: 12px 10px;
    margin-top: 6px;
    border: 1px solid #aaa;
    border-radius: 8px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.2s ease;
    font-size: 1rem;
    position: relative;
}

.login-container input:focus {
    outline: none;
    border-color: var(--color-main-focus);
    background: white;
}

.login-container button[type="submit"] {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    background: linear-gradient(135deg, var(--color-main-light), var(--color-main));
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.login-container button[type="submit"]:hover {
    background: linear-gradient(135deg, var(--color-main), var(--color-main-dark));
}

/* ===== COMPONENTES DE PASSWORD ===== */
.password-div {
    position: relative;
}

.view-password {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background-color: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
}

.view-password img {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

/* ===== COMPONENTES DE NAVEGACIÓN ===== */
.go-back {
    text-decoration: none;
    color: var(--color-text-primary);
    position: absolute;
    top: 24px;
    left: 16px;
}

.close-button,
.back-button {
    background-color: var(--color-text-primary);
    font-weight: 600;
    padding: 10px 20px;
    text-decoration: none;
    color: #000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.close-button:hover,
.back-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* ===== COMPONENTES VISUALES ===== */
.logo {
    display: block;
    margin: auto;
    padding-top: 24px;
    max-width: 200px;
    height: 80px;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

.error {
    list-style: none;
    width: 100%;
    background-color: #dc3545;
    border: 1px solid #b02a37;
    font-weight: 500;
    padding: 12px;
    box-sizing: border-box;
    margin-top: 12px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

.success {
    list-style: none;
    width: 100%;
    background-color: #28a745;
    border: 1px solid #218838;
    font-weight: 500;
    padding: 12px;
    box-sizing: border-box;
    margin-top: 12px;
    border-radius: 8px;
    text-align: center;
    color: white;
}

/* ===== ENLACES Y BOTONES ESPECIALES ===== */
.forgot-password {
    text-align: center;
    text-decoration: none;
    color: #333;
    display: block;
    margin: 16px auto 0;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--color-text-secondary);
}

.recuperar-volver {
    text-align: center;
    margin-top: 20px;
}

.recuperar-volver a {
    color: var(--color-text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
}

.recuperar-volver a:hover {
    color: var(--color-main-focus);
}

/* ==========================================
   DASHBOARD
   ========================================== */

.dashboard-header {
    height: 80px;
    background: var(--color-main);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.left {
    display: flex;
    align-items: center;
    height: 100%;
    max-height: 80px;
}

.left img {
    height: 100%;
    max-height: 60px;
    width: auto;
}

.dashboard-header .left h1 {
    color: var(--color-text-primary);
    font-size: 1.6rem;
    font-weight: 700;
    padding-left: 12px;
}

.dashboard-header .right {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.dashboard-header .profile-button {
    background-color: var(--color-main-light);
    padding: 8px;
    aspect-ratio: 1;
    border-radius: 100%;
    border: 2px solid #ddd;
    transition: transform .3s;
}

.dashboard-header .profile-button:hover {
    transform: scale(1.05);
    cursor: pointer;
}

.profile-button svg {
    color: var(--color-text-primary);
}

.dashboard-container {
    margin: auto;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    background-color: var(--color-text-primary);
    padding: 40px;
    border-radius: 16px;
    color: var(--color-text-primary);
    max-width: 1000px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dashboard-container h1 {
    color: #000;
    margin-bottom: 24px;
}

.dashboard-container .buttons-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.dashboard-container .buttons-container a,
.dashboard-container button {
    background: linear-gradient(135deg, var(--color-main-light), var(--color-main));
    border: none;
    font-weight: 600;
    font-size: 16px;
    color: var(--color-text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.dashboard-container .buttons-container a:hover,
.dashboard-container button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--color-main), var(--color-main-dark));
}

.dashboard-container .card {
    color: #000;
    width: 100%;
    margin: auto;
    text-align: center;
}

/* ===== BOTONES DEL DASHBOARD ===== */
.btn-secondary {
    display: block;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: var(--color-text-primary);
}

.btn-session {
    display: block;
    background-color: transparent;
    box-shadow: none;
    margin: auto;
    height: 100%;
    color: rgb(214, 5, 5);
    border: none;
    margin-top: 24px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-session:hover {
    cursor: pointer;
}

/* ==========================================
   PEDIDOS
   ========================================== */

.pedidos-container {
    width: 90%;
    max-width: 900px;
    margin: 40px auto;
    font-family: 'Inter', system-ui, sans-serif;
    text-align: left;
    color: #1a1a1a;
}

.pedidos-container h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #222;
    text-align: center;
    margin-bottom: 32px;
}

.descripcion {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* ===== TARJETAS DE PEDIDO ===== */
.pedido-card {
    background: var(--color-text-primary);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease;
    cursor: pointer;
}

.pedido-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--color-main);
}

.pedido-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.pedido-card:nth-child(odd) {
    animation-delay: 0.1s;
}

.pedido-card:nth-child(even) {
    animation-delay: 0.2s;
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.pedido-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

.pedido-meta {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.pedido-meta span {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.pedido-body {
    margin-bottom: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.pedido-body p {
    margin: 0;
    color: var(--color-text-muted);
    font-style: italic;
}

.pedido-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.pedido-footer span {
    color: var(--color-text-muted);
    font-weight: 500;
}

.pedido-footer strong {
    font-size: 1.25rem;
    color: var(--color-main);
    font-weight: 700;
}

/* ===== DETALLES DE PEDIDO (OCULTOS INICIALMENTE) ===== */
.pedido-detalles {
    display: none;
    margin-top: 16px;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.pedido-detalles.active {
    display: block;
}

/* ===== TABLAS ===== */
.tabla-detalles {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 8px;
}

.tabla-detalles th,
.tabla-detalles td {
    padding: 12px;
    font-size: 0.9rem;
    text-align: left;
}

.tabla-detalles th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
}

.tabla-detalles tr {
    border-bottom: 1px solid #f0f0f0;
}

.tabla-detalles tr:hover {
    background-color: #f8f9fa;
}

/* ===== TABLAS DE PEDIDOS ===== */
.pedido-tabla {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--color-text-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-size: 0.95rem;
}

.pedido-tabla thead {
    background: linear-gradient(135deg, var(--color-main-light), var(--color-main));
}

.pedido-tabla thead th {
    color: var(--color-text-primary);
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.pedido-tabla tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.pedido-tabla tbody tr:last-child {
    border-bottom: none;
}

.pedido-tabla tbody tr:hover {
    background-color: #f8f9fa;
}

.pedido-tabla tbody td {
    padding: 14px 12px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.pedido-tabla tbody tr:last-child td {
    border-bottom: none;
}

.pedido-tabla td:first-child,
.pedido-tabla th:first-child {
    padding-left: 20px;
}

.pedido-tabla td:last-child,
.pedido-tabla th:last-child {
    padding-right: 20px;
}

.pedido-tabla td:nth-child(3),
.pedido-tabla th:nth-child(3),
.pedido-tabla td:nth-child(4),
.pedido-tabla th:nth-child(4),
.pedido-tabla td:nth-child(5),
.pedido-tabla th:nth-child(5) {
    text-align: center;
}

.pedido-tabla td:nth-child(1) {
    color: var(--color-main);
    font-weight: 600;
}

/* ===== ESTADOS DE PEDIDO ===== */
.estado {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.estado.Pendiente {
    background: #fff3cd;
    color: #856404;
}

.estado.Completado {
    background: #d1edff;
    color: #004085;
}

.estado.Procesando {
    background: #d4edda;
    color: #155724;
}

.estado.Cancelado {
    background: #f8d7da;
    color: #721c24;
}

.estado.Enviado {
    background: #e7f3ff;
    color: #0066cc;
}

.estado.Entregado {
    background: #e7f7ed;
    color: #00a854;
}

/* ==========================================
   MODALES
   ========================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 999;
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #ffffff;
    padding: 40px 48px;
    border-radius: 24px;
    color: #222;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-content .close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    border-radius: 50%;
    border: 1px solid #ddd;
    color: #333;
    z-index: 10;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}

.modal-content .close-button:hover {
    background: #fee2e2;
    color: var(--color-main);
    border-color: var(--color-main);
    transform: none;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.modal-content .row {
    display: flex;
    gap: 16px;
}

/* ===== CAMPOS EN MODO VISTA ===== */
.modal-content input {
    width: 100%;
    padding: 14px 12px;
    margin-top: 6px;
    border: none;
    border-bottom: 2px solid #eee;
    border-radius: 0;
    background: transparent;
    color: #000;
    box-sizing: border-box;
    pointer-events: none;
}

/* ===== MODO EDICIÓN ===== */
.modal-content.edit-mode input {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    pointer-events: auto;
}

/* ===== FORMULARIO EMPLEADOS (siempre interactivo) ===== */
.employee-form input {
    pointer-events: auto !important;
    border: 2px solid #d1d5db !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #111 !important;
}

.modal-content.edit-mode input:focus {
    outline: none;
    border-color: var(--color-main);
    background: #fff;
    box-shadow: 0 0 8px rgba(206, 158, 0, 0.3);
}

/* ===== SELECT EN MODO VISTA ===== */
.modal-content select {
    width: 100%;
    padding: 14px 12px;
    margin-top: 6px;
    border: none;
    border-bottom: 2px solid #eee;
    border-radius: 0;
    background: transparent;
    color: #000;
    box-sizing: border-box;
    pointer-events: none;

    /* Quitar estilo nativo */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* ===== MODO EDICIÓN ===== */
.modal-content.edit-mode select {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    pointer-events: auto;
    cursor: pointer;
}

/* ===== FOCUS ===== */
.modal-content.edit-mode select:focus {
    outline: none;
    border-color: var(--color-main);
    background: #fff;
    box-shadow: 0 0 8px rgba(206, 158, 0, 0.3);
}

.modal-content label {
    display: block;
    font-weight: 600;
    margin-top: 16px;
}

/* ===== BOTONES ===== */
.modal-content .buttons {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.modal-content .close-button {
    background: #f1f3f5;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: none;
    color: #666;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content .close-button:hover {
    cursor: pointer;
    background: #ffe3e5;
    color: var(--color-main);
    transform: rotate(90deg);
}

.modal-content .btn-edit,
.modal-content .btn-save,
.modal-content .btn-cancel {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botón EDITAR */
.modal-content .btn-edit,
.modal-content .btn-save {
    background: linear-gradient(135deg, var(--color-main-light), var(--color-main));
    border: none;
    color: white;
}

.modal-content .btn-edit:hover,
.modal-content .btn-save:hover {
    background: linear-gradient(135deg, var(--color-main), var(--color-main-dark));
    transform: translateY(-2px);
}

/* Botón CANCELAR */
.modal-content .btn-cancel {
    background: transparent;
    border: 2px solid var(--color-main);
    color: var(--color-main);
}

.modal-content .btn-save:enabled:hover {
    background: var(--color-main);
    color: white;
}

.no-pedidos {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    padding: 60px 20px;
    background: var(--color-text-primary);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .dashboard-header {
        padding: 20px;
        flex-direction: column;
        gap: 16px;
        text-align: center;
        height: auto;
    }

    .dashboard-header .right {
        width: 100%;
        justify-content: center;
    }

    .btn-secondary,
    .btn-session {
        width: fit-content;
        text-align: center;
    }

    main {
        padding: 20px;
    }

    .pedido-header {
        flex-direction: column;
        align-items: stretch;
    }

    .estado {
        align-self: flex-start;
    }

    .pedido-meta {
        flex-direction: column;
        gap: 8px;
    }

    .pedidos-container h2 {
        font-size: 1.5rem;
    }

    .pedido-tabla {
        font-size: 0.85rem;
    }

    .pedido-tabla thead th {
        padding: 12px 8px;
        font-size: 0.8rem;
    }

    .pedido-tabla tbody td {
        padding: 10px 8px;
    }

    .pedido-tabla td:first-child,
    .pedido-tabla th:first-child {
        padding-left: 12px;
    }

    .pedido-tabla td:last-child,
    .pedido-tabla th:last-child {
        padding-right: 12px;
    }
}

@media (max-width: 600px) {

    .login-container,
    .modal-content {
        padding: 24px;
        margin: 20px;
    }

    .login-container h2 {
        margin: 8px 0;
    }

    .row {
        display: block;
    }

    .dashboard-container .buttons-container {
        flex-direction: column;
        width: 100%;
    }

    .dashboard-container .buttons-container a,
    .dashboard-container button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dashboard-header .left h1 {
        font-size: 1.2rem;
    }

    .pedido-card {
        padding: 20px;
    }

    .pedido-footer {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .pedido-tabla {
        min-width: 500px;
    }
}

/* ===== AVATAR UPLOAD ===== */
.avatar-upload-section {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 24px;
    margin-bottom: 24px;
    animation: fadeIn 0.4s ease;
}

.avatar-upload-section h2 {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.avatar-preview-wrap {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--color-main-light);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.avatar-preview-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-preview-wrap svg {
    width: 45px;
    height: 45px;
    color: #bbb;
}

.btn-upload-trigger {
    background: #fff;
    cursor: pointer;
    border: 1px solid #dcdcdc;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-upload-trigger:hover {
    border-color: var(--color-main);
    color: var(--color-main-dark);
    background: #fdfbf7;
}

.btn-save-avatar {
    margin-top: 12px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--color-main);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.btn-save-avatar:hover {
    background: var(--color-main-dark);
    transform: translateY(-1px);
}

/* ===== ESTILO DE ESTADOS EN DASHBOARD ===== */
.pedido-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.pedido-title {
    flex: 1;
}

.pedido-status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Colores por estado armonizados */
.pedido-status-badge.pendiente {
    background: #fff9c4;
    color: #af8600;
}

.pedido-status-badge.confirmado {
    background: #e3f2fd;
    color: #1976d2;
}

.pedido-status-badge.enviado {
    background: #f3e5f5;
    color: #7b1fa2;
}

.pedido-status-badge.entregado {
    background: #e8f5e9;
    color: #2e7d32;
}

.pedido-status-badge.cancelado {
    background: #ffebee;
    color: #c62828;
}

@media (max-width: 600px) {
    .pedido-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .pedido-status-badge {
        width: 100%;
        justify-content: center;
    }
}

/* ===== BOTÓN CONFIRMAR ENTREGA (CLIENTE) ===== */
.pedido-actions-client {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

body.modal-open {
    overflow: hidden;
}

.btn-confirm-delivery {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-confirm-delivery:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.35);
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
}

.btn-confirm-delivery:active {
    transform: translateY(0);
}

.btn-confirm-delivery svg {
    stroke-width: 3px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

@media (max-width: 600px) {
    .pedido-actions-client {
        width: 100%;
    }

    .btn-confirm-delivery {
        width: 100%;
        justify-content: center;
    }
}