/* ========== ESTILOS ESPECÍFICOS PARA REGISTRO ========== */

/* Override de estilos base */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 20px 15px !important;
}

.app-header {
    display: none; /* Ocultar header en registro */
}

.app-main {
    padding-bottom: 0 !important;
}

/* Contenedor principal */
.registro-wrapper {
    background: linear-gradient(to bottom, #e8e8e8 0%, #d0d0d0 100%);
    border-radius: 30px;
    padding: 25px 20px;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Header con logo */
.registro-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.leaf-icon {
    width: 28px;
    height: 28px;
    background: #4ade80;
    border-radius: 50% 0 50% 50%;
    transform: rotate(-45deg);
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #1a1a1a;
}

/* Título */
.registro-title-styled {
    font-size: 24px;
    color: #1a1a1a !important;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
    text-shadow: none !important;
}

/* Resumen de productos */
.summary-cards {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.summary-card-box {
    background: white;
    padding: 12px 10px;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
}

.summary-number {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 2px;
}

.summary-label-small {
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.summary-card-box.green .summary-number {
    color: #22c55e;
}

.summary-card-box.yellow .summary-number {
    color: #fbbf24;
}

.summary-card-box.red .summary-number {
    color: #ef4444;
}

/* Contenedor de productos */
.productos-scroll {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.productos-scroll::-webkit-scrollbar {
    width: 6px;
}

.productos-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.productos-scroll::-webkit-scrollbar-thumb {
    background: #4ade80;
    border-radius: 10px;
}

/* Tarjeta de producto nueva */
.producto-card-nuevo {
    background: white !important;
    border-radius: 16px !important;
    padding: 15px !important;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease;
    color: #333 !important;
    border: none !important;
}

.producto-card-nuevo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15) !important;
}

/* Header del producto */
.producto-header-flex {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.producto-emoji-icon {
    font-size: 32px;
}

.producto-info-box {
    flex: 1;
}

.producto-name-styled {
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #1a1a1a !important;
    margin-bottom: 2px;
    margin: 0 !important;
}

.producto-date-styled {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Badge de estado nuevo */
.status-badge-nuevo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px !important;
    font-weight: 600;
    font-size: 11px;
    width: 100%;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.status-aptos {
    background: #22c55e !important;
    color: white !important;
}

.status-maduracion-badge {
    background: #fbbf24 !important;
    color: #1a1a1a !important;
}

.status-fuera {
    background: #ef4444 !important;
    color: white !important;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.9;
    box-shadow: 0 0 4px currentColor;
}

/* Botón eliminar adaptado */
.btn-eliminar-nuevo {
    background: rgba(244, 67, 54, 0.1) !important;
    color: #ef4444 !important;
    border: 1px solid #ef4444 !important;
    padding: 6px 10px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-eliminar-nuevo:hover {
    background: #ef4444 !important;
    color: white !important;
    transform: scale(1.05);
}

/* Botón editar */
.btn-editar-nuevo {
    background: rgba(59, 130, 246, 0.1) !important;
    color: #3b82f6 !important;
    border: 1px solid #3b82f6 !important;
    padding: 6px 10px !important;
    font-size: 16px !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: all 0.3s;
    margin-right: 8px;
}

.btn-editar-nuevo:hover {
    background: #3b82f6 !important;
    color: white !important;
    transform: scale(1.05);
}

/* Contenedor de acciones */
.producto-actions {
    display: flex;
    gap: 8px;
}

/* Info de próximo estado */
.proximo-estado-info {
    margin-top: 10px;
    padding: 10px;
    background: #f0f9ff;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.proximo-estado-info.estado-critico {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.proximo-estado-info.estado-final {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.dias-proximo {
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 4px;
}

.dias-proximo.critico {
    color: #dc2626;
}

.siguiente-estado {
    font-size: 12px;
    color: #64748b;
}

/* Alerta de eliminación */
.alerta-eliminacion {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-radius: 8px;
    border-left: 4px solid #ef4444;
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.alerta-eliminacion-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.alerta-eliminacion-texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.alerta-eliminacion-texto strong {
    font-size: 13px;
    color: #dc2626;
    font-weight: 700;
}

.alerta-eliminacion-texto span {
    font-size: 11px;
    color: #991b1b;
}

/* Producto vencido - estilo atenuado */
.producto-card-nuevo.producto-vencido {
    opacity: 0.75;
    border: 2px solid #fecaca;
}

.producto-card-nuevo.producto-vencido .producto-emoji-icon {
    filter: grayscale(50%);
}

/* Badge de estado vencido */
.status-vencido {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #dc2626 !important;
    border: 1px solid #ef4444 !important;
}

/* Botón ver guía */
.btn-ver-guia {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
    color: #1a1a1a !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(74, 222, 128, 0.3);
}

.btn-ver-guia:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 25px;
    max-width: 400px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    text-align: center;
    font-size: 20px;
}

/* Form groups */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1a1a1a;
    transition: all 0.3s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.1);
}

/* Botones del modal */
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-guardar {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%) !important;
    color: #1a1a1a !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-guardar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.4);
}

.btn-cancelar {
    flex: 1;
    padding: 12px;
    background: #e2e8f0 !important;
    color: #64748b !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancelar:hover {
    background: #cbd5e1 !important;
}

/* Modal de guía */
.modal-guia {
    max-width: 600px;
}

.guia-header-modal {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #4ade80;
    padding-bottom: 15px;
}

.guia-header-modal h3 {
    font-size: 22px;
    color: #22c55e;
    margin-bottom: 8px;
}

.guia-header-modal h4 {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

.guia-contenido-modal {
    color: #1a1a1a;
    line-height: 1.7;
    font-size: 14px;
    max-height: 50vh;
    overflow-y: auto;
}

.guia-contenido-modal p {
    margin-bottom: 12px;
    white-space: pre-line;
}

.btn-cerrar-guia {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background: #94a3b8 !important;
    color: white !important;
    border: none !important;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cerrar-guia:hover {
    background: #64748b !important;
}

/* Estilos para modal de edición simplificado */
.info-readonly {
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    color: #64748b;
    font-weight: 500;
}

.info-value {
    color: #1a1a1a;
    font-weight: 600;
}

.edit-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 20px 0;
}

/* Input simplificado */
.input-container-simple {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f0fdf4;
    border-radius: 10px;
    border-left: 4px solid #4ade80;
    margin-top: 10px;
}

.input-dias-simple {
    width: 80px !important;
    padding: 10px 12px !important;
    border: 2px solid #4ade80 !important;
    border-radius: 8px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    text-align: center !important;
}

.input-dias-simple:focus {
    outline: none !important;
    border-color: #22c55e !important;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2) !important;
}

.dias-suffix {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.resultado-preview {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #3b82f6;
    margin-top: 20px;
}

.preview-title {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 10px;
    font-size: 14px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    color: #1e293b;
}

.preview-item:last-child {
    margin-bottom: 0;
}

.preview-item strong {
    color: #0f172a;
    font-weight: 700;
}

/* Toast de éxito */
.toast-success {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #1a1a1a;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.5);
    z-index: 10000;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast-success.show {
    transform: translateX(-50%) translateY(0);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .input-container-simple {
        padding: 12px;
    }
    
    .input-dias-simple {
        width: 70px !important;
        font-size: 16px !important;
    }
    
    .dias-suffix {
        font-size: 13px;
    }
}

/* Botones de acción */
.button-container-registro {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn-styled {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 20px !important;
    background: #4ade80;
    color: #1a1a1a !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 6px 16px rgba(74, 222, 128, 0.4) !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn-styled:active {
    transform: translateY(2px) !important;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.3) !important;
}

.back-btn-styled {
    background: #94a3b8 !important;
    box-shadow: 0 6px 16px rgba(148, 163, 184, 0.4) !important;
    color: white !important;
}

.back-btn-styled:active {
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.3) !important;
}

.icon-svg {
    width: 18px;
    height: 18px;
}

/* Empty state adaptado */
.empty-state-nuevo {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-icon-nuevo {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state-nuevo p {
    color: #1a1a1a;
    margin-bottom: 8px;
}

.empty-subtitle-nuevo {
    font-size: 14px !important;
    color: #64748b !important;
}

/* Footer tabs ajustado */
.tabs-footer {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 380px) {
    .registro-wrapper {
        padding: 20px 15px;
    }

    .summary-card-box {
        padding: 10px 6px;
    }

    .summary-number {
        font-size: 20px;
    }

    .summary-label-small {
        font-size: 8px;
    }

    .producto-emoji-icon {
        font-size: 28px;
    }

    .producto-name-styled {
        font-size: 15px !important;
    }
}